aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigure63
-rw-r--r--gcc/Makefile.in5
-rwxr-xr-xgcc/configure18
-rw-r--r--gcc/configure.in15
-rw-r--r--libf2c/Makefile.in3
-rwxr-xr-xlibf2c/configure24
-rw-r--r--libf2c/configure.in17
-rw-r--r--libio/config.shared3
8 files changed, 82 insertions, 66 deletions
diff --git a/configure b/configure
index 57f8c78..af33406 100755
--- a/configure
+++ b/configure
@@ -56,7 +56,8 @@ exec_prefixoption=
fatal=
floating_point=default
gas=default
-gcc_version=UNKNOWN
+gcc_version=
+gcc_version_trigger=
host_alias=NOHOST
host_makefile_frag=
moveifchange=
@@ -458,6 +459,7 @@ fi
configsub=`echo ${progname} | sed 's/configure$/config.sub/'`
moveifchange=`echo ${progname} | sed 's/configure$/move-if-change/'`
+topsrcdir=`cd \`dirname ${progname}\`; pwd`
# this is a hack. sun4 must always be a valid host alias or this will fail.
if ${config_shell} ${configsub} sun4 >/dev/null 2>&1 ; then
@@ -520,6 +522,28 @@ case "${exec_prefixoption}" in
*) ;;
esac
+# Define the trigger file to make sure configure will re-run whenever
+# the gcc version number changes.
+if [ "${with_gcc_version_trigger+set}" = set ]; then
+ gcc_version_trigger="$with_gcc_version_trigger"
+ gcc_version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < ${with_gcc_version_trigger}`
+else
+ # If gcc's sources are available, define the trigger file.
+ if [ -f ${topsrcdir}/gcc/version.c ] ; then
+ gcc_version_trigger=${topsrcdir}/gcc/version.c
+ gcc_version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < ${gcc_version_trigger}`
+ case "$arguments" in
+ *--with-gcc-version-trigger=$gcc_version_trigger* )
+ ;;
+ * )
+ # Make sure configure.in knows about this.
+ arguments="--with-gcc-version-trigger=$gcc_version_trigger $arguments"
+ ;;
+ esac
+ withoptions="--with-gcc-version-trigger=$gcc_version_trigger $withoptions"
+ fi
+fi
+
### break up ${srcdir}/configure.in.
case "`grep '^# per\-host:' ${srcdir}/configure.in`" in
"")
@@ -701,33 +725,6 @@ if [ "${program_prefix}" != "" ] ; then
program_transform_name="-e s,^,${program_prefix}, ${program_transform_name}"
fi
-# Check whether --with-gcc-version was given.
-if [ "${with_gcc_version+set}" = set ]; then
- gcc_version="$with_gcc_version"
-else
- if [ "${srcdir}" = "." ] ; then
- if [ "${with_target_subdir}" != "." ] ; then
- topsrcdir=${with_multisrctop}../..
- else
- topsrcdir=${with_multisrctop}..
- fi
- else
- case ${srcdir} in
- */*/* ) # Need to do this only in subdirectories.
- topsrcdir=${srcdir}/..
- ;;
- * ) # We are already in the topsrcdir.
- topsrcdir=${srcdir}
- ;;
- esac
- fi
- # If gcc's sources are available, extract its version number which is used by
- # $libsubdir.
- if [ -f ${topsrcdir}/gcc/version.c ] ; then
- gcc_version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < ${topsrcdir}/gcc/version.c`
- fi
-fi
-
# If CC and CXX are not set in the environment, and the Makefile
# exists, try to extract them from it. This is to handle running
# ./config.status by hand.
@@ -1266,10 +1263,10 @@ EOF
echo enable_version_specific_runtime_libs = ${enable_version_specific_runtime_libs} >> ${Makefile}
fi
- # Emit a macro which is used to build the libsubdir macro where
- # compiler specific stuff can be found/installed.
- # FIXME: This works only if gcc's sources are available in a gcc
- # subdirectory!
+ # Emit a macro which describes the file containing gcc's
+ # version number.
+ echo gcc_version_trigger = ${gcc_version_trigger} >> ${Makefile}
+ # And emit a macro defining gcc's version number.
echo gcc_version = ${gcc_version} >> ${Makefile}
# reset prefix, exec_prefix, srcdir, SUBDIRS, NONSUBDIRS,
@@ -1478,7 +1475,7 @@ if [ -z "${norecursion}" -a -n "${configdirs}" ] ; then
if [ ! -z "${recprog}" ] ; then
if eval ${config_shell} ${recprog} ${verbose} ${buildopt} --host=${host_alias} --target=${target_alias} \
${prefixoption} ${tmpdiroption} ${exec_prefixoption} \
- ${srcdiroption} ${program_prefixoption} ${program_suffixoption} ${program_transform_nameoption} ${site_option} --with-gcc-version=${gcc_version} ${withoptions} ${withoutoptions} ${enableoptions} ${disableoptions} ${floating_pointoption} ${cache_file_option} ${removing} ${other_options} ${redirect} ; then
+ ${srcdiroption} ${program_prefixoption} ${program_suffixoption} ${program_transform_nameoption} ${site_option} ${withoptions} ${withoutoptions} ${enableoptions} ${disableoptions} ${floating_pointoption} ${cache_file_option} ${removing} ${other_options} ${redirect} ; then
true
else
echo Configure in `pwd` failed, exiting. 1>&2
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index dab02f6..f8b3b74 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -245,7 +245,10 @@ lang_specs_files=@lang_specs_files@
lang_options_files=@lang_options_files@
GCC_THREAD_FILE=@thread_file@
GTHREAD_FLAGS=@gthread_flags@
-version=@version@
+# Be prepared for gcc2 merges.
+gcc_version=@gcc_version@
+gcc_version_trigger=@gcc_version_trigger@
+version=$(gcc_version)
mainversion=`sed -e 's/.*\"\([0-9]*\.[0-9]*\).*/\1/' < $(srcdir)/version.c`
# Common prefix for installation directories.
diff --git a/gcc/configure b/gcc/configure
index eb6c427c..7448427 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -4969,8 +4969,13 @@ if [ x$host_truncate_target != x ]; then
target=`echo $target | sed -e 's/\(..............\).*/\1/'`
fi
-# Get the version number from the toplevel
-version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < ${srcdir}/version.c`
+# Get the version trigger filename from the toplevel
+if [ "${with_gcc_version_trigger+set}" = set ]; then
+ gcc_version_trigger=$with_gcc_version_trigger
+else
+ gcc_version_trigger=${srcdir}/version.c
+fi
+gcc_version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < ${gcc_version_trigger}`
# Get an absolute path to the GCC top-level source directory
holddir=`pwd`
@@ -5134,7 +5139,7 @@ fi
# Figure out what assembler alignment features are present.
echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6
-echo "configure:5138: checking assembler alignment features" >&5
+echo "configure:5143: checking assembler alignment features" >&5
gcc_cv_as=
gcc_cv_as_alignment_features=
if [ -x as$host_exeext ]; then
@@ -5425,6 +5430,7 @@ ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xma
+
# Echo that links are built
if [ x$host = x$target ]
then
@@ -5662,7 +5668,8 @@ s%@host_xm_file_list@%$host_xm_file_list%g
s%@lang_specs_files@%$lang_specs_files%g
s%@lang_options_files@%$lang_options_files%g
s%@thread_file@%$thread_file%g
-s%@version@%$version%g
+s%@gcc_version@%$gcc_version%g
+s%@gcc_version_trigger@%$gcc_version_trigger%g
s%@local_prefix@%$local_prefix%g
s%@gxx_include_dir@%$gxx_include_dir%g
s%@fixincludes@%$fixincludes%g
@@ -5909,7 +5916,8 @@ host_xmake_file='${host_xmake_file}'
dep_tmake_file='${dep_tmake_file}'
tmake_file='${tmake_file}'
thread_file='${thread_file}'
-version='${version}'
+gcc_version='${gcc_version}'
+gcc_version_trigger='${gcc_version_trigger}'
local_prefix='${local_prefix}'
build_install_headers_dir='${build_install_headers_dir}'
build_exeext='${build_exeext}'
diff --git a/gcc/configure.in b/gcc/configure.in
index 6667857..731b8fd 100644
--- a/gcc/configure.in
+++ b/gcc/configure.in
@@ -3125,8 +3125,13 @@ if [[ x$host_truncate_target != x ]]; then
target=`echo $target | sed -e 's/\(..............\).*/\1/'`
fi
-# Get the version number from the toplevel
-version=`sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/' < ${srcdir}/version.c`
+# Get the version trigger filename from the toplevel
+if [[ "${with_gcc_version_trigger+set}" = set ]]; then
+ gcc_version_trigger=$with_gcc_version_trigger
+else
+ gcc_version_trigger=${srcdir}/version.c
+fi
+gcc_version=`sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/' < ${gcc_version_trigger}`
# Get an absolute path to the GCC top-level source directory
holddir=`pwd`
@@ -3551,7 +3556,8 @@ AC_SUBST(host_xm_file_list)
AC_SUBST(lang_specs_files)
AC_SUBST(lang_options_files)
AC_SUBST(thread_file)
-AC_SUBST(version)
+AC_SUBST(gcc_version)
+AC_SUBST(gcc_version_trigger)
AC_SUBST(local_prefix)
AC_SUBST(gxx_include_dir)
AC_SUBST(fixincludes)
@@ -3654,7 +3660,8 @@ host_xmake_file='${host_xmake_file}'
dep_tmake_file='${dep_tmake_file}'
tmake_file='${tmake_file}'
thread_file='${thread_file}'
-version='${version}'
+gcc_version='${gcc_version}'
+gcc_version_trigger='${gcc_version_trigger}'
local_prefix='${local_prefix}'
build_install_headers_dir='${build_install_headers_dir}'
build_exeext='${build_exeext}'
diff --git a/libf2c/Makefile.in b/libf2c/Makefile.in
index b3d046bc..e9a027e 100644
--- a/libf2c/Makefile.in
+++ b/libf2c/Makefile.in
@@ -28,6 +28,7 @@ prefix = @prefix@
exec_prefix = @exec_prefix@
target_alias = @target_alias@
gcc_version = @gcc_version@
+gcc_version_trigger = @gcc_version_trigger@
bindir = $(exec_prefix)/bin
libdir = $(exec_prefix)/lib
@@ -193,7 +194,7 @@ ${srcdir}/libU77/configure: ${srcdir}/libU77/configure.in
cd $(srcdir)/libU77 && autoconf && rm -f config.cache
g2c.h Makefile: $(srcdir)/g2c.h.in $(srcdir)/Makefile.in config.status
$(SHELL) config.status
-config.status: $(srcdir)/configure
+config.status: $(srcdir)/configure $(gcc_version_trigger)
$(SHELL) config.status --recheck
info install-info clean-info dvi:
diff --git a/libf2c/configure b/libf2c/configure
index 63163a8..b3e6d50 100755
--- a/libf2c/configure
+++ b/libf2c/configure
@@ -1861,18 +1861,17 @@ test -f libF77/makefile && mv libF77/makefile libF77/makefile.ori
test -f libI77/makefile && mv libI77/makefile libI77/makefile.ori
test -f libU77/makefile && mv libU77/makefile libU77/makefile.ori
-# Get the version number from the toplevel
-if test x${with_gcc_version} = x; then
- # Try to get the version number from a hopefully existing gcc directory.
- if test -d ${srcdir}/../gcc; then
- gcc_version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < ${srcdir}/../gcc/version.c`
- else
- gcc_version=UNKNOWN
- fi
+# Get the version trigger filename from the toplevel
+if [ "${with_gcc_version_trigger+set}" = set ]; then
+ gcc_version_trigger=$with_gcc_version_trigger
+ gcc_version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < ${gcc_version_trigger}`
else
- gcc_version=${with_gcc_version}
+ gcc_version_trigger=
+ gcc_version=UNKNOWN
fi
+
+
ac_aux_dir=
for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
if test -f $ac_dir/install-sh; then
@@ -1920,7 +1919,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:1924: checking host system type" >&5
+echo "configure:1923: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -1941,7 +1940,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6
echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:1945: checking target system type" >&5
+echo "configure:1944: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@@ -1959,7 +1958,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$target" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:1963: checking build system type" >&5
+echo "configure:1962: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -2136,6 +2135,7 @@ s%@CPP@%$CPP%g
s%@F2C_INTEGER@%$F2C_INTEGER%g
s%@F2C_LONGINT@%$F2C_LONGINT%g
s%@gcc_version@%$gcc_version%g
+s%@gcc_version_trigger@%$gcc_version_trigger%g
s%@host@%$host%g
s%@host_alias@%$host_alias%g
s%@host_cpu@%$host_cpu%g
diff --git a/libf2c/configure.in b/libf2c/configure.in
index bd1145f..5dcfb2d 100644
--- a/libf2c/configure.in
+++ b/libf2c/configure.in
@@ -343,18 +343,17 @@ test -f libF77/makefile && mv libF77/makefile libF77/makefile.ori
test -f libI77/makefile && mv libI77/makefile libI77/makefile.ori
test -f libU77/makefile && mv libU77/makefile libU77/makefile.ori
-# Get the version number from the toplevel
-if test x${with_gcc_version} = x; then
- # Try to get the version number from a hopefully existing gcc directory.
- if test -d ${srcdir}/../gcc; then
- gcc_version=`sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/' < ${srcdir}/../gcc/version.c`
- else
- gcc_version=UNKNOWN
- fi
+# Get the version trigger filename from the toplevel
+if [[ "${with_gcc_version_trigger+set}" = set ]]; then
+ gcc_version_trigger=$with_gcc_version_trigger
+ gcc_version=`sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/' < ${gcc_version_trigger}`
else
- gcc_version=${with_gcc_version}
+ gcc_version_trigger=
+ gcc_version=UNKNOWN
fi
+
AC_SUBST(gcc_version)
+AC_SUBST(gcc_version_trigger)
AC_CANONICAL_SYSTEM
AC_SUBST(target_alias)
diff --git a/libio/config.shared b/libio/config.shared
index 7541d22..011263a 100644
--- a/libio/config.shared
+++ b/libio/config.shared
@@ -221,6 +221,7 @@ if [ "${SUBDIRS}" != "" ] ; then
echo >&2 ' "gxx_include_dir=$(gxx_include_dir)" \'
echo >&2 ' "libsubdir=$(libsubdir)" \'
echo >&2 ' "gcc_version=$(gcc_version)" \'
+ echo >&2 ' "gcc_version_trigger=$(gcc_version_trigger)" \'
echo >&2 ' "AR=$(AR)" \'
echo >&2 ' "AR_FLAGS=$(AR_FLAGS)" \'
echo >&2 ' "CC=$(CC)" \'
@@ -449,7 +450,7 @@ echo >&2 'force:'
echo >&2 ''
echo >&2 '# with the gnu make, this is done automatically.'
echo >&2 ''
-echo >&2 'Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)'
+echo >&2 'Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag) $(gcc_version_trigger)'
echo >&2 ' $(SHELL) ./config.status'
echo >&2 ''
echo >&2 '.NOEXPORT:'