linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86/kbuild: Use cc-option to enable -falign-{jumps/loops}
@ 2017-04-13 17:26 Matthias Kaehlcke
  2017-04-18  7:25 ` [tip:x86/build] " tip-bot for Matthias Kaehlcke
  0 siblings, 1 reply; 2+ messages in thread
From: Matthias Kaehlcke @ 2017-04-13 17:26 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, H . Peter Anvin, Masahiro Yamada
  Cc: linux-kernel, x86, grundler, Greg Hackmann, Michael Davidson,
	Matthias Kaehlcke

clang currently does not support these optimizations, only enable them
when they are available.

Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
---
 arch/x86/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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)
-- 
2.12.2.715.g7642488e1d-goog

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [tip:x86/build] x86/kbuild: Use cc-option to enable -falign-{jumps/loops}
  2017-04-13 17:26 [PATCH] x86/kbuild: Use cc-option to enable -falign-{jumps/loops} Matthias Kaehlcke
@ 2017-04-18  7:25 ` tip-bot for Matthias Kaehlcke
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Matthias Kaehlcke @ 2017-04-18  7:25 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: mka, torvalds, linux-kernel, mingo, peterz, yamada.masahiro, md,
	ghackmann, tglx, hpa

Commit-ID:  2c4fd1ac3ff167c91272dc43c7bfd2269ef61557
Gitweb:     http://git.kernel.org/tip/2c4fd1ac3ff167c91272dc43c7bfd2269ef61557
Author:     Matthias Kaehlcke <mka@chromium.org>
AuthorDate: Thu, 13 Apr 2017 10:26:09 -0700
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Mon, 17 Apr 2017 12:39:37 +0200

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 <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>
---
 arch/x86/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index a94a4d1..73604e1 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)

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-04-18  7:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-13 17:26 [PATCH] x86/kbuild: Use cc-option to enable -falign-{jumps/loops} Matthias Kaehlcke
2017-04-18  7:25 ` [tip:x86/build] " tip-bot for Matthias Kaehlcke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).