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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx>
---
 Makefile | 4 ++++
 1 file changed, 4 insertions(+)

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
 
-- 
2.34.1




[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux