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

Project / Subsystem

binutils / ld

Date

2026-04-30

Proposer

Alan Modra <amodra@gmail.com>

Source type

public_inbox

Consensus

Proposed

Sentiment

/10

Technical tradeoffs

  • Convenience of automatically including `LDFLAGS` versus explicit control in test scripts.
  • Potential for unexpected behavior if `LDFLAGS` contains flags that conflict with default settings.
  • Reduced verbosity in test scripts if `LDFLAGS` is handled automatically.

All attributes

project
binutils
subsystem
ld
patch_id
discussion_id
afM1J1xjtf7Fbvh7@squeak.grove.modra.org
source_type
public_inbox
title
Re: [PATCH] ld: Append LDFLAGS to flags variable in default_ld_link
headline
ld: Append LDFLAGS to flags variable in default_ld_link
tldr
A patch to append LDFLAGS to the flags variable in default_ld_link is being reconsidered.
proposer
Alan Modra <amodra@gmail.com>
consensus
Proposed
outcome
proposed
sentiment_score
technical_tradeoffs
  • Convenience of automatically including `LDFLAGS` versus explicit control in test scripts.
  • Potential for unexpected behavior if `LDFLAGS` contains flags that conflict with default settings.
  • Reduced verbosity in test scripts if `LDFLAGS` is handled automatically.
series_id
series_role
standalone
series_parts
[]
tags
  • ld
  • linker
  • LDFLAGS
  • build system
  • binutils
bugzilla_url
date
2026-04-30T00:00:00.000Z

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

John David Anglin is revisiting a patch that appends LDFLAGS to the flags variable in default_ld_link within the binutils linker (ld). Alan Modra indicates that the original approach intentionally avoided this, updating .exp files instead, but is open to the change if all ld_link instances should use LDFLAGS, potentially simplifying the configuration by removing redundant LDFLAGS specifications in .exp files.