aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Buettner <kevinb@redhat.com>2002-04-18 21:07:20 +0000
committerKevin Buettner <kevinb@redhat.com>2002-04-18 21:07:20 +0000
commitb03399da1170bc4574ab662c06c54a05f0c50efc (patch)
tree2a24932030a51c56b03ae01e674e2a5c391ed92e
parentb882a66bfcf4a0f0315dc412430a54c53c744c2d (diff)
downloadgdb-b03399da1170bc4574ab662c06c54a05f0c50efc.zip
gdb-b03399da1170bc4574ab662c06c54a05f0c50efc.tar.gz
gdb-b03399da1170bc4574ab662c06c54a05f0c50efc.tar.bz2
* 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.
-rw-r--r--gdb/testsuite/ChangeLog7
-rw-r--r--gdb/testsuite/gdb.base/shlib-call.exp17
2 files changed, 22 insertions, 2 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 9b9d136..f6bdc1b 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,12 @@
2002-04-18 Kevin Buettner <kevinb@redhat.com>
+ * 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.
+
+2002-04-18 Kevin Buettner <kevinb@redhat.com>
+
* gdb.base/cvexpr.c (use): New function.
(main): Invoke use() on all global variables to prevent
some linkers from deleting these otherwise unused symbols.
diff --git a/gdb/testsuite/gdb.base/shlib-call.exp b/gdb/testsuite/gdb.base/shlib-call.exp
index d5336f4..47919be 100644
--- a/gdb/testsuite/gdb.base/shlib-call.exp
+++ b/gdb/testsuite/gdb.base/shlib-call.exp
@@ -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."
}