diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2020-10-15 11:00:55 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2020-10-19 09:58:30 +0200 |
commit | ceb5431a2feccc0bbe7e650c90946056513cba88 (patch) | |
tree | 41c02da3d67244651c6c9a110739e089fd8f4917 | |
parent | df5840be03ca6f3ac1ef39afc47b5fed8e98b019 (diff) | |
download | barebox-ceb5431a2feccc0bbe7e650c90946056513cba88.tar.gz barebox-ceb5431a2feccc0bbe7e650c90946056513cba88.tar.xz |
kbuild: force compiler to assume two's complement
The kernel is compiled with this option and kernel code we port assumes
that integer types are two's complement, so play it safe and disable
optimizations that are possibly buggy in respect to barebox.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | Makefile | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -619,6 +619,9 @@ KBUILD_CFLAGS += $(call cc-disable-warning, trampolines) KBUILD_CFLAGS += $(call cc-option, -fno-delete-null-pointer-checks,) +# disable invalid "can't wrap" optimizations for signed / pointers +KBUILD_CFLAGS += $(call cc-option,-fno-strict-overflow) + KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member) # Align the bit size of userspace programs with the kernel |