2011-12-15 David Daney <david.daney@cavium.com>
[deliverable/binutils-gdb.git] / ld / testsuite / ld-elfvers / vers.exp
index d1c2228dc96d59491dd4c64fdd6008f0ca3c2aaf..b8fefb6eae58275b06de9bc4aec77737a8420c64 100644 (file)
@@ -72,7 +72,9 @@ set SOBJDUMP_FLAGS --syms
 set shared "--shared --no-undefined-version"
 set script --version-script
 
-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
@@ -768,8 +770,9 @@ proc build_exec { test source execname flags solibname verexp versymexp symexp }
     pass $test
 }
 
-if [istarget x86_64-*-linux*] {
-    # x86_64 doesn't like non-pic shared libraries
+if { [istarget x86_64-*-linux*] \
+     || ( [istarget mips*-*-linux*] && [at_least_gcc_version 4 3] ) } {
+    # x86_64 and newer MIPS toolchains do not like non-pic shared libraries
     set pic "yes"
 } else {
     set pic "no"
This page took 0.023526 seconds and 4 git commands to generate.