[PATCH] ld: Append LDFLAGS to flags variable in default_ld_link

John David Anglin dave.anglin@bell.net
Wed Apr 29 15:57:36 GMT 2026


On 2026-04-28 10:18 p.m., Alan Modra wrote:
> On Mon, Apr 27, 2026 at 11:30:57AM -0400, John David Anglin wrote:
>> ld/ChangeLog:
>>
>> 	* testsuite/lib/ld-lib.exp (default_ld_link): Append
>> 	LDFLAGS to `flags' variable.  Also use the append command
>> 	to append the board flags.
> 
> OK, thanks.

After Maciej's last comments, I had updated the change to remove references
to LDFLAGS from `run_ld_link_tests'.  But after inspecting the following commit
https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=740341b9be657772538f9cf0b563c49798f47b3c
it seemed that LDFLAGS was intentionally not added to the flags variable in default_ld_link.
In that change, checks.exp and a number of other .exp files were updated to pass LDFLAGS
to ld.  Maybe it would be safer to update the .exp files that don't currently pass
LDFLAGS to ld as that seems to be the current practice?

Dave
-- 
John David Anglin  dave.anglin@bell.net


More information about the Binutils mailing list