i386: Pass -Wl,-R,tmpdir/-Wl --as-needed to $CC
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 10 Jan 2017 18:54:39 +0000 (10:54 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 10 Jan 2017 18:58:51 +0000 (10:58 -0800)
Since linker tests were changed to use $CC, instead of $LD, we need
to pass -Wl,-R,tmpdir and -Wl,--as-needed to $CC.

* testsuite/ld-i386/i386.exp: Pass -Wl,-R,tmpdir to GCC driver.
* testsuite/ld-i386/tls.exp: Likewise.

ld/ChangeLog
ld/testsuite/ld-i386/i386.exp
ld/testsuite/ld-i386/tls.exp

index 72826b9365808609c8020d2c756619b81c0fc958..ef2c466e1506b6ea281131d1dfa67247f5d17590 100644 (file)
@@ -1,3 +1,9 @@
+2017-01-10  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * testsuite/ld-i386/i386.exp: Pass -Wl,-R,tmpdir and
+       -Wl,--as-needed to $CC.
+       * testsuite/ld-i386/tls.exp: Likewise.
+
 2017-01-10  Nick Clifton  <nickc@redhat.com>
 
        * po/sv.po: Updated Swedish translation.
index e748e8b2d48e2a099ca4831b895b10c922c54e20..973a1106517a033b9c900830fc6b125dc05f590c 100644 (file)
@@ -472,7 +472,7 @@ proc undefined_weak {cflags ldflags} {
     run_ld_link_exec_tests [list \
        [list \
            "Run pr19704" \
-           "$ldflags tmpdir/libpr19704.so -tmpdir" \
+           "$ldflags tmpdir/libpr19704.so -Wl,-R,tmpdir" \
            "" \
            { pr19704a.c } \
            "pr19704" \
@@ -757,7 +757,7 @@ if { [isnative]
        ] \
        [list \
            "Run copyreloc-main with PIE and GOTOFF" \
-           "--as-needed tmpdir/copyreloc-main.o tmpdir/copyreloc-lib.so -pie" \
+           "-Wl,--as-needed tmpdir/copyreloc-main.o tmpdir/copyreloc-lib.so -pie" \
            "" \
            { dummy.s } \
            "copyreloc-main" \
index 3cf183ec4350a3d61dcc45b1cdef9adbb2404ae3..165310494e6101f186ac2fef80c20e845788d50c 100644 (file)
@@ -98,7 +98,7 @@ run_ld_link_exec_tests [list \
     [list \
        "TLS GD/LD -> IE transition without PLT" \
        "tmpdir/tls-main1.o tmpdir/tls-gd1.o tmpdir/tls-ld1.o \
-        tmpdir/libtls-1a.so -tmpdir" \
+        tmpdir/libtls-1a.so -Wl,-R,tmpdir" \
        "" \
        { dummy.s } \
        "tls-1d" \
@@ -107,7 +107,7 @@ run_ld_link_exec_tests [list \
     [list \
        "TLS without PLT (1)" \
        "tmpdir/tls-main1.o \
-        tmpdir/libtls-1a.so tmpdir/libtls-1b.so -tmpdir" \
+        tmpdir/libtls-1a.so tmpdir/libtls-1b.so -Wl,-R,tmpdir" \
        "" \
        { dummy.s } \
        "tls-1e" \
@@ -116,7 +116,7 @@ run_ld_link_exec_tests [list \
     [list \
        "TLS without PLT (2)" \
        "tmpdir/tls-main1.o tmpdir/tls-def1.o \
-        tmpdir/libtls-1b.so -tmpdir" \
+        tmpdir/libtls-1b.so -Wl,-R,tmpdir" \
        "" \
        { dummy.s } \
        "tls-1f" \