xen/arch/x86: make objdump output user locale agnostic
authorMaximilian Engelhardt <maxi@daemonizer.de>
Thu, 9 Dec 2021 23:23:30 +0000 (00:23 +0100)
committerMaximilian Engelhardt <maxi@daemonizer.de>
Wed, 21 Dec 2022 21:40:24 +0000 (22:40 +0100)
The objdump output is fed to grep, so make sure it doesn't change with
different user locales and break the grep parsing.
This problem was identified while updating xen in Debian and the fix is
needed for generating reproducible builds in varying environments.

Signed-off-by: Maximilian Engelhardt <maxi@daemonizer.de>
xen/arch/x86/arch.mk

index 227d439a45239085100159ace8a7fc70f4d9242d..3b10eb3208b0f58263c7e271f5f3701b1b4a41fc 100644 (file)
@@ -108,7 +108,7 @@ endif
 ifeq ($(XEN_BUILD_PE),y)
 
 # Check if the linker produces fixups in PE by default
-efi-nr-fixups := $(shell $(OBJDUMP) -p $(efi-check).efi | grep '^[[:blank:]]*reloc[[:blank:]]*[0-9][[:blank:]].*DIR64$$' | wc -l)
+efi-nr-fixups := $(shell LC_ALL=C $(OBJDUMP) -p $(efi-check).efi | grep '^[[:blank:]]*reloc[[:blank:]]*[0-9][[:blank:]].*DIR64$$' | wc -l)
 
 ifeq ($(efi-nr-fixups),2)
 MKRELOC := :