From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20599 invoked by alias); 29 Dec 2002 19:04:27 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 20582 invoked from network); 29 Dec 2002 19:04:26 -0000 Received: from unknown (HELO lacrosse.corp.redhat.com) (66.187.233.200) by 209.249.29.67 with SMTP; 29 Dec 2002 19:04:26 -0000 Received: from free.redhat.lsd.ic.unicamp.br (aoliva.cipe.redhat.com [10.0.1.10]) by lacrosse.corp.redhat.com (8.11.6/8.9.3) with ESMTP id gBTJ49Y20118; Sun, 29 Dec 2002 14:04:09 -0500 Received: from free.redhat.lsd.ic.unicamp.br (localhost.localdomain [127.0.0.1]) by free.redhat.lsd.ic.unicamp.br (8.12.6/8.12.6) with ESMTP id gBTJ48Kq030262; Sun, 29 Dec 2002 17:04:08 -0200 Received: (from aoliva@localhost) by free.redhat.lsd.ic.unicamp.br (8.12.6/8.12.6/Submit) id gBTJ47bY030258; Sun, 29 Dec 2002 17:04:07 -0200 To: DJ Delorie , Christian =?iso-8859-1?q?J=F6nsson?= Cc: drow@mvista.com, gcc-patches@gcc.gnu.org, gdb-patches@sources.redhat.com, binutils@sources.redhat.com Subject: Re: (toplevel) Fix dramatic breakage for ordinary crosses (related to program_transform_name) References: <20021228093127.GA455@doctormoo> <20021228163419.GA10686@nevyn.them.org> <20021228175919.GA17177@nevyn.them.org> <20021228185007.GA22186@nevyn.them.org> <200212281859.gBSIxap07606@envy.delorie.com> From: Alexandre Oliva Organization: GCC Team, Red Hat Date: Sun, 29 Dec 2002 18:57:00 -0000 In-Reply-To: Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-SW-Source: 2002-12/txt/msg00748.txt.bz2 --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Content-length: 620 In addition to the patch I posted yesterday, this one introduces documentation for --disable-serial-configure and freinds in the output of configure --help, and removes the nonopt argument from baseargs, so that we don't pass --build=foo --host=foo foo down when the user runs configure foo. Christian Jönsson had run into this bug; this should fix it. Other than the fixes, this patch should not introduce any real changes in behavior. serial configure remains enabled by default. I've tested it with and without the options, and the generated serdep.tmp files was as expected in all cases. I'm checking this in. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=toplev-fixes.patch Content-length: 8783 Index: ChangeLog from Alexandre Oliva * Makefile.tpl (local-distclean): Don't remove... (multilib.ts): ... this. Moved into... (multilib.out): ... this. Don't use sub-make. ($(BUILD_SUBDIR)/[+module+]/Makefile, [+module+]/Makefile, $(TARGET_SUBDIR)/[+module+]/Makefile, gcc/Makefile): Moved into... (configure-build-[+module+], configure-[+module+], configure-target-[+module+], configure-gcc): ... these. Test for Makefile existence. Drop config.status from dependencies. * Makefile.in: Rebuilt. * configure.in: Move gcc-version-trigger to the end of ac_configure_args. Add comments to maybedep.tmp and serdep.tmp. Introduce --disable-serial-configure. Remove nonopt from baseargs, matching and removing corresponding whitespace while at it. * configure: Rebuilt. Index: Makefile.tpl =================================================================== RCS file: /cvs/gcc/gcc/Makefile.tpl,v retrieving revision 1.26 diff -u -p -r1.26 Makefile.tpl --- Makefile.tpl 28 Dec 2002 16:24:47 -0000 1.26 +++ Makefile.tpl 29 Dec 2002 18:47:33 -0000 @@ -641,7 +641,7 @@ local-clean: local-distclean: -rm -f Makefile config.status config.cache mh-frag mt-frag - -rm -f multilib.out multilib.ts multilib.tmp maybedep.tmp serdep.tmp + -rm -f multilib.out multilib.tmp maybedep.tmp serdep.tmp -if [ "$(TARGET_SUBDIR)" != "." ]; then \ rm -rf $(TARGET_SUBDIR); \ else true; fi @@ -789,9 +789,10 @@ TAGS: do-TAGS [+ FOR build_modules +] .PHONY: configure-build-[+module+] maybe-configure-build-[+module+] maybe-configure-build-[+module+]: -configure-build-[+module+]: $(BUILD_SUBDIR)/[+module+]/Makefile -$(BUILD_SUBDIR)/[+module+]/Makefile: config.status - @[ -d $(BUILD_SUBDIR)/[+module+] ] || mkdir $(BUILD_SUBDIR)/[+module+];\ +configure-build-[+module+]: + @test ! -f $(BUILD_SUBDIR)/[+module+]/Makefile || exit 0; \ + [ -d $(BUILD_SUBDIR)/[+module+] ] || \ + mkdir $(BUILD_SUBDIR)/[+module+];\ r=`${PWD}`; export r; \ s=`cd $(srcdir); ${PWD}`; export s; \ AR="$(AR_FOR_BUILD)"; export AR; \ @@ -862,10 +863,9 @@ all-build-[+module+]: configure-build-[+ [+ FOR host_modules +] .PHONY: configure-[+module+] maybe-configure-[+module+] maybe-configure-[+module+]: -configure-[+module+]: [+module+]/Makefile - -[+module+]/Makefile: config.status - @[ -d [+module+] ] || mkdir [+module+]; \ +configure-[+module+]: + @test ! -f [+module+]/Makefile || exit 0; \ + [ -d [+module+] ] || mkdir [+module+]; \ r=`${PWD}`; export r; \ s=`cd $(srcdir); ${PWD}`; export s; \ CC="$(CC)"; export CC; \ @@ -964,15 +964,18 @@ install-[+module+]: installdirs [+ FOR target_modules +] .PHONY: configure-target-[+module+] maybe-configure-target-[+module+] maybe-configure-target-[+module+]: -configure-target-[+module+]: $(TARGET_SUBDIR)/[+module+]/Makefile # There's only one multilib.out. Cleverer subdirs shouldn't need it copied. $(TARGET_SUBDIR)/[+module+]/multilib.out: multilib.out - @[ -d $(TARGET_SUBDIR)/[+module+] ] || mkdir $(TARGET_SUBDIR)/[+module+];\ + @[ -d $(TARGET_SUBDIR)/[+module+] ] || \ + mkdir $(TARGET_SUBDIR)/[+module+]; \ + rm -f $(TARGET_SUBDIR)/[+module+]/Makefile || : ; \ cp multilib.out $(TARGET_SUBDIR)/[+module+]/multilib.out -$(TARGET_SUBDIR)/[+module+]/Makefile: config.status $(TARGET_SUBDIR)/[+module+]/multilib.out - @[ -d $(TARGET_SUBDIR)/[+module+] ] || mkdir $(TARGET_SUBDIR)/[+module+];\ +configure-target-[+module+]: $(TARGET_SUBDIR)/[+module+]/multilib.out + @test ! -f $(TARGET_SUBDIR)/[+module+]/Makefile || exit 0; \ + [ -d $(TARGET_SUBDIR)/[+module+] ] || \ + mkdir $(TARGET_SUBDIR)/[+module+];\ r=`${PWD}`; export r; \ s=`cd $(srcdir); ${PWD}`; export s; \ $(SET_LIB_PATH) \ @@ -1092,10 +1095,9 @@ install-target-[+module+]: installdirs # gcc is the only module which uses GCC_FLAGS_TO_PASS. .PHONY: configure-gcc maybe-configure-gcc maybe-configure-gcc: -configure-gcc: gcc/Makefile - -gcc/Makefile: config.status - @[ -d gcc ] || mkdir gcc; \ +configure-gcc: + @test ! -f gcc/Makefile || exit 0; \ + [ -d gcc ] || mkdir gcc; \ r=`${PWD}`; export r; \ s=`cd $(srcdir); ${PWD}`; export s; \ CC="$(CC)"; export CC; \ @@ -1395,17 +1397,11 @@ configure-target-qthreads: $(ALL_GCC_C) # work around various timestamp bugs on some systems. # We use move-if-change so that it's only considered updated when it # actually changes, because it has to depend on a phony target. -multilib.out: multilib.ts - @if [ -f multilib.out ] ; then : else \ - rm -f multilib.ts; $(MAKE) multilib.ts; \ - fi - -multilib.ts: maybe-all-gcc +multilib.out: maybe-all-gcc @r=`${PWD}`; export r; \ echo "Checking multilib configuration..."; \ $(CC_FOR_TARGET) --print-multi-lib > multilib.tmp 2> /dev/null ; \ $(SHELL) $(srcdir)/move-if-change multilib.tmp multilib.out ; \ - echo timestamp > multilib.ts # Rebuilding Makefile.in, using autogen. AUTOGEN = autogen Index: configure.in =================================================================== RCS file: /cvs/gcc/gcc/configure.in,v retrieving revision 1.202 diff -u -p -r1.202 configure.in --- configure.in 28 Dec 2002 17:57:14 -0000 1.202 +++ configure.in 29 Dec 2002 18:47:37 -0000 @@ -112,7 +112,7 @@ else ;; * ) # Add to all subconfigure arguments: build, host, and target. - ac_configure_args="--with-gcc-version-trigger=$gcc_version_trigger $ac_configure_args" + ac_configure_args="$ac_configure_args --with-gcc-version-trigger=$gcc_version_trigger" ;; esac fi @@ -1686,6 +1686,7 @@ esac # Create the 'maybe dependencies'. This uses a temporary file. rm -f maybedep.tmp +echo '# maybedep.tmp' > maybedep.tmp for item in ${all_build_modules} ${all_host_modules} ${all_target_modules} \ ${install_host_modules} ${install_target_modules} \ ${configure_build_modules} ${configure_host_modules} ${configure_target_modules} \ @@ -1697,45 +1698,61 @@ AC_SUBST_FILE(maybe_dependencies) # Create the serialization dependencies. This uses a temporary file. +AC_ARG_ENABLE([serial-configure], +[ --disable-serial-[{host,target,build}-]configure + Don't force sequential configuration of + sub-packages for the host, target or build + machine, or of any sub-packages at all]) + # These force 'configure's to be done one at a time, to avoid problems # with contention over a shared config.cache. rm -f serdep.tmp +echo '# serdep.tmp' > serdep.tmp olditem= +test "x${enable_serial_configure}" = xno || +test "x${enable_serial_build_configure}" = xno || for item in ${build_configdirs} ; do case ${olditem} in "") ;; - *) echo "\$(BUILD_SUBDIR)/${item}/Makefile: \$(BUILD_SUBDIR)/${olditem}/Makefile" >> serdep.tmp ;; + *) echo "configure-build-${item}: configure-build-${olditem}" >> serdep.tmp ;; esac olditem=${item} done olditem= +test "x${enable_serial_configure}" = xno || +test "x${enable_serial_host_configure}" = xno || for item in ${configdirs} ; do case ${olditem} in "") ;; - *) echo "${item}/Makefile: ${olditem}/Makefile" >> serdep.tmp ;; + *) echo "configure-${item}: configure-${olditem}" >> serdep.tmp ;; esac olditem=${item} done olditem= +test "x${enable_serial_configure}" = xno || +test "x${enable_serial_target_configure}" = xno || for item in ${target_configdirs} ; do case ${olditem} in "") ;; - *) echo "\$(TARGET_SUBDIR)/${item}/Makefile: \$(TARGET_SUBDIR)/${olditem}/Makefile" >> serdep.tmp ;; + *) echo "configure-target-${item}: configure-target-${olditem}" >> serdep.tmp ;; esac olditem=${item} done serialization_dependencies=serdep.tmp AC_SUBST_FILE(serialization_dependencies) -# Base args. Strip norecursion, cache-file, srcdir, host, build, target. -# These are the ones we might not want to pass down to subconfigures. -baseargs=`echo "${ac_configure_args}" | \ - sed -e 's/--no[[^ ]]*//' \ - -e 's/--cache[[a-z-]]*=[[^ ]]*//' \ - -e 's/--sr[[a-z-]]*=[[^ ]]*//' \ - -e 's/--ho[[a-z-]]*=[[^ ]]*//' \ - -e 's/--bu[[a-z-]]*=[[^ ]]*//' \ - -e 's/--ta[[a-z-]]*=[[^ ]]*//'` +# Base args. Strip norecursion, cache-file, srcdir, host, build, +# target and nonopt. These are the ones we might not want to pass +# down to subconfigures. +baseargs=`echo " ${ac_configure_args} " | \ + sed -e 's/ --no[[^ ]]* / /' \ + -e 's/ --cache[[a-z-]]*=[[^ ]]* / /' \ + -e 's/ --sr[[a-z-]]*=[[^ ]]* / /' \ + -e 's/ --ho[[a-z-]]*=[[^ ]]* / /' \ + -e 's/ --bu[[a-z-]]*=[[^ ]]* / /' \ + -e 's/ --ta[[a-z-]]*=[[^ ]]* / /' \ + -e 's/ [[^-][^ ]*] / /' \ + -e 's/^ *//;s/ *$//'` # For the build-side libraries, we just need to pretend we're native, # and not use the same cache file. Multilibs are neither needed nor --=-=-= Content-length: 289 -- Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/ Red Hat GCC Developer aoliva@{redhat.com, gcc.gnu.org} CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org} Free Software Evangelist Professional serial bug killer --=-=-=--