diff mbox series

[1/1] fix PVH bootable kernel on some compilers

Message ID 20220205054518.3863277-2-iggy@theiggy.com (mailing list archive)
State New, archived
Headers show
Series fix PVH bootable kernel on some compilers | expand

Commit Message

Iggy Jackson Feb. 5, 2022, 5:45 a.m. UTC
Certain compilers (I haven't quite tracked it down to if it's a certain
version or distro specific things) strip out some metadata that is
required for PVH bootable kernels to boot properly. They require a couple
extra CFLAGS to tell them to not.

I'm not sure this is the best way to fix this (in fact, I'm sure it's
not). I messed around with `call cc-option` a bit and couldn't get it to
work.

refs:
https://github.com/cloud-hypervisor/cloud-hypervisor/issues/3222

Signed-off-by: Iggy Jackson <iggy@theiggy.com>
---
 Makefile | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index 1fc349109..f681d0b41 100644
--- a/Makefile
+++ b/Makefile
@@ -978,6 +978,10 @@  ifdef CONFIG_CC_IS_GCC
 KBUILD_CFLAGS += $(call cc-ifversion, -ge, 0901, -Wno-alloc-size-larger-than)
 endif
 
+ifdef CONFIG_PVH
+KBUILD_CFLAGS += -Wa,-mx86-used-note=no
+endif
+
 # disable invalid "can't wrap" optimizations for signed / pointers
 KBUILD_CFLAGS	+= -fno-strict-overflow