From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31369 invoked by alias); 4 Feb 2002 20:59:28 -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 31255 invoked from network); 4 Feb 2002 20:59:22 -0000 Received: from unknown (HELO rennsau.regent.e-technik.tu-muenchen.de) (129.187.231.63) by sources.redhat.com with SMTP; 4 Feb 2002 20:59:22 -0000 Received: from reaktor.regent.e-technik.tu-muenchen.de (reaktor.regent.e-technik.tu-muenchen.de [129.187.231.170]) by rennsau.regent.e-technik.tu-muenchen.de (8.8.8/8.6.9) with ESMTP id VAA07451 ; Mon, 4 Feb 2002 21:59:21 +0100 (MET) From: "Peter.Schauer" Received: (pes@localhost) by reaktor.regent.e-technik.tu-muenchen.de (8.8.8/8.6.9) id VAA27761 ; Mon, 4 Feb 2002 21:59:19 +0100 (MET) Message-Id: <200202042059.VAA27761@reaktor.regent.e-technik.tu-muenchen.de> Subject: Re: GDB cvs won't build on AIX 4.1 To: ezannoni@redhat.com Date: Mon, 04 Feb 2002 12:59:00 -0000 Cc: ac131313@cygnus.com, aoliva@redhat.com, gdb@sources.redhat.com In-Reply-To: <15454.51522.720684.688328@localhost.redhat.com>; from "Elena Zannoni" at Feb 4, 102 6:48 pm X-Mailer: ELM [version 2.3 PL6] X-SW-Source: 2002-02/txt/msg00087.txt.bz2 -mminimal-toc is only available with gcc, so we might loose again, if someone tries to build GDB with the native compiler. It might be worthwile to add -mminimal-toc if we are using gcc though, for performance reasons. I have not been suggesting to revert the patch, but I was thinking along the lines of (completely untested): # Do this only for native AIX builds # The GNU linker does not understand the -bbigtoc switch, which the # native linker needs. hold_ldflags=$LDFLAGS AC_MSG_CHECKING(for the ld -bbigtoc flag) LDFLAGS="${LDFLAGS} -Wl,-bbigtoc" AC_TRY_LINK(, [int i;], nativeld=yes, nativeld=no) LDFLAGS=$hold_ldflags AC_MSG_RESULT($nativeld) if test $nativeld = yes; then CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-bbigtoc" fi in gdb/configure.in, adapted from a similar Solaris test, which should work for all compiler/linker combinations. > Andrew Cagney writes: > > > On Feb 4, 2002, Andrew Cagney wrote: > > > > > > > > >>> Perhaps we should hard-code the link option -bbigtoc for gdb to > > >>> link properly on AIX? > > > > > > > > >> That was the problem. See gdb/294. > > >> http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gdb&pr=294 > > > > > > > > > Thanks for the pointer. Would it be pointless then to post a patch > > > that detected which version of GCC is in use, and whether the linker > > > it uses accepts -bbigtoc? > > > > > > The oposite! See Peter Schauer's comment - it would solve the problem. > > > > Andrew > > Sorry for the late reply, but there is another way to solve that > problem which is to compile gdb passing the -mminimal-toc option to > gcc. This should be uniformly OK independently of the linker used. > > There are also these options available, but I haven't tried them. > > -mfull-toc > -mno-fp-in-toc > -mno-sum-in-toc > > > FWIW, using the GNU linker and reverting that patch I get this > error: ../../powerpc-ibm-aix4.3.3.0/bin/ld: invalid BFD target > `bigtoc'collect2: ld returned 1 exit status > > Elena -- Peter Schauer pes@regent.e-technik.tu-muenchen.de