]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
ld: Append LDFLAGS to flags variable in default_ld_link
authorJohn David Anglin <danglin@gcc.gnu.org>
Thu, 7 May 2026 21:43:54 +0000 (17:43 -0400)
committerJohn David Anglin <danglin@gcc.gnu.org>
Thu, 7 May 2026 21:43:54 +0000 (17:43 -0400)
commit24602a75d1288d0c8832f26c431f7899db7f726d
treeb3fc6686e88f6607e1062e0dd6f5d128404d91ca
parentcca4420639a1390f1fb23286618efbe494987825
ld: Append LDFLAGS to flags variable in default_ld_link

The following change is needed to fix errors trying to load the
milli.a archive for the hppa*64*-*-hpux* target when the host
system isn't hpux.

We need to create a dummy milli.a archive for this target and
append the directory of this archive to LDFLAGS.

This assumes the testsuite takes the LDFLAGS environment variable
into account.  However, some tests in the ld testsuite use the
low-level `ld-link' procedure and it fails to take LDFLAGS into
account.

This change modifies the `default_ld_link' procedure to append
$LDFLAGS to the flags variable and fix the above issue.

This change potentially affects the `alpha*-*-*vms*' target but
currently no tests run for it make direct use of `ld-link'.

Suggested-by: Maciej W. Rozycki <macro@orcam.me.uk>
2026-04-27  John David Anglin  <danglin@gcc.gnu.org>

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.
ld/testsuite/lib/ld-lib.exp