config.if: If gcc_version is already set, just use it.

* config.if: If gcc_version is already set, just use it.  Don't set
gcc_version_trigger if it's already set, otherwise set it to
gcc/version.c, but only if the file exists.  If it is not set and
gcc/version.c does not exist, try to extract the version number from
$CC.

From-SVN: r62131
This commit is contained in:
Alexandre Oliva 2003-01-30 11:52:51 +00:00 committed by Alexandre Oliva
parent 14d22dd667
commit a693735b84
2 changed files with 20 additions and 3 deletions

View File

@ -1,3 +1,11 @@
2003-01-30 Alexandre Oliva <aoliva@redhat.com>
* config.if: If gcc_version is already set, just use it. Don't set
gcc_version_trigger if it's already set, otherwise set it to
gcc/version.c, but only if the file exists. If it is not set and
gcc/version.c does not exist, try to extract the version number from
$CC.
2003-01-29 Andreas Tobler <a.tobler@schweiz.ch>
* MAINTAINERS: Add myself to write-after-approval list.

View File

@ -22,9 +22,18 @@ fi
# Set libstdcxx_incdir.
# This is the same as gcc/configure.in and libstdc++-v3/acinclude.m4.
gcc_version_trigger=${if_topsrcdir}/gcc/version.c
gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*"\([^"]*\)".*/\1/'`
gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
if test -z "$gcc_version"; then
if test -z "${gcc_version_trigger}" \
&& test -f ${if_topsrcdir}/gcc/version.c; then
gcc_version_trigger=${if_topsrcdir}/gcc/version.c
fi
if test -f "${gcc_version_trigger}"; then
gcc_version_full=`grep version_string "${gcc_version_trigger}" | sed -e 's/.*"\([^"]*\)".*/\1/'`
else
gcc_version_full=`$CC -v 2>&1 | sed -n 's/^gcc version //p'`
fi
gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
fi
libstdcxx_incdir=c++/${gcc_version}
# The trickiest part is libc_interface.