aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-i386
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2015-07-27 05:15:48 -0700
committerH.J. Lu <hjl.tools@gmail.com>2015-07-27 05:15:48 -0700
commitea9fb8b3e9f9624262984ad402f2aac34c65534d (patch)
tree74e13647e8ac033745c4e9fe91a6f23ffb43eb4b /ld/testsuite/ld-i386
parentfaebca0390ceef085f383d42423e14079dcd0a48 (diff)
downloadgdb-ea9fb8b3e9f9624262984ad402f2aac34c65534d.zip
gdb-ea9fb8b3e9f9624262984ad402f2aac34c65534d.tar.gz
gdb-ea9fb8b3e9f9624262984ad402f2aac34c65534d.tar.bz2
Add $PLT_CFLAGS to -fPIC for run_cc_link_tests
Some x86 linker tests expect PLT. This patch adds $PLT_CFLAGS to -fPIC for run_cc_link_tests. * ld-i386/i386.exp (run_cc_link_tests): Add $PLT_CFLAGS to -fPIC if needed. * ld-x86-64/mpx.exp (run_cc_link_tests): Likewise. * ld-x86-64/x86-64.exp (run_cc_link_tests): Likewise.
Diffstat (limited to 'ld/testsuite/ld-i386')
-rw-r--r--ld/testsuite/ld-i386/i386.exp7
1 files changed, 5 insertions, 2 deletions
diff --git a/ld/testsuite/ld-i386/i386.exp b/ld/testsuite/ld-i386/i386.exp
index 61f9599..0dbdd1e 100644
--- a/ld/testsuite/ld-i386/i386.exp
+++ b/ld/testsuite/ld-i386/i386.exp
@@ -310,6 +310,9 @@ run_dump_test "pr17057"
run_dump_test "pr17935-1"
run_dump_test "pr17935-2"
+# Add $PLT_CFLAGS if PLT is expected.
+global PLT_CFLAGS
+
# Must be Linux native with the C compiler
if { [isnative]
&& [istarget "i?86-*-linux*"]
@@ -342,7 +345,7 @@ if { [isnative]
[list \
"Build libplt-main3.a" \
"" \
- "-fPIC" \
+ "-fPIC $PLT_CFLAGS" \
{ plt-main3.c } \
{{readelf {-Wr} plt-main3.rd}} \
"libplt-main3.a" \
@@ -350,7 +353,7 @@ if { [isnative]
[list \
"Build libplt-main4.a" \
"" \
- "-fPIC" \
+ "-fPIC $PLT_CFLAGS" \
{ plt-main4.c } \
{{readelf {-Wr} plt-main4.rd}} \
"libplt-main4.a" \