From: Matthias Kaehlcke Date: Thu, 13 Apr 2017 17:26:09 +0000 (-0700) Subject: x86/kbuild: Use cc-option to enable -falign-{jumps/loops} X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2c4fd1ac3ff167c91272dc43c7bfd2269ef61557;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git x86/kbuild: Use cc-option to enable -falign-{jumps/loops} clang currently does not support these optimizations, only enable them when they are available. Signed-off-by: Matthias Kaehlcke Cc: Greg Hackmann Cc: Linus Torvalds Cc: Masahiro Yamada Cc: Michael Davidson Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: grundler@chromium.org Link: http://lkml.kernel.org/r/20170413172609.118122-1-mka@chromium.org Signed-off-by: Ingo Molnar --- diff --git a/arch/x86/Makefile b/arch/x86/Makefile index a94a4d10f2df..73604e18447a 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -88,10 +88,10 @@ else KBUILD_CFLAGS += -m64 # Align jump targets to 1 byte, not the default 16 bytes: - KBUILD_CFLAGS += -falign-jumps=1 + KBUILD_CFLAGS += $(call cc-option,-falign-jumps=1) # Pack loops tightly as well: - KBUILD_CFLAGS += -falign-loops=1 + KBUILD_CFLAGS += $(call cc-option,-falign-loops=1) # Don't autogenerate traditional x87 instructions KBUILD_CFLAGS += $(call cc-option,-mno-80387)