[FFmpeg-devel] [PATCH 2/2] configure: report full gcc version string
Dave Yeo
daveryeo
Sun Feb 13 20:10:42 CET 2011
On 02/13/11 05:17 am, Mans Rullgard wrote:
> This makes the cc_ident value, which is used in FATE reports, include
> all interesting parts of the gcc version string.
>
> Signed-off-by: Mans Rullgard<mans at mansr.com>
> ---
> configure | 7 +++++--
> 1 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/configure b/configure
> index 01b092f..8cf6d4c 100755
> --- a/configure
> +++ b/configure
> @@ -1865,8 +1865,11 @@ if $cc -v 2>&1 | grep -q '^gcc.*LLVM'; then
> elif $cc -v 2>&1 | grep -qi ^gcc; then
> cc_type=gcc
> cc_version=__VERSION__
> - gcc_extra_ver=$(expr "$($cc --version | head -n1)" : '.*\((.*)\)')
> - cc_ident="gcc $($cc -dumpversion) $gcc_extra_ver"
> + gcc_version=$($cc --version | head -n1)
> + gcc_basever=$($cc -dumpversion)
> + gcc_pkg_ver=$(expr "$gcc_version" : '^[^ ]* \(([^)]*)\)')
> + gcc_ext_ver=$(expr "$gcc_version" : ".*$gcc_pkg_ver $gcc_basever \\(.*\\)")
> + cc_ident=$(cleanws "gcc $gcc_basever $gcc_pkg_ver $gcc_ext_ver")
> if ! $cc -dumpversion | grep -q '^2\.'; then
> CC_DEPFLAGS='-MMD -MF $(@:.o=.d) -MT $@'
> AS_DEPFLAGS='-MMD -MF $(@:.o=.d) -MT $@'
This creates this warning,
expr: warning: unportable BRE: `^[^ ]* \\(([^)]*)\\)': using `^' as the
first character of the basic regular expression is not portable; it is
being ignored
>expr --version
expr (GNU coreutils) 5.94
Also older versions of expr
Dave
ps a quick look also shows a similar warning on QNX
More information about the ffmpeg-devel
mailing list