summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ff46a49)
raw | patch | inline | side by side (parent: ff46a49)
author | Ramsay Jones <ramsay@ramsay1.demon.co.uk> | |
Thu, 7 Apr 2011 18:22:18 +0000 (19:22 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 11 Apr 2011 17:35:25 +0000 (10:35 -0700) |
cgcc is the recommended way to run sparse, since it provides
many -Defines suitable for the given gcc platform. Using an
"cgcc -no-compile" command runs sparse, with all the platform
specific definitions provided by cgcc, without also invoking
gcc.
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
many -Defines suitable for the given gcc platform. Using an
"cgcc -no-compile" command runs sparse, with all the platform
specific definitions provided by cgcc, without also invoking
gcc.
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Makefile | patch | blob | history |
diff --git a/Makefile b/Makefile
index cbc3fce2d573ac313ee1b8f19749432cff3b31b5..a21f60e893053f9a520b7266abceb7a69cc0aa0e 100644 (file)
--- a/Makefile
+++ b/Makefile
export TCL_PATH TCLTK_PATH
-# sparse is architecture-neutral, which means that we need to tell it
-# explicitly what architecture to check for. Fix this up for yours..
-SPARSE_FLAGS = -D__BIG_ENDIAN__ -D__powerpc__
+SPARSE_FLAGS =
X = .exe
COMPAT_OBJS += compat/cygwin.o
UNRELIABLE_FSTAT = UnfortunatelyYes
+ SPARSE_FLAGS = -isystem /usr/include/w32api -Wno-one-bit-signed-bitfield
endif
ifeq ($(uname_S),FreeBSD)
NEEDS_LIBICONV = YesPlease
EXTLIBS += -lws2_32
PTHREAD_LIBS =
X = .exe
+ SPARSE_FLAGS = -Wno-one-bit-signed-bitfield
ifneq (,$(wildcard ../THIS_IS_MSYSGIT))
htmldir=doc/git/html/
prefix =
./test-sha1.sh
check: common-cmds.h
- if sparse; \
+ @if sparse; \
then \
for i in $(patsubst %.o, %.c, $(GIT_OBJS)); \
do \
- sparse $(ALL_CFLAGS) $(SPARSE_FLAGS) $$i || exit; \
+ echo ' ' SP $$i; \
+ cgcc -no-compile $(ALL_CFLAGS) $(SPARSE_FLAGS) $$i || exit; \
done; \
else \
echo 2>&1 "Did you mean 'make test'?"; \