You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `LDFLAGS` variable was initially cleared by commit c4d84aa in
2009, and reverted in commit 21a6e1f later that year, but the
revert was reverted one day later in commit 937358e; the edit war
continued another day later with another revert by commit
477649c, but was reverted again on the same day by commit
1645041
The reverts (don't clear) were documented:
"unsetting LIBS and LDFLAGS just makes it impossible to specify
LDFLAGS from the environment"
... but none of the "unset LDFLAGS" commits had any explanation in the
commit message.
Clearing `LDFLAGS` obviously breaks a feature that is documented by
`./configure --help`:
"Some influential environment variables:
[...]
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
nonstandard directory <lib dir>"
This feature is used by several CI scripts, e.g. `.cirrus.yml`,
`.github/actions/configure-x32/action.yml` and
`.github/nightly_matrix.php` - but there, it didn't ever work.
Apparently, nobody ever noticed this.
Unlike the other reverts, this patch keeps the `unset LIBS`, because
the `LIBS` variable had already been copied to `EXTRA_LIBS`. Same for
the last `unset LIBS LDFLAGS` command in line 1374: prior to that,
`LDFLAGS` had already been copied to `EXTRA_LDFLAGS`. Maybe that's
enough to keep people from revert it again and again?
With this patch, I can use the `mold` linker for the first time by
simply doing `./configure .... LDFLAGS="-fuse-ld=mold"`.
0 commit comments