* gdb.base/shlib-call.exp (additional_flags): AIX doesn't need
authorKevin Buettner <kevinb@redhat.com>
Thu, 18 Apr 2002 21:07:20 +0000 (21:07 +0000)
committerKevin Buettner <kevinb@redhat.com>
Thu, 18 Apr 2002 21:07:20 +0000 (21:07 +0000)
``-fpic'' when compiling files comprising a shared library, but
it does need additional linker flags in order to find shared
libraries at run time.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/shlib-call.exp

index 9b9d1365a3f39029c72c5bc9c7cfb341f12c172a..f6bdc1b6053df295530f291a230c7bb52d8fd38d 100644 (file)
@@ -1,3 +1,10 @@
+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.
index d5336f46b788ddf5c7ad7d94e894a58f37eaf475..47919be4c03f9d898decb9064dbcb88f910dadad 100644 (file)
@@ -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."
 }