LD/testsuite: Remove $LDFLAGS reference from `run_ld_link_tests'
Patch corrects ld testsuite to avoid double-inclusion of LDFLAGS.
This patch addresses an issue in the binutils linker test suite where the LDFLAGS variable was inadvertently included twice in linker invocations. It corrects a mistake introduced by previous commits and ensures that LDFLAGS are applied only once, preventing regressions and aligning test output with expectations. Testing on hppa64-hp-hpux11.23 showed no regressions.
- proposer
Submits a patch to fix the double-inclusion of LDFLAGS in ld testsuite invocations.
“Fix commit 24602a75d128 ("ld: Append LDFLAGS to flags variable in default_ld_link") and prevent $LDFLAGS from being included twice in LD invocations made via `run_ld_link_tests', effectively reverting that part of commit 740341b9be65 ("Provide dummy libraries for alpha-vms").”
- reviewer
Acknowledges the patch and confirms no regressions were observed during testing.
“Sorry for missing this. I tested on hppa64-hp-hpux11.11 and saw no regressions.”
- reviewer
Approves the patch for merging.
“Please apply.”
Technical Tradeoffs
- Correctness of test suite execution.
- Avoiding redundant linker flags.
In Details
This patch targets the run_ld_link_tests function within binutils' linker test suite. It corrects an issue where the LDFLAGS shell variable was being appended twice to the ld command line, stemming from a combination of commit 24602a75d128 and 740341b9be65. The fix removes a global LDF variable reference and ensures LDFLAGS are correctly handled, preventing redundant flags in test invocations.
- LDFLAGS
- A common environment variable used to pass flags to the linker during the build process.
- ld
- The GNU linker, responsible for combining object files into an executable or library.
- testsuite
- A collection of tests designed to verify the correct functionality of a software package.