]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[Testsuite] treate -specs as both cflags & ldflags
authorJiong Wang <jiong.wang@arm.com>
Fri, 26 Feb 2016 16:51:33 +0000 (16:51 +0000)
committerAlan Modra <amodra@gmail.com>
Tue, 6 Mar 2018 07:55:02 +0000 (18:25 +1030)
Backport from master
2014-11-11  Jiong Wang <jiong.wang@arm.com>

ld/testsuite/

  * lib/ld-lib.exp (run_ld_link_exec_tests): Append board_cflags if gcc
  driver used as link tool.
  (run_cc_link_exec_tests): Likewise.

ld/testsuite/ChangeLog
ld/testsuite/lib/ld-lib.exp

index 6fe26fb36553bc53d7db6c74b4c219227d1ea765..1cfcb9600be6e40a9d2900aec30d703b64b34049 100644 (file)
@@ -1,3 +1,12 @@
+2016-02-26  Jiong Wang  <jiong.wang@arm.com>
+
+       Backport from master:
+       2014-11-11  Jiong Wang <jiong.wang@arm.com>
+
+       * lib/ld-lib.exp (run_ld_link_exec_tests): Append board_cflags if gcc
+       driver used as link tool.
+       (run_cc_link_exec_tests): Likewise.
+
 2016-02-26  Jiong Wang  <jiong.wang@arm.com>
 
        Backport from master:
index ce39a473bdd9e0a52fb33167f836a61632b6a777..71c29ad0a86290403ecf344e83fb794bf6aeee15 100644 (file)
@@ -1444,6 +1444,13 @@ proc run_cc_link_tests { ldtests } {
     global CXXFLAGS
     global ar
     global exec_output
+    global board_cflags
+
+    if [board_info [target_info name] exists cflags] {
+        set board_cflags " [board_info [target_info name] cflags]"
+    } else {
+       set board_cflags ""
+    }
 
     foreach testitem $ldtests {
        set testname [lindex $testitem 0]
@@ -1500,7 +1507,7 @@ proc run_cc_link_tests { ldtests } {
                set failed 1
            }
        } else {
-           if { ![ld_simple_link $cc_cmd $binfile "-L$srcdir/$subdir $ldflags $objfiles"] } {
+           if { ![ld_simple_link $cc_cmd $binfile "$board_cflags -L$srcdir/$subdir $ldflags $objfiles"] } {
                set failed 1
            }