|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] xen/x86: fix usage of [[:blank:]] with BSD grep
commit c13335b5c1292e90436746ec04ed0553b688160b
Author: Roger Pau Monne <roger.pau@xxxxxxxxxx>
AuthorDate: Fri Feb 13 14:19:01 2026 +0100
Commit: Roger Pau Monne <roger.pau@xxxxxxxxxx>
CommitDate: Fri Feb 13 16:42:34 2026 +0100
xen/x86: fix usage of [[:blank:]] with BSD grep
BSD grep only recognizes [[:blank:]] as a valid expression when using
extended (modern) regular expressions. Pass -E to the grep call used in
efi-nr-fixups.
Additionally, the return from `wc -l` is space padded on BSD, and hence
the content of efi-nr-fixups is " 2", not plain "2". Strip the
spaces in the Makefile using $(strip ...).
Fixes: 1be65ec4c8bc ('x86/EFI: avoid use of GNU ld's
--disable-reloc-section when possible')
Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
---
xen/arch/x86/arch.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xen/arch/x86/arch.mk b/xen/arch/x86/arch.mk
index 2e06ae2582..37fe65bc13 100644
--- a/xen/arch/x86/arch.mk
+++ b/xen/arch/x86/arch.mk
@@ -100,7 +100,7 @@ endif
ifeq ($(XEN_BUILD_PE),y)
# Check if the linker produces fixups in PE by default
-efi-nr-fixups := $(shell LC_ALL=C $(OBJDUMP) -p $(efi-check).efi | grep
'^[[:blank:]]*reloc[[:blank:]]*[0-9][[:blank:]].*DIR64$$' | wc -l)
+efi-nr-fixups := $(strip $(shell LC_ALL=C $(OBJDUMP) -p $(efi-check).efi |
grep -E '^[[:blank:]]*reloc[[:blank:]]*[0-9][[:blank:]].*DIR64$$' | wc -l))
ifeq ($(efi-nr-fixups),2)
MKRELOC := :
--
generated by git-patchbot for /home/xen/git/xen.git#master
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |