summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2022-06-27 15:12:24 -0400
committerMike Gilbert <floppym@gentoo.org>2022-06-27 15:12:24 -0400
commit119e2da03535900226fede22f92ce061f3a55a98 (patch)
tree70966c89ef06dfe328593b931c56d601bfec4923 /sys-libs/efivar
parentdev-python/moto: add 3.1.16 (diff)
downloadgentoo-119e2da03535900226fede22f92ce061f3a55a98.tar.gz
gentoo-119e2da03535900226fede22f92ce061f3a55a98.tar.bz2
gentoo-119e2da03535900226fede22f92ce061f3a55a98.zip
sys-libs/efivar: fix build with non-English locale
Closes: https://bugs.gentoo.org/854147 Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'sys-libs/efivar')
-rw-r--r--sys-libs/efivar/efivar-38.ebuild1
-rw-r--r--sys-libs/efivar/files/efivar-38-ld-locale.patch30
2 files changed, 31 insertions, 0 deletions
diff --git a/sys-libs/efivar/efivar-38.ebuild b/sys-libs/efivar/efivar-38.ebuild
index f753fbea6e4e..eecc85f7cbca 100644
--- a/sys-libs/efivar/efivar-38.ebuild
+++ b/sys-libs/efivar/efivar-38.ebuild
@@ -33,6 +33,7 @@ src_prepare() {
"${FILESDIR}"/efivar-38-march-native.patch
"${FILESDIR}"/efivar-38-Makefile-dep.patch
"${FILESDIR}"/efivar-38-binutils-2.36.patch
+ "${FILESDIR}"/efivar-38-ld-locale.patch
)
default
}
diff --git a/sys-libs/efivar/files/efivar-38-ld-locale.patch b/sys-libs/efivar/files/efivar-38-ld-locale.patch
new file mode 100644
index 000000000000..b1dd699a4461
--- /dev/null
+++ b/sys-libs/efivar/files/efivar-38-ld-locale.patch
@@ -0,0 +1,30 @@
+From 01de7438520868650bfaa1ef3e2bfaf00cacbcc6 Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Fri, 24 Jun 2022 17:00:33 -0400
+Subject: [PATCH] Set LC_ALL=C to force English output from ld
+
+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>
+---
+ src/include/workarounds.mk | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/include/workarounds.mk b/src/include/workarounds.mk
+index 143e7902..b72fbaf6 100644
+--- a/src/include/workarounds.mk
++++ b/src/include/workarounds.mk
+@@ -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 \