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:
parent
14d22dd667
commit
a693735b84
@ -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.
|
||||
|
15
config.if
15
config.if
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user