From: Jiong Wang Date: Fri, 26 Feb 2016 16:51:33 +0000 (+0000) Subject: [Testsuite] treate -specs as both cflags & ldflags X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b9dfae3c245cc41f95bc4158e6f656ada65397ca;p=thirdparty%2Fbinutils-gdb.git [Testsuite] treate -specs as both cflags & ldflags Backport from master 2014-11-11 Jiong Wang 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. --- diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 6fe26fb3655..1cfcb9600be 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,12 @@ +2016-02-26 Jiong Wang + + Backport from master: + 2014-11-11 Jiong Wang + + * 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 Backport from master: 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 }