From fb35d3d8fae4422243d6803c41b5cb4d2f5e5e2a Mon Sep 17 00:00:00 2001 From: David Daney Date: Fri, 16 Dec 2011 06:18:55 +0000 Subject: 2011-12-15 David Daney Nick Clifton * 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. --- ld/testsuite/ld-shared/shared.exp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ld/testsuite/ld-shared') diff --git a/ld/testsuite/ld-shared/shared.exp b/ld/testsuite/ld-shared/shared.exp index 1d25d51..c31ac7d 100644 --- a/ld/testsuite/ld-shared/shared.exp +++ b/ld/testsuite/ld-shared/shared.exp @@ -181,7 +181,9 @@ proc shared_test { progname testname main sh1 sh2 dat args } { pass "$testname" } -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 -- cgit v1.1