Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1205864

[PATCH 3.16.y-ckt 026/118] ARC: Override toplevel default -O2 with -O3

From Luis Henriques <luis.henriques@canonical.com>
Newsgroups linux.kernel
Subject [PATCH 3.16.y-ckt 026/118] ARC: Override toplevel default -O2 with -O3
Date 2015-08-12 11:50 +0200
Message-ID <pWAPy-Bo-55@gated-at.bofh.it> (permalink)
References <pWA37-7Qw-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


3.16.7-ckt16 -stable review patch.  If anyone has any objections, please let me know.

------------------

From: Vineet Gupta <vgupta@synopsys.com>

commit 97709069214eb75312c14946803b9da4d3814203 upstream.

ARC kernels have historically been built with -O3, despite top level
Makefile defaulting to -O2. This was facilitated by implicitly ordering
of arch makefile include AFTER top level assigned -O2.

An upstream fix to top level a1c48bb160f ("Makefile: Fix unrecognized
cross-compiler command line options") changed the ordering, making ARC
-O3 defunct.

Fix that by NOT relying on any ordering whatsoever and use the proper
arch override facility now present in kbuild (ARCH_*FLAGS)

Depends-on: ("kbuild: Allow arch Makefiles to override {cpp,ld,c}flags")
Suggested-by: Michal Marek <mmarek@suse.cz>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
 arch/arc/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arc/Makefile b/arch/arc/Makefile
index 8c0b1aa56f7e..429279bc3028 100644
--- a/arch/arc/Makefile
+++ b/arch/arc/Makefile
@@ -44,7 +44,8 @@ endif
 
 ifndef CONFIG_CC_OPTIMIZE_FOR_SIZE
 # Generic build system uses -O2, we want -O3
-cflags-y  += -O3
+# Note: No need to add to cflags-y as that happens anyways
+ARCH_CFLAGS += -O3
 endif
 
 # small data is default for elf32 tool-chain. If not usable, disable it
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[3.16.y-ckt stable] Linux 3.16.7-ckt16 stable review Luis Henriques <luis.henriques@canonical.com> - 2015-08-12 11:50 +0200
  [PATCH 3.16.y-ckt 008/118] ext4: correctly migrate a file with a hole at the beginning Luis Henriques <luis.henriques@canonical.com> - 2015-08-12 11:50 +0200
  [PATCH 3.16.y-ckt 007/118] ext4: be more strict when migrating to non-extent based file Luis Henriques <luis.henriques@canonical.com> - 2015-08-12 11:50 +0200
  [PATCH 3.16.y-ckt 011/118] drm/radeon: unpin cursor BOs on suspend and pin them again on resume (v2) Luis Henriques <luis.henriques@canonical.com> - 2015-08-12 11:50 +0200
  [PATCH 3.16.y-ckt 004/118] Btrfs: fix race between caching kthread and returning inode to inode cache Luis Henriques <luis.henriques@canonical.com> - 2015-08-12 11:50 +0200
  [PATCH 3.16.y-ckt 026/118] ARC: Override toplevel default -O2 with -O3 Luis Henriques <luis.henriques@canonical.com> - 2015-08-12 11:50 +0200
  [PATCH 3.16.y-ckt 001/118] netfilter: nfnetlink_cthelper: Remove 'const' and '&' to avoid warnings Luis Henriques <luis.henriques@canonical.com> - 2015-08-12 11:50 +0200
  [PATCH 3.16.y-ckt 009/118] ext4: replace open coded nofail allocation in ext4_free_blocks() Luis Henriques <luis.henriques@canonical.com> - 2015-08-12 11:50 +0200
  [PATCH 3.16.y-ckt 014/118] 9p: don't leave a half-initialized inode sitting around Luis Henriques <luis.henriques@canonical.com> - 2015-08-12 11:50 +0200

csiph-web