Skip to content

Commit

Permalink
Set LC_ALL=C to force English output from ld
Browse files Browse the repository at this point in the history
If the user has a different locale set, ld --version may not contain the
string "GNU ld".

For example, in Italian, ld --version outputs "ld di GNU".

Signed-off-by: Mike Gilbert <floppym@gentoo.org>
  • Loading branch information
floppym authored and frozencemetery committed Jun 27, 2022
1 parent 26ad685 commit 01de743
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/include/workarounds.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
#
# workarounds.mk - workarounds for weird stuff behavior

LD_FLAVOR := $(shell $(LD) --version | grep -E '^(LLD|GNU ld)'|sed 's/ .*//g')
LD_VERSION := $(shell $(LD) --version | grep -E '^(LLD|GNU ld)'|sed 's/.* //')
LD_FLAVOR := $(shell LC_ALL=C $(LD) --version | grep -E '^(LLD|GNU ld)'|sed 's/ .*//g')
LD_VERSION := $(shell LC_ALL=C $(LD) --version | grep -E '^(LLD|GNU ld)'|sed 's/.* //')
# 2.35 is definitely broken and 2.36 seems to work
LD_DASH_T := $(shell \
if [ "x${LD_FLAVOR}" = xLLD ] ; then \
Expand Down

0 comments on commit 01de743

Please sign in to comment.