diff mbox series

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

Message ID 5CDECC9F020000780023023C@prv1-mh.provo.novell.com (mailing list archive)
State New, archived
Headers show
Series x86: cover for clang's lack of support of -mpreferred-stack-boundary=<N> | expand

Commit Message

Jan Beulich May 17, 2019, 3 p.m. UTC
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.

Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>

Comments

Andrew Cooper May 17, 2019, 3:11 p.m. UTC | #1
On 17/05/2019 16:00, Jan Beulich wrote:
> 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.
>
> Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
diff mbox series

Patch

--- a/xen/arch/x86/efi/Makefile
+++ b/xen/arch/x86/efi/Makefile
@@ -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