linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] build: assign extra flags to ALL_CFLAGS instead of CFLAGS
@ 2017-10-18 15:07 Jeff Layton
  2017-10-18 15:12 ` Jeff Layton
  2017-10-18 19:36 ` Christopher Li
  0 siblings, 2 replies; 14+ messages in thread
From: Jeff Layton @ 2017-10-18 15:07 UTC (permalink / raw)
  To: linux-sparse

From: Jeff Layton <jlayton@redhat.com>

The fedora packaging tools want to override $CFLAGS when building
sparse, but that fails on a couple of targets.

There are a couple of build targets in the makefile that want to add
options to $CFLAGS. When we do a build though, we pass $ALL_CFLAGS
to the compiler, and that ends up not getting options passed in
via $CFLAGS on the command line.

Fix the two specific build targets to add the options to $ALL_CFLAGS
instead of $CFLAGS.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
---
 Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index d0341764158e..b24680b885fe 100644
--- a/Makefile
+++ b/Makefile
@@ -83,7 +83,7 @@ PROGRAMS += test-inspect
 INST_PROGRAMS += test-inspect
 test-inspect_EXTRA_DEPS := ast-model.o ast-view.o ast-inspect.o
 test-inspect_OBJS := test-inspect.o $(test-inspect_EXTRA_DEPS)
-$(test-inspect_OBJS) $(test-inspect_OBJS:.o=.sc): CFLAGS += $(GTK_CFLAGS)
+$(test-inspect_OBJS) $(test-inspect_OBJS:.o=.sc): ALL_CFLAGS += $(GTK_CFLAGS)
 test-inspect_EXTRA_OBJS := $(GTK_LIBS)
 else
 $(warning Your system does not have gtk3/gtk2, disabling test-inspect)
@@ -208,7 +208,7 @@ ifneq ($(DEP_FILES),)
 include $(DEP_FILES)
 endif
 
-c2xml.o c2xml.sc: CFLAGS += $(LIBXML_CFLAGS)
+c2xml.o c2xml.sc: ALL_CFLAGS += $(LIBXML_CFLAGS)
 
 pre-process.sc: CHECKER_FLAGS += -Wno-vla
 
-- 
2.13.6


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

end of thread, other threads:[~2017-10-19 10:41 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-18 15:07 [PATCH] build: assign extra flags to ALL_CFLAGS instead of CFLAGS Jeff Layton
2017-10-18 15:12 ` Jeff Layton
2017-10-18 19:41   ` Luc Van Oostenryck
2017-10-18 20:00     ` Jeff Layton
2017-10-18 20:21       ` Luc Van Oostenryck
2017-10-18 21:08         ` Jeff Layton
2017-10-18 21:25           ` Luc Van Oostenryck
2017-10-18 21:54             ` Christopher Li
2017-10-18 19:36 ` Christopher Li
2017-10-18 20:20   ` Jeff Layton
2017-10-18 22:14     ` Christopher Li
2017-10-19  1:47       ` Jeff Layton
2017-10-19  2:25         ` Christopher Li
2017-10-19 10:41           ` Jeff Layton

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