LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File sparse-gcc_base-fix.patch of Package sparse (Project home:misiozor)

---
 Makefile |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- a/Makefile
+++ b/Makefile
@@ -21,7 +21,7 @@ HAVE_GCC_DEP:=$(shell touch .gcc-test.c
 		echo 'yes'; rm -f .gcc-test.d .gcc-test.o .gcc-test.c)
 HAVE_GTK2:=$(shell pkg-config --exists gtk+-2.0 2>/dev/null && echo 'yes')
 
-CFLAGS += -DGCC_BASE=\"$(shell $(CC) --print-file-name=)\"
+GCC_BASE_DEFINE= -DGCC_BASE=\"$(shell $(CC) --print-file-name=)\"
 
 ifeq ($(HAVE_GCC_DEP),yes)
 CFLAGS += -Wp,-MD,$(@D)/.$(@F).d
@@ -145,7 +145,7 @@ DEP_FILES := $(wildcard .*.o.d)
 $(if $(DEP_FILES),$(eval include $(DEP_FILES)))
 
 c2xml.o: c2xml.c $(LIB_H)
-	$(QUIET_CC)$(CC) `pkg-config --cflags libxml-2.0` -o $@ -c $(CFLAGS) $<
+	$(QUIET_CC)$(CC) `pkg-config --cflags libxml-2.0` -o $@ -c $(GCC_BASE_DEFINE) $(CFLAGS) $<
 
 compat-linux.o: compat/strtold.c compat/mmap-blob.c $(LIB_H)
 compat-solaris.o: compat/mmap-blob.c $(LIB_H)
@@ -153,7 +153,7 @@ compat-mingw.o: $(LIB_H)
 compat-cygwin.o: $(LIB_H)
 
 %.o: %.c
-	$(QUIET_CC)$(CC) -o $@ -c $(CFLAGS) $<
+	$(QUIET_CC)$(CC) -o $@ -c $(GCC_BASE_DEFINE) $(CFLAGS) $<
 
 clean: clean-check
 	rm -f *.[oa] .*.d *.so $(PROGRAMS) $(SLIB_FILE) pre-process.h sparse.pc