]> xenbits.xensource.com Git - people/andrewcoop/xen.git/commitdiff
xen/arch/x86: make objdump output user locale agnostic
authorMaximilian Engelhardt <maxi@daemonizer.de>
Mon, 30 Dec 2024 21:00:31 +0000 (22:00 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 30 Dec 2024 21:40:37 +0000 (21:40 +0000)
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>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/arch.mk

index 9dde8a5756f2725b3688fa6a51b6fb20b94f190c..cb47d729911e2ef691afba6a72c42ee610646a25 100644 (file)
@@ -109,7 +109,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 := :