This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[ld, testsuite, obvious] Append $board_cflags in one more place in ld-unique/unique.exp


On 20/01/17 16:17, Jiong Wang wrote:
There are a few more failures happen on AArch64 bare-metal recently as we
have enabled more elf tests.

As run_ld_link_exec_tests now always use gcc as linker driver, I think it should
start to specify all ccflags as well as ccflags may contain linker options for
example spec file.  There was similar fix before

  https://sourceware.org/ml/binutils/2014-10/msg00184.html

Meanwhile one unique test need to do the same thing.

This patch fixed quite a few failures on aarch64 bare-metal linker testing, no
regression.

OK for master?

2017-01-20  Jiong Wang  <jiong.wang@arm.com>

        * ld/testsuite/lib/ld-lib.exp (run_ld_link_exec_tests): Append
        board_cflags as gcc is used as linker driver.
        * ld/testsuite/ld-unique/unique.exp: Likewise

There is one more place in unique.exp where GCC is used as linker driver, so we
need to append board_cflags there. This is exposed by arm bare-metal linker
testing.

This patch fixed this and no regression on arm-none-eabi bare-metal check-ld
test and arm-none-linux-gnu native check-ld test.

This looks to me is an obvious fix, I will commit it if no objection within 24
hours.

ld/

2017-01-31  Jiong Wang  <jiong.wang@arm.com>

        * testsuite/ld-unique/unique.exp (Could not link a dynamic executable):
        Append $board_cflags to link commands.

diff --git a/ld/testsuite/ld-unique/unique.exp b/ld/testsuite/ld-unique/unique.exp
index f06622f..61c070a 100644
--- a/ld/testsuite/ld-unique/unique.exp
+++ b/ld/testsuite/ld-unique/unique.exp
@@ -197,7 +197,7 @@ if {![ld_link $ld "tmpdir/libunique_shared.so" "-shared tmpdir/unique_shared.o"]
 }
 
 # Create executable NOT containing unique symbol linked against library.
-if {![ld_link $CC "tmpdir/unique_shared_prog" "-Ltmpdir tmpdir/unique_empty.o -Wl,-Bdynamic,-rpath=./tmpdir -lunique_shared"] } {
+if {![ld_link "$CC $board_cflags" "tmpdir/unique_shared_prog" "-Ltmpdir tmpdir/unique_empty.o -Wl,-Bdynamic,-rpath=./tmpdir -lunique_shared"] } {
     fail "Could not link a dynamic executable"
     set fails [expr $fails + 1]
 }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]