From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14472 invoked by alias); 20 Dec 2002 02:24:04 -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 14422 invoked from network); 20 Dec 2002 02:24:01 -0000 Received: from unknown (HELO mailout5-0.nyroc.rr.com) (24.92.226.169) by 209.249.29.67 with SMTP; 20 Dec 2002 02:24:01 -0000 Received: from doctormoo (syr-24-24-16-193.twcny.rr.com [24.24.16.193]) by mailout5-0.nyroc.rr.com (8.11.6/RoadRunner 1.20) with ESMTP id gBK2NYF16910; Thu, 19 Dec 2002 21:23:34 -0500 (EST) Received: from neroden by doctormoo with local (Exim 3.36 #1 (Debian)) id 18PCny-0000ck-00; Thu, 19 Dec 2002 21:22:26 -0500 Date: Thu, 19 Dec 2002 18:33:00 -0000 To: gcc-patches@gcc.gnu.org, dj@redhat.com, binutils@sources.redhat.com, gdb-patches@sources.redhat.com Subject: (toplevel patch) Deal with multilib.out. Really. Message-ID: <20021220022225.GA2130@doctormoo> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i From: Nathanael Nerode X-SW-Source: 2002-12/txt/msg00573.txt.bz2 Final version. This is currently being tested to see if it generates any of the known problems generated by previous tries. If it's OK, can I commit it? I should also add multilib.out to a clean target, but I can't stand to even think about it tonight. * Makefile.tpl: There is only one multilib.out. Rebuild it with move-if-change. * Makefile.in: Regenerate. * configure.in: Remove unneeded stuff. Index: Makefile.tpl =================================================================== RCS file: /cvs/gcc/gcc/Makefile.tpl,v retrieving revision 1.21 diff -u -r1.21 Makefile.tpl --- Makefile.tpl 19 Dec 2002 20:23:50 -0000 1.21 +++ Makefile.tpl 20 Dec 2002 02:20:12 -0000 @@ -784,7 +784,6 @@ # built are. TAGS: do-TAGS - # -------------------------------------- # Modules which run on the build machine # -------------------------------------- @@ -968,13 +967,10 @@ maybe-configure-target-[+module+]: configure-target-[+module+]: $(TARGET_SUBDIR)/[+module+]/Makefile -# Don't manually override CC_FOR_TARGET at make time; get it set right -# at configure time. Otherwise multilibs may be wrong. -$(TARGET_SUBDIR)/[+module+]/multilib.out: maybe-all-gcc +# 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+];\ - r=`${PWD}`; export r; \ - echo "Configuring multilibs for [+module+]"; \ - $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/[+module+]/multilib.out 2> /dev/null + 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+];\ @@ -1394,6 +1390,21 @@ # -------------------------------- # Regenerating top level configury # -------------------------------- + +# Multilib.out tells target dirs what multilibs they should build. +# There is really only one copy. We use the 'timestamp' method to +# 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 + @true + +multilib.ts: 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 $(TARGET_SUBDIR)/[+module+]/multilib.out ; \ + echo timestamp > multilib.ts # Rebuilding Makefile.in, using autogen. $(srcdir)/Makefile.in: # $(srcdir)/Makefile.tpl $(srcdir)/Makefile.def Index: configure.in =================================================================== RCS file: /cvs/gcc/gcc/configure.in,v retrieving revision 1.196 diff -u -r1.196 configure.in --- configure.in 19 Dec 2002 20:23:50 -0000 1.196 +++ configure.in 20 Dec 2002 02:20:21 -0000 @@ -1698,12 +1698,6 @@ qqCXX_FOR_TARGET=`echo "$qCXX_FOR_TARGET" | sed -e 's,[$][$],$$$$,g'` qqRAW_CXX_FOR_TARGET=`echo "$qRAW_CXX_FOR_TARGET" | sed -e 's,[$][$],$$$$,g'` -# BASE_CC_FOR_TARGET is the actual program file of CC_FOR_TARGET, -# for use in dependencies. Replace $$r with a relative -# path if it's present. -set dummy $CC_FOR_TARGET; cc_for_target_first_word=$2 -BASE_CC_FOR_TARGET=`echo "$cc_for_target_first_word" | sed -e 's,[$][$]r,.,'` - sedtemp=sed.$$ cat >$sedtemp <