From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20522 invoked by alias); 2 Jan 2005 06:24:19 -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 20485 invoked from network); 2 Jan 2005 06:24:09 -0000 Received: from unknown (HELO tigers-lfs.local) (202.7.74.40) by sourceware.org with SMTP; 2 Jan 2005 06:24:09 -0000 Received: from gws by tigers-lfs.local with local (Exim 4.22) id 1Ckz9k-00037I-95 for binutils@sources.redhat.com; Sun, 02 Jan 2005 17:24:00 +1100 Date: Sun, 02 Jan 2005 06:24:00 -0000 From: Greg Schafer To: binutils@sources.redhat.com Subject: [PATCH] Re: ld testsuite breaks with latest GCC-4.0 Message-ID: <20050102062400.GA18827@tigers-lfs.nsw.bigpond.net.au> References: <20050102044451.GA24007@tigers-lfs.nsw.bigpond.net.au> <20050102051144.GA8032@nevyn.them.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="UlVJffcvxoiEqYs2" Content-Disposition: inline In-Reply-To: <20050102051144.GA8032@nevyn.them.org> User-Agent: Mutt/1.4.1i X-SW-Source: 2005-01/txt/msg00002.txt.bz2 --UlVJffcvxoiEqYs2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 665 On Sun, Jan 02, 2005 at 12:11:44AM -0500, Daniel Jacobowitz wrote: > On Sun, Jan 02, 2005 at 03:44:51PM +1100, Greg Schafer wrote: > > Clearly, changes will be needed. I'm not sure what the best solution is but > > I have a feeling that it will probably involve: > > > > `gcc -dumpspecs' > > > > but that might have the potential to break older GCC's. Dunno. > > That should work, as far back as I know of. I was just worried that some installations may be using an altered "on disk" specs file. Anyhow, the attached patch makes it work for me on i686-pc-linux-gnu. But it also affects the ia64-*-aix* target but I have no way of testing that. Regards Greg --UlVJffcvxoiEqYs2 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="ld.patch" Content-length: 2246 2005-01-02 Greg Schafer * configure.host: Use "${CC} -dumpspecs" instead of "${CC} --print-file-name=specs" to appease GCC versions >= 4.0. 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 2 Jan 2005 06:03:40 -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 `${CC} -dumpspecs | 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`' ;; @@ -146,7 +146,7 @@ ;; 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_CRT0='-dynamic-linker `${CC} -dumpspecs | egrep "libc.so" | 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`' ;; --UlVJffcvxoiEqYs2--