From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16586 invoked by alias); 18 Apr 2002 20:35:21 -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 16579 invoked from network); 18 Apr 2002 20:35:21 -0000 Received: from unknown (HELO cygnus.com) (205.180.83.203) by sources.redhat.com with SMTP; 18 Apr 2002 20:35:21 -0000 Received: from redhat.com (romulus.sfbay.redhat.com [172.16.27.251]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id NAA09783; Thu, 18 Apr 2002 13:35:19 -0700 (PDT) Message-ID: <3CBF2D4B.A2D6F4BC@redhat.com> Date: Thu, 18 Apr 2002 13:35:00 -0000 From: Fernando Nasser Organization: Red Hat Canada X-Accept-Language: en MIME-Version: 1.0 To: Kevin Buettner CC: gdb-patches@sources.redhat.com Subject: Re: [PATCH RFA] Make gdb.base/shlib-call.exp work for AIX References: <1020418201910.ZM8858@localhost.localdomain> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2002-04/txt/msg00606.txt.bz2 Kevin Buettner wrote: > > The patch below makes some adjustments to gdb.base/shlib-call.exp so > that it will work for AIX. > > Okay to commit? > Yes, but please simplify the second chunk by making it a single if statement. (Please post the committed patch.) Thanks for the fix. Regards, Fernando > * gdb.base/shlib-call.exp (additional_flags): AIX doesn't need > ``-fpic'' when compiling files comprising a shared library, but > it does need additional linker flags in order to find shared > libraries at run time. > > Index: gdb.base/shlib-call.exp > =================================================================== > RCS file: /cvs/src/src/gdb/testsuite/gdb.base/shlib-call.exp,v > retrieving revision 1.4 > diff -u -p -r1.4 shlib-call.exp > --- gdb.base/shlib-call.exp 14 Feb 2002 06:25:18 -0000 1.4 > +++ gdb.base/shlib-call.exp 18 Apr 2002 20:02:29 -0000 > @@ -70,7 +70,12 @@ if {$gcc_compiled == 0} { > set additional_flags "" > } > } else { > - set additional_flags "additional_flags=-fpic" > + if { ([istarget "powerpc*-*-aix*"] > + || [istarget "rs6000*-*-aix*"]) } { > + set additional_flags "" > + } else { > + set additional_flags "additional_flags=-fpic" > + } > } > > if {[gdb_compile "${srcdir}/${subdir}/${libfile}1.c" "${objdir}/${subdir}/${libfile}1.o" object [list debug $additional_flags]] != ""} { > @@ -93,7 +98,18 @@ if [istarget "hppa*-*-hpux*"] { > gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." > } > } > -if {[gdb_compile "${objdir}/${subdir}/${testfile}.o ${objdir}/${subdir}/${libfile}1.sl ${objdir}/${subdir}/${libfile}2.sl" "${binfile}" executable {debug}] != ""} { > + > +if {$gcc_compiled} { > + if { ([istarget "powerpc*-*-aix*"] > + || [istarget "rs6000*-*-aix*"]) } { > + set additional_flags "additional_flags=-L${objdir}/${subdir}" > + } else { > + set additional_flags "" > + } > +} else { > + set additional_flags "" > +} > +if {[gdb_compile "${objdir}/${subdir}/${testfile}.o ${objdir}/${subdir}/${libfile}1.sl ${objdir}/${subdir}/${libfile}2.sl" "${binfile}" executable [list debug $additional_flags]] != ""} { > gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." > } > -- Fernando Nasser Red Hat Canada Ltd. E-Mail: fnasser@redhat.com 2323 Yonge Street, Suite #300 Toronto, Ontario M4P 2C9