linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kbuild: Remove useless warning while appending KCFLAGS
@ 2012-08-14 16:00 Ozan Çağlayan
  2012-08-31 14:18 ` Michal Marek
  0 siblings, 1 reply; 2+ messages in thread
From: Ozan Çağlayan @ 2012-08-14 16:00 UTC (permalink / raw)
  To: linux-kernel
  Cc: mmarek, linux-kbuild, sam, artem.bityutskiy, Ozan Çağlayan

This is a respin of an older patch sent by Sam Ravnborg:
  http://www.gossamer-threads.com/lists/linux/kernel/1530602

This patch removes the annoying warning:

Makefile:708: "WARNING: Appending $KCFLAGS (-Wno-sign-compare) from command
line to kernel $CFLAGS"

which is printed every time I use KCFLAFS. The commit which introduced the
warning:

69ee0b3 kbuild: do not pick up CFLAGS from the environment

tells about the problems when people have CFLAGS in their environment,
then switches to KCFLAFS which should be enough to solve the issue, but
it anyway introduces a warning. Drop this warning.

Signed-off-by: Ozan Çağlayan <ozancag@gmail.com>
---
 Makefile | 19 +++----------------
 1 file changed, 3 insertions(+), 16 deletions(-)

diff --git a/Makefile b/Makefile
index 0d718ed..34751eb 100644
--- a/Makefile
+++ b/Makefile
@@ -648,22 +648,9 @@ ifeq ($(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-goto.sh $(CC)), y)
 endif
 
 # Add user supplied CPPFLAGS, AFLAGS and CFLAGS as the last assignments
-# But warn user when we do so
-warn-assign = \
-$(warning "WARNING: Appending $$K$(1) ($(K$(1))) from $(origin K$(1)) to kernel $$$(1)")
-
-ifneq ($(KCPPFLAGS),)
-        $(call warn-assign,CPPFLAGS)
-        KBUILD_CPPFLAGS += $(KCPPFLAGS)
-endif
-ifneq ($(KAFLAGS),)
-        $(call warn-assign,AFLAGS)
-        KBUILD_AFLAGS += $(KAFLAGS)
-endif
-ifneq ($(KCFLAGS),)
-        $(call warn-assign,CFLAGS)
-        KBUILD_CFLAGS += $(KCFLAGS)
-endif
+KBUILD_CPPFLAGS += $(KCPPFLAGS)
+KBUILD_AFLAGS += $(KAFLAGS)
+KBUILD_CFLAGS += $(KCFLAGS)
 
 # Use --build-id when available.
 LDFLAGS_BUILD_ID = $(patsubst -Wl$(comma)%,%,\
-- 
1.7.11.2


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

* Re: [PATCH] kbuild: Remove useless warning while appending KCFLAGS
  2012-08-14 16:00 [PATCH] kbuild: Remove useless warning while appending KCFLAGS Ozan Çağlayan
@ 2012-08-31 14:18 ` Michal Marek
  0 siblings, 0 replies; 2+ messages in thread
From: Michal Marek @ 2012-08-31 14:18 UTC (permalink / raw)
  To: Ozan Çağlayan; +Cc: linux-kernel, linux-kbuild, sam, artem.bityutskiy

On Tue, Aug 14, 2012 at 07:00:54PM +0300, Ozan Çağlayan wrote:
> This is a respin of an older patch sent by Sam Ravnborg:
>   http://www.gossamer-threads.com/lists/linux/kernel/1530602
> 
> This patch removes the annoying warning:
> 
> Makefile:708: "WARNING: Appending $KCFLAGS (-Wno-sign-compare) from command
> line to kernel $CFLAGS"
> 
> which is printed every time I use KCFLAFS. The commit which introduced the
> warning:
> 
> 69ee0b3 kbuild: do not pick up CFLAGS from the environment
> 
> tells about the problems when people have CFLAGS in their environment,
> then switches to KCFLAFS which should be enough to solve the issue, but
> it anyway introduces a warning. Drop this warning.
> 
> Signed-off-by: Ozan Çağlayan <ozancag@gmail.com>

Thanks, applied to kbuild.git#kbuild.

Michal

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

end of thread, other threads:[~2012-08-31 14:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-14 16:00 [PATCH] kbuild: Remove useless warning while appending KCFLAGS Ozan Çağlayan
2012-08-31 14:18 ` Michal Marek

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).