From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13245 invoked by alias); 13 May 2003 05:26:24 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 13185 invoked from network); 13 May 2003 05:26:23 -0000 Received: from unknown (HELO rwcrmhc52.attbi.com) (216.148.227.88) by sources.redhat.com with SMTP; 13 May 2003 05:26:23 -0000 Received: from lucon.org (12-234-88-5.client.attbi.com[12.234.88.5]) by attbi.com (rwcrmhc52) with ESMTP id <2003051305262205200j467de>; Tue, 13 May 2003 05:26:22 +0000 Received: by lucon.org (Postfix, from userid 1000) id 8689E2C681; Mon, 12 May 2003 22:26:22 -0700 (PDT) Date: Tue, 13 May 2003 05:26:00 -0000 From: "H. J. Lu" To: Jack Howarth Cc: dejagnu@gnu.org, GDB , binutils@sources.redhat.com Subject: PATCH: Fix libgloss.exp Message-ID: <20030512222622.A6116@lucon.org> References: <1052782263.14846.5.camel@debian> <20030512170304.A12732@lucon.org> <1052785142.15751.2.camel@debian> <20030512190210.A14627@lucon.org> <1052792498.6517.1.camel@debian> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="UugvWAfsgieZRqgk" Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <1052792498.6517.1.camel@debian>; from howarth@fuse.net on Mon, May 12, 2003 at 10:21:39PM -0400 X-SW-Source: 2003-05/txt/msg00217.txt.bz2 --UugvWAfsgieZRqgk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 1264 On Mon, May 12, 2003 at 10:21:39PM -0400, Jack Howarth wrote: > HJ, > I can reproduce the problem and you did too. Look in your log... > > /home/hjl/build/binutils/build-ppc-linux/binutils/binutils.log > > Executing on host: gcc -c -o testglue.o > /usr/share/dejagnu/testglue.c (timeout = 300) > Executing on host: gcc > /home/hjl/src/binutils/binutils/binutils/testsuite/binutils-all/testprog.c testglue.o -B/home/hjl/build/binutils/build-i686-linux/binutils/tmpdir/gas/ -Wl,-wrap,exit -Wl,-wrap,main -Wl,-wrap,abort -g -lm -o tmpdir/testprog (timeout = 300) > testglue.o(.text+0x290): In function `__wrap__exit': > : undefined reference to `__real__exit' > collect2: ld returned 1 exit status > compiler exited with status 1 > output is: > testglue.o(.text+0x290): In function `__wrap__exit': > : undefined reference to `__real__exit' > collect2: ld returned 1 exit status > > UNTESTED: simple objcopy of executable > UNTESTED: run objcopy of executable > UNTESTED: run stripped executable > UNTESTED: run stripped executable with saving a symbol > > It is still happening with current binutils cvs. > Another dejagnu 1.4.3 bug. No wonder why many people don't bother with it. Here is a patch. I have no idea if it is a correct fix. H.J. --UugvWAfsgieZRqgk Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="dejagnu-_exit.patch" Content-length: 945 2003-05-12 H.J. Lu * lib/libgloss.exp (build_wrapper): Add -Wl,-wrap,_exit. --- dejagnu/lib/libgloss.exp._exit 2002-08-29 20:53:40.000000000 -0700 +++ dejagnu/lib/libgloss.exp 2003-05-12 22:20:49.000000000 -0700 @@ -818,13 +818,13 @@ proc build_wrapper { gluefile } { set result ""; } elseif [target_info exists uses_underscores] { set flags "additional_flags=-DUNDERSCORES"; - set result "-Wl,-wrap,__exit -Wl,-wrap,_main -Wl,-wrap,_abort"; + set result "-Wl,-wrap,_exit -Wl,-wrap,__exit -Wl,-wrap,_main -Wl,-wrap,_abort"; } else { set flags ""; if [target_info exists is_vxworks] { set flags "additional_flags=-DVXWORKS"; } - set result "-Wl,-wrap,exit -Wl,-wrap,main -Wl,-wrap,abort"; + set result "-Wl,-wrap,exit -Wl,-wrap,_exit -Wl,-wrap,main -Wl,-wrap,abort"; } if [target_info exists wrap_compile_flags] { lappend flags "additional_flags=[target_info wrap_compile_flags]"; --UugvWAfsgieZRqgk--