Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH RFA] Make gdb.base/shlib-call.exp work for AIX
@ 2002-04-18 13:19 Kevin Buettner
  2002-04-18 13:35 ` Fernando Nasser
  0 siblings, 1 reply; 3+ messages in thread
From: Kevin Buettner @ 2002-04-18 13:19 UTC (permalink / raw)
  To: gdb-patches

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH RFA] Make gdb.base/shlib-call.exp work for AIX
  2002-04-18 13:19 [PATCH RFA] Make gdb.base/shlib-call.exp work for AIX Kevin Buettner
@ 2002-04-18 13:35 ` Fernando Nasser
  2002-04-18 14:12   ` Kevin Buettner
  0 siblings, 1 reply; 3+ messages in thread
From: Fernando Nasser @ 2002-04-18 13:35 UTC (permalink / raw)
  To: Kevin Buettner; +Cc: gdb-patches

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH RFA] Make gdb.base/shlib-call.exp work for AIX
  2002-04-18 13:35 ` Fernando Nasser
@ 2002-04-18 14:12   ` Kevin Buettner
  0 siblings, 0 replies; 3+ messages in thread
From: Kevin Buettner @ 2002-04-18 14:12 UTC (permalink / raw)
  To: Fernando Nasser; +Cc: gdb-patches

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-04-18 21:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-18 13:19 [PATCH RFA] Make gdb.base/shlib-call.exp work for AIX Kevin Buettner
2002-04-18 13:35 ` Fernando Nasser
2002-04-18 14:12   ` Kevin Buettner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox