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)
committerHans van Kranenburg <hans@knorrie.org>
Tue, 23 Aug 2022 11:40:41 +0000 (13:40 +0200)
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/Makefile

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