Skip to contentSkip to conversation

x86: cover for clang's lack of support of -mpreferred-stack-boundary=<N>

PATCH In review Jan Beulich 2 participants 2 messages May 17, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: cover for clang's lack of support of -mpreferred-stack-boundary=<N>

While clang supposedly supports -mstack-alignment=<N> instead, I'm not using that alternative here due to being uncertain whether that's indeed an exact equivalent of the gcc option. Only make use of the option entirely conditional for now.

xen/arch/x86/efi/Makefile +2 -1
@@ -7,7 +7,8 @@ boot.init.o: buildid.o
 
 EFIOBJ := boot.init.o compat.o runtime.o
 
-$(EFIOBJ): CFLAGS-stack-boundary := -mpreferred-stack-boundary=4
+$(call cc-option-add,cflags-stack-boundary,CC,-mpreferred-stack-boundary=4)
+$(EFIOBJ): CFLAGS-stack-boundary := $(cflags-stack-boundary)
 
 obj-y := stub.o
 obj-$(XEN_BUILD_EFI) := $(EFIOBJ) relocs-dummy.o

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Jan Beulich

While clang supposedly supports -mstack-alignment=<N> instead, I'm not using that alternative here due to being uncertain whether that's indeed an exact equivalent of the gcc option. Only make use of the option entirely conditional for now.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel