Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1186058
| From | Michal Marek <mmarek@suse.cz> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [GIT PULL] ARC fixes for 4.2-rc3 |
| Date | 2015-07-16 18:40 +0200 |
| Message-ID | <pMUmu-3LD-11@gated-at.bofh.it> (permalink) |
| References | <pMpiF-Ak-3@gated-at.bofh.it> <pMBtx-1JF-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, Jul 15, 2015 at 01:29:07PM -0700, Linus Torvalds wrote:
> What happens if the environment has ARCH_CFLAGS set? The build will
> start using them. Sure, we've had this before, and maybe the ARCH_
> prefix makes it unique enough, but generally I think we've tried to
> either
>
> (a) make sure they get initialized in the makefiles (eg the usual
> CFLAGS is set to empty by the arch things, so that we don't silently
> take them from the environment)
Good point. I'll add the below patch to my tree.
> I don't think this is a big deal, and I suspect we may have other
> cases where we do this, but I do not think that the *intention* was
> that people could use this as another KCFLAGS replacement...
It was definitely not intended to be set by the user.
Michal
From f821bf39576444276917bd6737c526d361c69221 Mon Sep 17 00:00:00 2001
From: Michal Marek <mmarek@suse.com>
Date: Thu, 16 Jul 2015 18:23:53 +0200
Subject: [PATCH] kbuild: Do not pick up ARCH_{CPP,A,C}FLAGS from the
environment
Initialize the ARCH_* overrides before including the arch Makefile, to
avoid picking up the values from the environment. The variables can
still be overriden on the make command line, but this won't happen
by accident.
Signed-off-by: Michal Marek <mmarek@suse.com>
---
Makefile | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/Makefile b/Makefile
index 2f49d89..a99a14d 100644
--- a/Makefile
+++ b/Makefile
@@ -597,6 +597,11 @@ endif # $(dot-config)
# Defaults to vmlinux, but the arch makefile usually adds further targets
all: vmlinux
+# The arch Makefile can set ARCH_{CPP,A,C}FLAGS to override the default
+# values of the respective KBUILD_* variables
+ARCH_CPPFLAGS :=
+ARCH_AFLAGS :=
+ARCH_CFLAGS :=
include arch/$(SRCARCH)/Makefile
KBUILD_CFLAGS += $(call cc-option,-fno-delete-null-pointer-checks,)
--
2.1.4
--
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 | Next — Previous in thread | Find similar | Unroll thread
[GIT PULL] ARC fixes for 4.2-rc3 Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2015-07-15 09:30 +0200
Re: [GIT PULL] ARC fixes for 4.2-rc3 Linus Torvalds <torvalds@linux-foundation.org> - 2015-07-15 22:30 +0200
Re: [GIT PULL] ARC fixes for 4.2-rc3 Michal Marek <mmarek@suse.cz> - 2015-07-16 18:40 +0200
csiph-web