aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-elfweak
diff options
context:
space:
mode:
authorDavid Daney <ddaney@avtrex.com>2011-12-16 06:18:55 +0000
committerDavid Daney <ddaney@avtrex.com>2011-12-16 06:18:55 +0000
commitfb35d3d8fae4422243d6803c41b5cb4d2f5e5e2a (patch)
tree4c7e97bbf53909703c8c15712b562cae69abdabc /ld/testsuite/ld-elfweak
parent083a5534142f4615f9fc4f01a5e9b7be4ef1bee9 (diff)
downloadgdb-fb35d3d8fae4422243d6803c41b5cb4d2f5e5e2a.zip
gdb-fb35d3d8fae4422243d6803c41b5cb4d2f5e5e2a.tar.gz
gdb-fb35d3d8fae4422243d6803c41b5cb4d2f5e5e2a.tar.bz2
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-elfweak')
-rw-r--r--ld/testsuite/ld-elfweak/elfweak.exp4
1 files changed, 3 insertions, 1 deletions
diff --git a/ld/testsuite/ld-elfweak/elfweak.exp b/ld/testsuite/ld-elfweak/elfweak.exp
index 0cc1299..1b60b89 100644
--- a/ld/testsuite/ld-elfweak/elfweak.exp
+++ b/ld/testsuite/ld-elfweak/elfweak.exp
@@ -370,7 +370,9 @@ proc build_exec { test execname objs flags dat dynsymexp symexp} {
pass $test
}
-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