]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
ld: Require GCC 5 or above for 3 x86 tests
authorH.J. Lu <hjl.tools@gmail.com>
Wed, 9 Aug 2017 03:20:43 +0000 (20:20 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Mon, 18 Sep 2017 20:39:23 +0000 (13:39 -0700)
Require GCC 5 or above for 3 x86 tests which fail with GCC 4.9.3.

PR ld/21924
* testsuite/ld-i386/i386.exp: Require GCC 5 or above for
"weakundef1 with PIE" test.
* testsuite/ld-x86-64/tls.exp: Require GCC 5 or above for
"tlsdesc1" and "tlsdesc1 with PIE" tests.

(cherry picked from commit 25d28c91b89d8f4a7e78b98b01e2c2382cea3e60)

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

index 406e72c112520d012f392a97c3f075809566edd4..552f7067be73ba3265826a59366b378c8497a16a 100644 (file)
@@ -1,3 +1,11 @@
+2017-09-18  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR ld/21924
+       * testsuite/ld-i386/i386.exp: Require GCC 5 or above for
+       "weakundef1 with PIE" test.
+       * testsuite/ld-x86-64/tls.exp: Require GCC 5 or above for
+       "tlsdesc1" and "tlsdesc1 with PIE" tests.
+
 2017-09-15  Nick Clifton  <nickc@redhat.com>
 
        2.29.1 Release
index 1734d67a37ff96f6b43dba64a7746cd3eb4db227..1a35a572b23f63be3c6f8518161754ea0dfa0c11 100644 (file)
@@ -1251,16 +1251,20 @@ if { [isnative]
            "pass.out" \
            "$NOPIE_CFLAGS" \
        ] \
-       [list \
-           "Run weakundef1 with PIE" \
-           "-pie" \
-           "" \
-           { weakundef1.c } \
-           "weakundef1pie" \
-           "pass.out" \
-           "-fPIE" \
-       ] \
     ]
+    if { [at_least_gcc_version 5 0] } {
+       run_ld_link_exec_tests [list \
+           [list \
+               "Run weakundef1 with PIE" \
+               "-pie" \
+               "" \
+               { weakundef1.c } \
+               "weakundef1pie" \
+               "pass.out" \
+               "-fPIE" \
+           ] \
+       ]
+    }
 }
 
 if { !([istarget "i?86-*-linux*"]
index 4263d95bd1b779e4faca28759198a0abf7743862..7896451c014f5313ee36cf7dc83f60931836d7e6 100644 (file)
@@ -206,16 +206,30 @@ if { ![check_gnu2_tls_available] } {
     return
 }
 
+if { [at_least_gcc_version 5 0] } {
+    run_ld_link_exec_tests [list \
+       [list \
+           "Run tlsdesc1" \
+           "-Wl,--no-as-needed tmpdir/libtlsdesc1.so" \
+           "" \
+           { tlsdesc1a.c } \
+           "tlsdesc1a" \
+           "pass.out" \
+           "$GNU2_CFLAGS" \
+       ] \
+       [list \
+           "Run tlsdesc1 with PIE" \
+           "-pie -Wl,--no-as-needed tmpdir/libtlsdesc1.so" \
+           "" \
+           { tlsdesc1a.c } \
+           "tlsdesc1c" \
+           "pass.out" \
+           "-fPIE $GNU2_CFLAGS" \
+       ] \
+    ]
+}
+
 run_ld_link_exec_tests [list \
-    [list \
-       "Run tlsdesc1" \
-       "-Wl,--no-as-needed tmpdir/libtlsdesc1.so" \
-       "" \
-       { tlsdesc1a.c } \
-       "tlsdesc1a" \
-       "pass.out" \
-       "$GNU2_CFLAGS" \
-    ] \
     [list \
        "Run tlsdesc1 (-z now)" \
        "-Wl,-z,now -Wl,--no-as-needed tmpdir/libtlsdesc1n.so" \
@@ -225,15 +239,6 @@ run_ld_link_exec_tests [list \
        "pass.out" \
        "$GNU2_CFLAGS" \
     ] \
-    [list \
-       "Run tlsdesc1 with PIE" \
-       "-pie -Wl,--no-as-needed tmpdir/libtlsdesc1.so" \
-       "" \
-       { tlsdesc1a.c } \
-       "tlsdesc1c" \
-       "pass.out" \
-       "-fPIE $GNU2_CFLAGS" \
-    ] \
     [list \
        "Run tlsdesc1 with PIE (-z now)" \
        "-pie -Wl,-z,now -Wl,--no-as-needed tmpdir/libtlsdesc1n.so" \