summaryrefslogtreecommitdiff
path: root/arch/x86/Makefile
diff options
context:
space:
mode:
authorMatthias Kaehlcke <mka@chromium.org>2017-04-13 10:26:09 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-11-23 08:20:35 +0100
commita5819f2b08a73babd60455c5913c844e1b71bf11 (patch)
tree593c99b6d09b1a13c13fc4f1385b1258a18931db /arch/x86/Makefile
parente21538812d96eab9782116b514047947d69554b3 (diff)
x86/kbuild: Use cc-option to enable -falign-{jumps/loops}
commit 2c4fd1ac3ff167c91272dc43c7bfd2269ef61557 upstream. clang currently does not support these optimizations, only enable them when they are available. Signed-off-by: Matthias Kaehlcke <mka@chromium.org> Cc: Greg Hackmann <ghackmann@google.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Cc: Michael Davidson <md@google.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: grundler@chromium.org Link: http://lkml.kernel.org/r/20170413172609.118122-1-mka@chromium.org Signed-off-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Nick Desaulniers <ndesaulniers@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/x86/Makefile')
-rw-r--r--arch/x86/Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index f408babdf746..605dc4dfac54 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)