diff --git a/ChangeLog b/ChangeLog index 71be05bd4..dd6e39f44 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2002-12-02 Nathanael Nerode + + * configure: Move gcc_version_trigger stuff from here... + * configure.in: ...to here. + + * configure.in: Separate subconfigure options added by this file from + options given by the user. Add machinery to put args for host + subconfigures into the Makefile. + + * Makefile.tpl: Remove 'vault' targets. + * Makefile.tpl: Reorder and comment dependencies. + * Makefile.in: Regenerate. + 2002-11-28 Geoffrey Keating * configure.in: Move host-specific darwin noconfigdirs into diff --git a/Makefile.in b/Makefile.in index 67c239b49..b591d6294 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1186,7 +1186,7 @@ mail-report-with-warnings.log: warning.log # Installation targets. -.PHONY: install uninstall source-vault binary-vault vault-install +.PHONY: install uninstall install: installdirs @install_host_modules@ @install_target_modules@ install-target: @install_target_modules@ @@ -1194,21 +1194,6 @@ install-target: @install_target_modules@ uninstall: @echo "the uninstall target is not supported in this tree" -source-vault: - $(MAKE) -f ./release/Build-A-Release \ - host=$(host_alias) source-vault - -binary-vault: - $(MAKE) -f ./release/Build-A-Release \ - host=$(host_alias) target=$(target_alias) - -vault-install: - @if [ -f ./release/vault-install ] ; then \ - ./release/vault-install $(host_alias) $(target_alias) ; \ - else \ - true ; \ - fi - .PHONY: install.all install.all: install-no-fixedincludes @if [ -f ./gcc/Makefile ] ; then \ @@ -4968,90 +4953,112 @@ install-gcc: true; \ fi -ALL_GCC = maybe-all-gcc -ALL_GCC_C = $(ALL_GCC) maybe-all-target-newlib maybe-all-target-libgloss -ALL_GCC_CXX = $(ALL_GCC_C) maybe-all-target-libstdc++-v3 +# -------------------------------------- +# Dependencies between different modules +# -------------------------------------- -# This is a list of inter-dependencies among modules. -all-autoconf: maybe-all-m4 maybe-all-texinfo -all-automake: maybe-all-m4 maybe-all-texinfo -all-bfd: maybe-all-libiberty maybe-all-intl -all-binutils: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-flex maybe-all-bison maybe-all-byacc maybe-all-intl -all-bison: maybe-all-texinfo -configure-target-boehm-gc: $(ALL_GCC_C) maybe-configure-target-qthreads -all-dejagnu: maybe-all-tcl maybe-all-expect maybe-all-tk -all-diff: maybe-all-libiberty -configure-target-examples: $(ALL_GCC_C) -all-expect: maybe-all-tcl maybe-all-tk -all-fileutils: maybe-all-libiberty -all-flex: maybe-all-libiberty maybe-all-bison maybe-all-byacc -all-gas: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-intl +# There are two types of dependencies here: 'hard' dependencies, where one +# module simply won't build without the other; and 'soft' dependencies, where +# if the depended-on module is missing, the depending module will do without +# or find a substitute somewhere (perhaps installed). Soft dependencies +# are specified by depending on a 'maybe-' target. If you're not sure, +# it's safer to use a soft dependency. + +# Host modules specific to gcc. all-gcc: maybe-all-libiberty maybe-all-bison maybe-all-byacc maybe-all-binutils maybe-all-gas maybe-all-ld maybe-all-zlib +# This is a slightly kludgy method of getting dependencies on +# all-build-libiberty correct; it would be better to build it every time. +all-gcc: maybe-all-build-libiberty all-bootstrap: maybe-all-libiberty maybe-all-texinfo maybe-all-bison maybe-all-byacc maybe-all-binutils maybe-all-gas maybe-all-ld maybe-all-zlib + +# Host modules specific to gdb. GDB_TK = @GDB_TK@ all-gdb: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-mmalloc maybe-all-readline maybe-all-bison maybe-all-byacc maybe-all-sim $(gdbnlmrequirements) $(GDB_TK) -configure-target-gperf: $(ALL_GCC_CXX) -all-target-gperf: maybe-all-target-libiberty maybe-all-target-libstdc++-v3 -all-gprof: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-intl -all-grep: maybe-all-libiberty -all-gzip: maybe-all-libiberty -all-hello: maybe-all-libiberty -all-itcl: maybe-all-tcl maybe-all-tk -all-ld: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-bison maybe-all-byacc maybe-all-flex maybe-all-intl -configure-target-libgloss: $(ALL_GCC) -all-target-libgloss: maybe-configure-target-newlib -all-libgui: maybe-all-tcl maybe-all-tk maybe-all-itcl -configure-target-libffi: $(ALL_GCC_C) -configure-target-libjava: $(ALL_GCC_C) maybe-configure-target-zlib maybe-configure-target-boehm-gc maybe-configure-target-qthreads maybe-configure-target-libffi -all-target-libjava: maybe-all-fastjar maybe-all-target-zlib maybe-all-target-boehm-gc maybe-all-target-qthreads maybe-all-target-libffi -configure-target-libstdc++-v3: $(ALL_GCC_C) -all-target-libstdc++-v3: maybe-all-target-libiberty -configure-target-libf2c: $(ALL_GCC_C) -all-target-libf2c: maybe-all-target-libiberty -configure-target-libobjc: $(ALL_GCC_C) -all-target-libobjc: maybe-all-target-libiberty -all-m4: maybe-all-libiberty maybe-all-texinfo -all-make: maybe-all-libiberty -configure-target-newlib: $(ALL_GCC) -configure-target-libtermcap: $(ALL_GCC_C) -all-opcodes: maybe-all-bfd maybe-all-libiberty -all-patch: maybe-all-libiberty -all-prms: maybe-all-libiberty -configure-target-qthreads: $(ALL_GCC_C) -all-recode: maybe-all-libiberty -all-sed: maybe-all-libiberty -all-send-pr: maybe-all-prms -all-sid: maybe-all-tcl maybe-all-tk -all-sim: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-readline -all-snavigator: maybe-all-tcl maybe-all-tk maybe-all-itcl maybe-all-tix maybe-all-db maybe-all-grep maybe-all-libgui -all-tar: maybe-all-libiberty -all-tclX: maybe-all-tcl maybe-all-tk -all-tk: maybe-all-tcl -all-texinfo: maybe-all-libiberty -all-tix: maybe-all-tcl maybe-all-tk -configure-target-winsup: $(ALL_GCC_C) -all-target-winsup: maybe-all-target-libiberty maybe-all-target-libtermcap -all-uudecode: maybe-all-libiberty -configure-target-zlib: $(ALL_GCC_C) -all-fastjar: maybe-all-zlib maybe-all-libiberty -configure-target-fastjar: maybe-configure-target-zlib -all-target-fastjar: maybe-all-target-zlib maybe-all-target-libiberty -configure-target-libiberty: $(ALL_GCC_C) install-gdb: maybe-install-tcl maybe-install-tk maybe-install-itcl maybe-install-tix maybe-install-libgui -install-sid: maybe-install-tcl maybe-install-tk +all-libgui: maybe-all-tcl maybe-all-tk maybe-all-itcl +# Host modules specific to binutils. +all-bfd: maybe-all-libiberty maybe-all-intl +all-binutils: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-flex maybe-all-bison maybe-all-byacc maybe-all-intl # We put install-opcodes before install-binutils because the installed # binutils might be on PATH, and they might need the shared opcodes # library. install-binutils: maybe-install-opcodes +all-gas: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-intl +all-gprof: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-intl +all-ld: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-bison maybe-all-byacc maybe-all-flex maybe-all-intl +all-opcodes: maybe-all-bfd maybe-all-libiberty +# Other host modules in the 'src' repository. +all-dejagnu: maybe-all-tcl maybe-all-expect maybe-all-tk +all-expect: maybe-all-tcl maybe-all-tk +all-itcl: maybe-all-tcl maybe-all-tk # We put install-tcl before install-itcl because itcl wants to run a # program on installation which uses the Tcl libraries. install-itcl: maybe-install-tcl +all-sid: maybe-all-tcl maybe-all-tk +install-sid: maybe-install-tcl maybe-install-tk +all-sim: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-readline +all-tk: maybe-all-tcl +all-tix: maybe-all-tcl maybe-all-tk +all-texinfo: maybe-all-libiberty -# This is a slightly kludgy method of getting dependencies on -# all-build-libiberty correct; it would be better to build it every time. -all-gcc: maybe-all-build-libiberty +# Other host modules. Warning, these are not well tested. +all-autoconf: maybe-all-m4 maybe-all-texinfo +all-automake: maybe-all-m4 maybe-all-texinfo +all-bison: maybe-all-texinfo +all-diff: maybe-all-libiberty +all-fastjar: maybe-all-zlib maybe-all-libiberty +all-fileutils: maybe-all-libiberty +all-flex: maybe-all-libiberty maybe-all-bison maybe-all-byacc +all-grep: maybe-all-libiberty +all-gzip: maybe-all-libiberty +all-hello: maybe-all-libiberty +all-m4: maybe-all-libiberty maybe-all-texinfo +all-make: maybe-all-libiberty +all-patch: maybe-all-libiberty +all-prms: maybe-all-libiberty +all-recode: maybe-all-libiberty +all-sed: maybe-all-libiberty +all-send-pr: maybe-all-prms +all-snavigator: maybe-all-tcl maybe-all-tk maybe-all-itcl maybe-all-tix maybe-all-db maybe-all-grep maybe-all-libgui +all-tar: maybe-all-libiberty +all-tclX: maybe-all-tcl maybe-all-tk +all-uudecode: maybe-all-libiberty + +ALL_GCC = maybe-all-gcc +ALL_GCC_C = $(ALL_GCC) maybe-all-target-newlib maybe-all-target-libgloss +ALL_GCC_CXX = $(ALL_GCC_C) maybe-all-target-libstdc++-v3 + +# Target modules specific to gcc. +configure-target-boehm-gc: $(ALL_GCC_C) maybe-configure-target-qthreads +configure-target-fastjar: maybe-configure-target-zlib +all-target-fastjar: maybe-all-target-zlib maybe-all-target-libiberty +configure-target-libf2c: $(ALL_GCC_C) +all-target-libf2c: maybe-all-target-libiberty +configure-target-libffi: $(ALL_GCC_C) +configure-target-libjava: $(ALL_GCC_C) maybe-configure-target-zlib maybe-configure-target-boehm-gc maybe-configure-target-qthreads maybe-configure-target-libffi +all-target-libjava: maybe-all-fastjar maybe-all-target-zlib maybe-all-target-boehm-gc maybe-all-target-qthreads maybe-all-target-libffi +configure-target-libobjc: $(ALL_GCC_C) +all-target-libobjc: maybe-all-target-libiberty +configure-target-libstdc++-v3: $(ALL_GCC_C) +all-target-libstdc++-v3: maybe-all-target-libiberty +configure-target-zlib: $(ALL_GCC_C) + +# Target modules in the 'src' repository. +configure-target-examples: $(ALL_GCC_C) +configure-target-libgloss: $(ALL_GCC) +all-target-libgloss: maybe-configure-target-newlib +configure-target-libiberty: $(ALL_GCC_C) +configure-target-libtermcap: $(ALL_GCC_C) +configure-target-newlib: $(ALL_GCC) +configure-target-winsup: $(ALL_GCC_C) +all-target-winsup: maybe-all-target-libiberty maybe-all-target-libtermcap + +# Other target modules. Warning, these are not well tested. +configure-target-gperf: $(ALL_GCC_CXX) +all-target-gperf: maybe-all-target-libiberty maybe-all-target-libstdc++-v3 +configure-target-qthreads: $(ALL_GCC_C) # Dependencies of all-build-foo on configure-build-foo. all-build-libiberty: configure-build-libiberty diff --git a/Makefile.tpl b/Makefile.tpl index af1b9133f..f505ae63a 100644 --- a/Makefile.tpl +++ b/Makefile.tpl @@ -729,7 +729,7 @@ mail-report-with-warnings.log: warning.log # Installation targets. -.PHONY: install uninstall source-vault binary-vault vault-install +.PHONY: install uninstall install: installdirs @install_host_modules@ @install_target_modules@ install-target: @install_target_modules@ @@ -737,21 +737,6 @@ install-target: @install_target_modules@ uninstall: @echo "the uninstall target is not supported in this tree" -source-vault: - $(MAKE) -f ./release/Build-A-Release \ - host=$(host_alias) source-vault - -binary-vault: - $(MAKE) -f ./release/Build-A-Release \ - host=$(host_alias) target=$(target_alias) - -vault-install: - @if [ -f ./release/vault-install ] ; then \ - ./release/vault-install $(host_alias) $(target_alias) ; \ - else \ - true ; \ - fi - .PHONY: install.all install.all: install-no-fixedincludes @if [ -f ./gcc/Makefile ] ; then \ @@ -1172,90 +1157,112 @@ install-gcc: true; \ fi -ALL_GCC = maybe-all-gcc -ALL_GCC_C = $(ALL_GCC) maybe-all-target-newlib maybe-all-target-libgloss -ALL_GCC_CXX = $(ALL_GCC_C) maybe-all-target-libstdc++-v3 +# -------------------------------------- +# Dependencies between different modules +# -------------------------------------- -# This is a list of inter-dependencies among modules. -all-autoconf: maybe-all-m4 maybe-all-texinfo -all-automake: maybe-all-m4 maybe-all-texinfo -all-bfd: maybe-all-libiberty maybe-all-intl -all-binutils: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-flex maybe-all-bison maybe-all-byacc maybe-all-intl -all-bison: maybe-all-texinfo -configure-target-boehm-gc: $(ALL_GCC_C) maybe-configure-target-qthreads -all-dejagnu: maybe-all-tcl maybe-all-expect maybe-all-tk -all-diff: maybe-all-libiberty -configure-target-examples: $(ALL_GCC_C) -all-expect: maybe-all-tcl maybe-all-tk -all-fileutils: maybe-all-libiberty -all-flex: maybe-all-libiberty maybe-all-bison maybe-all-byacc -all-gas: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-intl +# There are two types of dependencies here: 'hard' dependencies, where one +# module simply won't build without the other; and 'soft' dependencies, where +# if the depended-on module is missing, the depending module will do without +# or find a substitute somewhere (perhaps installed). Soft dependencies +# are specified by depending on a 'maybe-' target. If you're not sure, +# it's safer to use a soft dependency. + +# Host modules specific to gcc. all-gcc: maybe-all-libiberty maybe-all-bison maybe-all-byacc maybe-all-binutils maybe-all-gas maybe-all-ld maybe-all-zlib +# This is a slightly kludgy method of getting dependencies on +# all-build-libiberty correct; it would be better to build it every time. +all-gcc: maybe-all-build-libiberty all-bootstrap: maybe-all-libiberty maybe-all-texinfo maybe-all-bison maybe-all-byacc maybe-all-binutils maybe-all-gas maybe-all-ld maybe-all-zlib + +# Host modules specific to gdb. GDB_TK = @GDB_TK@ all-gdb: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-mmalloc maybe-all-readline maybe-all-bison maybe-all-byacc maybe-all-sim $(gdbnlmrequirements) $(GDB_TK) -configure-target-gperf: $(ALL_GCC_CXX) -all-target-gperf: maybe-all-target-libiberty maybe-all-target-libstdc++-v3 -all-gprof: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-intl -all-grep: maybe-all-libiberty -all-gzip: maybe-all-libiberty -all-hello: maybe-all-libiberty -all-itcl: maybe-all-tcl maybe-all-tk -all-ld: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-bison maybe-all-byacc maybe-all-flex maybe-all-intl -configure-target-libgloss: $(ALL_GCC) -all-target-libgloss: maybe-configure-target-newlib -all-libgui: maybe-all-tcl maybe-all-tk maybe-all-itcl -configure-target-libffi: $(ALL_GCC_C) -configure-target-libjava: $(ALL_GCC_C) maybe-configure-target-zlib maybe-configure-target-boehm-gc maybe-configure-target-qthreads maybe-configure-target-libffi -all-target-libjava: maybe-all-fastjar maybe-all-target-zlib maybe-all-target-boehm-gc maybe-all-target-qthreads maybe-all-target-libffi -configure-target-libstdc++-v3: $(ALL_GCC_C) -all-target-libstdc++-v3: maybe-all-target-libiberty -configure-target-libf2c: $(ALL_GCC_C) -all-target-libf2c: maybe-all-target-libiberty -configure-target-libobjc: $(ALL_GCC_C) -all-target-libobjc: maybe-all-target-libiberty -all-m4: maybe-all-libiberty maybe-all-texinfo -all-make: maybe-all-libiberty -configure-target-newlib: $(ALL_GCC) -configure-target-libtermcap: $(ALL_GCC_C) -all-opcodes: maybe-all-bfd maybe-all-libiberty -all-patch: maybe-all-libiberty -all-prms: maybe-all-libiberty -configure-target-qthreads: $(ALL_GCC_C) -all-recode: maybe-all-libiberty -all-sed: maybe-all-libiberty -all-send-pr: maybe-all-prms -all-sid: maybe-all-tcl maybe-all-tk -all-sim: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-readline -all-snavigator: maybe-all-tcl maybe-all-tk maybe-all-itcl maybe-all-tix maybe-all-db maybe-all-grep maybe-all-libgui -all-tar: maybe-all-libiberty -all-tclX: maybe-all-tcl maybe-all-tk -all-tk: maybe-all-tcl -all-texinfo: maybe-all-libiberty -all-tix: maybe-all-tcl maybe-all-tk -configure-target-winsup: $(ALL_GCC_C) -all-target-winsup: maybe-all-target-libiberty maybe-all-target-libtermcap -all-uudecode: maybe-all-libiberty -configure-target-zlib: $(ALL_GCC_C) -all-fastjar: maybe-all-zlib maybe-all-libiberty -configure-target-fastjar: maybe-configure-target-zlib -all-target-fastjar: maybe-all-target-zlib maybe-all-target-libiberty -configure-target-libiberty: $(ALL_GCC_C) install-gdb: maybe-install-tcl maybe-install-tk maybe-install-itcl maybe-install-tix maybe-install-libgui -install-sid: maybe-install-tcl maybe-install-tk +all-libgui: maybe-all-tcl maybe-all-tk maybe-all-itcl +# Host modules specific to binutils. +all-bfd: maybe-all-libiberty maybe-all-intl +all-binutils: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-flex maybe-all-bison maybe-all-byacc maybe-all-intl # We put install-opcodes before install-binutils because the installed # binutils might be on PATH, and they might need the shared opcodes # library. install-binutils: maybe-install-opcodes +all-gas: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-intl +all-gprof: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-intl +all-ld: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-bison maybe-all-byacc maybe-all-flex maybe-all-intl +all-opcodes: maybe-all-bfd maybe-all-libiberty +# Other host modules in the 'src' repository. +all-dejagnu: maybe-all-tcl maybe-all-expect maybe-all-tk +all-expect: maybe-all-tcl maybe-all-tk +all-itcl: maybe-all-tcl maybe-all-tk # We put install-tcl before install-itcl because itcl wants to run a # program on installation which uses the Tcl libraries. install-itcl: maybe-install-tcl +all-sid: maybe-all-tcl maybe-all-tk +install-sid: maybe-install-tcl maybe-install-tk +all-sim: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-readline +all-tk: maybe-all-tcl +all-tix: maybe-all-tcl maybe-all-tk +all-texinfo: maybe-all-libiberty -# This is a slightly kludgy method of getting dependencies on -# all-build-libiberty correct; it would be better to build it every time. -all-gcc: maybe-all-build-libiberty +# Other host modules. Warning, these are not well tested. +all-autoconf: maybe-all-m4 maybe-all-texinfo +all-automake: maybe-all-m4 maybe-all-texinfo +all-bison: maybe-all-texinfo +all-diff: maybe-all-libiberty +all-fastjar: maybe-all-zlib maybe-all-libiberty +all-fileutils: maybe-all-libiberty +all-flex: maybe-all-libiberty maybe-all-bison maybe-all-byacc +all-grep: maybe-all-libiberty +all-gzip: maybe-all-libiberty +all-hello: maybe-all-libiberty +all-m4: maybe-all-libiberty maybe-all-texinfo +all-make: maybe-all-libiberty +all-patch: maybe-all-libiberty +all-prms: maybe-all-libiberty +all-recode: maybe-all-libiberty +all-sed: maybe-all-libiberty +all-send-pr: maybe-all-prms +all-snavigator: maybe-all-tcl maybe-all-tk maybe-all-itcl maybe-all-tix maybe-all-db maybe-all-grep maybe-all-libgui +all-tar: maybe-all-libiberty +all-tclX: maybe-all-tcl maybe-all-tk +all-uudecode: maybe-all-libiberty + +ALL_GCC = maybe-all-gcc +ALL_GCC_C = $(ALL_GCC) maybe-all-target-newlib maybe-all-target-libgloss +ALL_GCC_CXX = $(ALL_GCC_C) maybe-all-target-libstdc++-v3 + +# Target modules specific to gcc. +configure-target-boehm-gc: $(ALL_GCC_C) maybe-configure-target-qthreads +configure-target-fastjar: maybe-configure-target-zlib +all-target-fastjar: maybe-all-target-zlib maybe-all-target-libiberty +configure-target-libf2c: $(ALL_GCC_C) +all-target-libf2c: maybe-all-target-libiberty +configure-target-libffi: $(ALL_GCC_C) +configure-target-libjava: $(ALL_GCC_C) maybe-configure-target-zlib maybe-configure-target-boehm-gc maybe-configure-target-qthreads maybe-configure-target-libffi +all-target-libjava: maybe-all-fastjar maybe-all-target-zlib maybe-all-target-boehm-gc maybe-all-target-qthreads maybe-all-target-libffi +configure-target-libobjc: $(ALL_GCC_C) +all-target-libobjc: maybe-all-target-libiberty +configure-target-libstdc++-v3: $(ALL_GCC_C) +all-target-libstdc++-v3: maybe-all-target-libiberty +configure-target-zlib: $(ALL_GCC_C) + +# Target modules in the 'src' repository. +configure-target-examples: $(ALL_GCC_C) +configure-target-libgloss: $(ALL_GCC) +all-target-libgloss: maybe-configure-target-newlib +configure-target-libiberty: $(ALL_GCC_C) +configure-target-libtermcap: $(ALL_GCC_C) +configure-target-newlib: $(ALL_GCC) +configure-target-winsup: $(ALL_GCC_C) +all-target-winsup: maybe-all-target-libiberty maybe-all-target-libtermcap + +# Other target modules. Warning, these are not well tested. +configure-target-gperf: $(ALL_GCC_CXX) +all-target-gperf: maybe-all-target-libiberty maybe-all-target-libstdc++-v3 +configure-target-qthreads: $(ALL_GCC_C) # Dependencies of all-build-foo on configure-build-foo. [+ FOR build_modules +]all-build-[+module+]: configure-build-[+module+] diff --git a/configure b/configure index 465c7032d..9fe331424 100755 --- a/configure +++ b/configure @@ -585,28 +585,6 @@ 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=`grep version_string ${with_gcc_version_trigger} | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'` -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=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'` - 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 "") diff --git a/configure.in b/configure.in index 34f85870d..c2fd28e8f 100644 --- a/configure.in +++ b/configure.in @@ -33,6 +33,30 @@ ############################################################################## +extra_host_args= +# 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=`grep version_string ${with_gcc_version_trigger} | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'` +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=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'` + case "$arguments" in + *--with-gcc-version-trigger=$gcc_version_trigger* ) + ;; + * ) + # Add to all subconfigure arguments: build, host, and target. + arguments="--with-gcc-version-trigger=$gcc_version_trigger $arguments" + ;; + esac + # This will be redundant when we start all subconfigures from the Makefile. + extra_host_args="--with-gcc-version-trigger=$gcc_version_trigger $extra_host_args" + fi +fi + ### To add a new directory to the tree, first choose whether it is a target ### or a host dependent tool. Then put it into the appropriate list ### (library or tools, host or target), doing a dependency sort. For @@ -1189,21 +1213,21 @@ fi if test x${use_gnu_as} = x && echo " ${configdirs} " | grep " gas " > /dev/null 2>&1 ; then with_gnu_as=yes - withoptions="$withoptions --with-gnu-as" + extra_host_args="$extra_host_args --with-gnu-as" fi if test x${use_gnu_ld} = x && echo " ${configdirs} " | grep " ld " > /dev/null 2>&1 ; then with_gnu_ld=yes - withoptions="$withoptions --with-gnu-ld" + extra_host_args="$extra_host_args --with-gnu-ld" fi -# If using newlib, add --with-newlib to the withoptions so that gcc/configure +# If using newlib, add --with-newlib to the extra_host_args so that gcc/configure # can detect this case. if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " target-newlib " > /dev/null 2>&1 ; then with_newlib=yes - withoptions="$withoptions --with-newlib" + extra_host_args="$extra_host_args --with-newlib" fi # We default to --with-shared on platforms where -fpic is meaningless. @@ -1230,13 +1254,13 @@ if test x${with_stabs} = x ; then case "${target}" in mips*-*-irix6*o32) with_stabs=yes; - withoptions="${withoptions} --with-stabs" + extra_host_args="${extra_host_args} --with-stabs" ;; mips*-*-irix6*) ;; mips*-*-* | alpha*-*-osf*) with_stabs=yes; - withoptions="${withoptions} --with-stabs" + extra_host_args="${extra_host_args} --with-stabs" ;; esac fi @@ -1245,10 +1269,13 @@ fi # them automatically. case "${host}" in hppa*64*-*-hpux11*) - withoptions="$withoptions -x-libraries=/usr/lib/pa20_64 -x-includes=/usr/X11R6/include" + extra_host_args="$extra_host_args -x-libraries=/usr/lib/pa20_64 -x-includes=/usr/X11R6/include" ;; esac +# This will go away when we start subconfigures from the Makefile. +withoptions="${withoptions} ${extra_host_args}" + # If we aren't going to be using gcc, see if we can extract a definition # of CC from the fragment. # Actually, use the 'pre-extracted' version above. @@ -1422,6 +1449,18 @@ baseargs=`echo "${arguments}" | \ # desired. buildargs="--cache-file=../config.cache --build=${build_alias} --host=${build_alias} ${baseargs}" +# For host modules, accept cache file option, or specification as blank. +case "${cache_file}" in +"") # empty + cache_file_option="" ;; +/* | [A-Za-z]:[\\/]* ) # absolute path + cache_file_option="--cache-file=${cache_file}" ;; +*) # relative path + cache_file_option="--cache-file=../${cache_file}" ;; +esac + +hostargs="${cache_file_option} ${buildopt} --host=${host_alias} --target=${target_alias} ${extra_host_args} ${baseargs}" + targargs=${baseargs} # Passing a --with-cross-host argument lets the target libraries know @@ -1639,6 +1678,7 @@ s%@target_subdir@%${target_subdir}% s%@build_subdir@%${build_subdir}% s%@build_configargs@%${buildargs}% s%@gxx_include_dir@%${gxx_include_dir}% +s%@host_configargs@%${hostargs}% EOF sed -f $sedtemp Makefile > Makefile.tem rm -f Makefile $sedtemp