diff options
author | Jiong Wang <jiong.wang@arm.com> | 2016-02-26 16:51:33 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2018-03-06 18:25:02 +1030 |
commit | 9a042de8aa72efb96aa0146b75f7afba4200643c (patch) | |
tree | 1234f87eb0420d7a1328f56c0b9653103c400817 | |
parent | 801a3a5eadfa51f0011c4b3e7e70e0eff1990fc0 (diff) | |
download | binutils-gdb-9a042de8aa72efb96aa0146b75f7afba4200643c.tar.gz |
[Testsuite] treate -specs as both cflags & ldflags
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.
-rw-r--r-- | ld/testsuite/ChangeLog | 9 | ||||
-rw-r--r-- | ld/testsuite/lib/ld-lib.exp | 9 |
2 files changed, 17 insertions, 1 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 6fe26fb3655..1cfcb9600be 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,6 +1,15 @@ 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: 2014-10-30 Will Newton <will.newton@linaro.org> * ld-unique/unique.exp: Use a wider glob for matching ARM diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp index ce39a473bdd..71c29ad0a86 100644 --- a/ld/testsuite/lib/ld-lib.exp +++ b/ld/testsuite/lib/ld-lib.exp @@ -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 } |