Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@redhat.com>
To: gdb-patches@sources.redhat.com
Subject: [PATCH RFA] Make gdb.base/shlib-call.exp work for AIX
Date: Thu, 18 Apr 2002 13:19:00 -0000	[thread overview]
Message-ID: <1020418201910.ZM8858@localhost.localdomain> (raw)

The patch below makes some adjustments to gdb.base/shlib-call.exp so
that it will work for AIX.

Okay to commit?

	* 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."
 }
 


             reply	other threads:[~2002-04-18 20:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-18 13:19 Kevin Buettner [this message]
2002-04-18 13:35 ` Fernando Nasser
2002-04-18 14:12   ` Kevin Buettner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1020418201910.ZM8858@localhost.localdomain \
    --to=kevinb@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox