From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2747 invoked by alias); 18 Apr 2002 21:12:22 -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 2717 invoked from network); 18 Apr 2002 21:12:20 -0000 Received: from unknown (HELO cygnus.com) (205.180.83.203) by sources.redhat.com with SMTP; 18 Apr 2002 21:12:20 -0000 Received: from romulus.sfbay.redhat.com (romulus.sfbay.redhat.com [172.16.27.251]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id OAA12708; Thu, 18 Apr 2002 14:12:17 -0700 (PDT) Received: (from kev@localhost) by romulus.sfbay.redhat.com (8.11.6/8.11.6) id g3ILBxw09080; Thu, 18 Apr 2002 14:11:59 -0700 Date: Thu, 18 Apr 2002 14:12:00 -0000 From: Kevin Buettner Message-Id: <1020418211159.ZM9079@localhost.localdomain> In-Reply-To: Fernando Nasser "Re: [PATCH RFA] Make gdb.base/shlib-call.exp work for AIX" (Apr 18, 4:32pm) References: <1020418201910.ZM8858@localhost.localdomain> <3CBF2D4B.A2D6F4BC@redhat.com> To: Fernando Nasser Subject: Re: [PATCH RFA] Make gdb.base/shlib-call.exp work for AIX Cc: gdb-patches@sources.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-04/txt/msg00608.txt.bz2 On Apr 18, 4:32pm, Fernando Nasser 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.) I've changed it as you've suggested and committed it. Here's what I committed: * 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 retrieving revision 1.5 diff -u -p -r1.4 -r1.5 --- gdb.base/shlib-call.exp 14 Feb 2002 06:25:18 -0000 1.4 +++ gdb.base/shlib-call.exp 18 Apr 2002 21:07:20 -0000 1.5 @@ -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,15 @@ 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 + && ([istarget "powerpc*-*-aix*"] + || [istarget "rs6000*-*-aix*"] )) } { + set additional_flags "additional_flags=-L${objdir}/${subdir}" +} 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." }