From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12840 invoked by alias); 6 Jan 2005 12:25:13 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 12665 invoked from network); 6 Jan 2005 12:25:01 -0000 Received: from unknown (HELO tigers-lfs.local) (202.7.74.40) by sourceware.org with SMTP; 6 Jan 2005 12:25:01 -0000 Received: from gws by tigers-lfs.local with local (Exim 4.22) id 1CmWhA-0000s4-0F; Thu, 06 Jan 2005 23:24:52 +1100 Date: Thu, 06 Jan 2005 12:25:00 -0000 From: Greg Schafer To: binutils@sources.redhat.com Cc: Jakub Jelinek Subject: Re: [PATCH] Re: ld testsuite breaks with latest GCC-4.0 Message-ID: <20050106122451.GA3339@tigers-lfs.nsw.bigpond.net.au> References: <20050102044451.GA24007@tigers-lfs.nsw.bigpond.net.au> <20050102051144.GA8032@nevyn.them.org> <20050102062400.GA18827@tigers-lfs.nsw.bigpond.net.au> <20050104104326.GR3168@sunsite.mff.cuni.cz> <20050104224730.GA20987@tigers-lfs.nsw.bigpond.net.au> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="nFreZHaLTZJo0R7j" Content-Disposition: inline In-Reply-To: <20050104224730.GA20987@tigers-lfs.nsw.bigpond.net.au> User-Agent: Mutt/1.4.1i X-SW-Source: 2005-01/txt/msg00059.txt.bz2 --nFreZHaLTZJo0R7j Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 761 On Wed, Jan 05, 2005 at 09:47:30AM +1100, Greg Schafer wrote: > On Tue, Jan 04, 2005 at 11:43:26AM +0100, Jakub Jelinek wrote: > > > So, I think the patch should use ${CC} --print-file-name=specs, > > if that prints just specs, it should use ${CC} -dumpspecs, > > otherwise cat the specs file. > > specs=`${CC} --print-file-name=specs` > > { if [ x"$specs" = xspecs ]; then ${CC} -dumpspecs; else cat "$specs"; fi; } \ > > | egrep ... > > Yes. That would seem saner and definitely more robust. I'll try to make a > new patch and test it Here is a new patch that tested out fine for me with gcc-4 and gcc-3.4.3. Nick approved the previous patch, so if this one is also approved, could someone please apply it as I don't have commit priv's. Thanks Greg --nFreZHaLTZJo0R7j Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="ld.patch.new" Content-length: 2313 2005-01-02 Jakub Jelinek Greg Schafer * configure.host (*-*-linux*): Allow HOSTING_CRT0 to handle GCC versions >= 4.0 that don't install a specs file. (ia64-*-aix*): Remove support. Index: ld/configure.host =================================================================== RCS file: /cvs/src/src/ld/configure.host,v retrieving revision 1.36 diff -u -r1.36 configure.host --- ld/configure.host 17 May 2004 19:50:16 -0000 1.36 +++ ld/configure.host 6 Jan 2005 10:17:37 -0000 @@ -33,7 +33,7 @@ ;; *-*-linux*) - HOSTING_CRT0='-dynamic-linker `egrep "ld[^ ]*\.so" \`${CC} --print-file-name=specs\` | sed -e "s,.*-dynamic-linker[ ][ ]*\(.*/ld[^ ]*\.so..\).*,\1,"` `${CC} --print-file-name=crt1.o` `${CC} --print-file-name=crti.o` `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`' + HOSTING_CRT0='-dynamic-linker `specs=\`${CC} --print-file-name=specs\`; { if [ x"$specs" = xspecs ]; then ${CC} -dumpspecs; else cat "$specs"; fi; } | egrep "ld[^ ]*\.so" | sed -e "s,.*-dynamic-linker[ ][ ]*\(.*/ld[^ ]*\.so..\).*,\1,"` `${CC} --print-file-name=crt1.o` `${CC} --print-file-name=crti.o` `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`' HOSTING_LIBS='-L`dirname \`${CC} --print-file-name=libc.so\`` '"$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` `${CC} --print-file-name=crtn.o`' ;; @@ -145,11 +145,6 @@ HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,ld\[^ \]*\*,ld-linux-ia64,g"` ;; -ia64-*-aix*) - HOSTING_CRT0='-dynamic-linker `egrep "libc.so" \`${CC} --print-file-name=specs\` | sed -e "s,.*-dynamic-linker[ ][ ]*\(.*/libc.so..\).*,\1,"` `${CC} --print-file-name=crt1.o` `${CC} --print-file-name=crti.o` `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`' - HOSTING_LIBS='-L`dirname \`${CC} --print-file-name=libc.so\`` '"$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` `${CC} --print-file-name=crtn.o`' - ;; - mips*-sgi-irix4* | mips*-sgi-irix5*) HOSTING_CRT0=/usr/lib/crt1.o HOSTING_LIBS="$HOSTING_LIBS"' /usr/lib/crtn.o' --nFreZHaLTZJo0R7j--