summaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-elfvsb
diff options
context:
space:
mode:
authorDavid Daney <ddaney@avtrex.com>2011-12-16 06:18:52 +0000
committerDavid Daney <ddaney@avtrex.com>2011-12-16 06:18:52 +0000
commitd47e2cd6f5821ab03e7d3cf33a652dddf301cdde (patch)
treeeb942110f0e9fd6335ca64287cc182103aa29df0 /ld/testsuite/ld-elfvsb
parentc4fcb330c4acad4076a40fb117070fe6d714d029 (diff)
downloadbinutils-redhat-d47e2cd6f5821ab03e7d3cf33a652dddf301cdde.tar.gz
2011-12-15 David Daney <david.daney@cavium.com>
Nick Clifton <nickc@redhat.com> * ld-elfvers/vers.exp (picflag): Set to -fpic for mips*-*-* when using GCC-4.3 or later. (pic): Set to "yes" for mips*-*-linux*. * ld-elfvsb/elfvsb.exp: Don't test non-PIC shared libraried on mips*-*-linux*. (picflag): Set to -fpic for mips*-*-* when using GCC-4.3 or later. * ld-elfweak/elfweak.exp (picflag): Set to -fpic for mips*-*-* when using GCC-4.3 or later. * ld-shared/shared.exp (picflag): Same. * lib/ld-lib.exp (at_least_gcc_version): New proc.
Diffstat (limited to 'ld/testsuite/ld-elfvsb')
-rw-r--r--ld/testsuite/ld-elfvsb/elfvsb.exp7
1 files changed, 5 insertions, 2 deletions
diff --git a/ld/testsuite/ld-elfvsb/elfvsb.exp b/ld/testsuite/ld-elfvsb/elfvsb.exp
index 3c6478398c..58bc8f2dca 100644
--- a/ld/testsuite/ld-elfvsb/elfvsb.exp
+++ b/ld/testsuite/ld-elfvsb/elfvsb.exp
@@ -249,7 +249,8 @@ proc visibility_run {visibility} {
set VSBCFLAG ""
}}}}}}}}}
- if { [istarget powerpc*-*-linux*] } {
+ if { [istarget powerpc*-*-linux*] \
+ || ( [istarget mips*-*-linux*] && [at_least_gcc_version 4 3] )} {
# Testing non-PIC libraries is a waste of effort on any target.
# If you don't pass -fpic or -fPIC to gcc, gcc will assume quite
# reasonably that you are not compiling for a shared library.
@@ -453,7 +454,9 @@ proc visibility_run {visibility} {
}}
}
-if [istarget mips*-*-*] {
+# Old version of GCC for MIPS default to enabling -fpic
+# and get confused if it is used on the command line.
+if { [istarget mips*-*-*] && ! [at_least_gcc_version 4 3] } then {
set picflag ""
} else {
# Unfortunately, the gcc argument is -fpic and the cc argument is