forked from pool/smatch
OBS-URL: https://build.opensuse.org/package/show/devel:tools:statica/smatch?expand=0&rev=27
48 lines
1.4 KiB
Diff
48 lines
1.4 KiB
Diff
From: Jiri Slaby <jslaby@suse.cz>
|
|
Date: Mon, 9 May 2022 10:39:58 +0200
|
|
Subject: Makefile: allow CFLAGS to be redefined
|
|
Patch-mainline: no
|
|
References: build fix
|
|
|
|
I.e. use CFLAGS_INT for the internal ones.
|
|
|
|
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
|
|
---
|
|
Makefile | 6 +++---
|
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/Makefile b/Makefile
|
|
index 37143d0f..d0b109f5 100644
|
|
--- a/Makefile
|
|
+++ b/Makefile
|
|
@@ -352,7 +352,7 @@ SMATCH_OBJS += smatch_untracked_param.o
|
|
SMATCH_OBJS += smatch_untracked_var.o
|
|
SMATCH_OBJS += smatch_var_sym.o
|
|
|
|
-CFLAGS+=-D__CHECKNAME__='"$(subst .c,,$(notdir $<))"'
|
|
+CFLAGS_INT=-D__CHECKNAME__='"$(subst .c,,$(notdir $<))"'
|
|
|
|
SMATCH_CHECKS=$(shell ls check_*.c | sed -e 's/\.c/.o/')
|
|
SMATCH_DATA=smatch_data/kernel.allocation_funcs \
|
|
@@ -395,7 +395,7 @@ check_list_local.h:
|
|
touch check_list_local.h
|
|
|
|
smatch.o: smatch.c $(LIB_H) smatch.h check_list.h check_list_local.h
|
|
- $(CC) $(CFLAGS) -c smatch.c -DSMATCHDATADIR='"$(smatch_datadir)"'
|
|
+ $(CC) $(CFLAGS) $(CFLAGS_INT) -c smatch.c -DSMATCHDATADIR='"$(smatch_datadir)"'
|
|
|
|
$(SMATCH_OBJS) $(SMATCH_CHECKS): smatch.h smatch_slist.h smatch_extra.h \
|
|
smatch_constants.h avl.h
|
|
@@ -414,7 +414,7 @@ libsparse.a: $(LIB_OBJS)
|
|
$(Q)$(AR) rcs $@ $^
|
|
|
|
|
|
-cflags += $($(*)-cflags) $(CPPFLAGS) $(CFLAGS)
|
|
+cflags += $($(*)-cflags) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_INT)
|
|
%.o: %.c
|
|
@echo " CC $@"
|
|
$(Q)$(CC) $(cflags) -c -o $@ $<
|
|
--
|
|
2.35.3
|
|
|