Makefile: Use cgcc rather than sparse in the check target
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>
This commit is contained in:
parent
ff46a49afa
commit
f228d1f006
11
Makefile
11
Makefile
@ -323,9 +323,7 @@ GCOV = gcov
|
|||||||
|
|
||||||
export TCL_PATH TCLTK_PATH
|
export TCL_PATH TCLTK_PATH
|
||||||
|
|
||||||
# sparse is architecture-neutral, which means that we need to tell it
|
SPARSE_FLAGS =
|
||||||
# explicitly what architecture to check for. Fix this up for yours..
|
|
||||||
SPARSE_FLAGS = -D__BIG_ENDIAN__ -D__powerpc__
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -924,6 +922,7 @@ ifeq ($(uname_O),Cygwin)
|
|||||||
X = .exe
|
X = .exe
|
||||||
COMPAT_OBJS += compat/cygwin.o
|
COMPAT_OBJS += compat/cygwin.o
|
||||||
UNRELIABLE_FSTAT = UnfortunatelyYes
|
UNRELIABLE_FSTAT = UnfortunatelyYes
|
||||||
|
SPARSE_FLAGS = -isystem /usr/include/w32api -Wno-one-bit-signed-bitfield
|
||||||
endif
|
endif
|
||||||
ifeq ($(uname_S),FreeBSD)
|
ifeq ($(uname_S),FreeBSD)
|
||||||
NEEDS_LIBICONV = YesPlease
|
NEEDS_LIBICONV = YesPlease
|
||||||
@ -1177,6 +1176,7 @@ ifneq (,$(findstring MINGW,$(uname_S)))
|
|||||||
EXTLIBS += -lws2_32
|
EXTLIBS += -lws2_32
|
||||||
PTHREAD_LIBS =
|
PTHREAD_LIBS =
|
||||||
X = .exe
|
X = .exe
|
||||||
|
SPARSE_FLAGS = -Wno-one-bit-signed-bitfield
|
||||||
ifneq (,$(wildcard ../THIS_IS_MSYSGIT))
|
ifneq (,$(wildcard ../THIS_IS_MSYSGIT))
|
||||||
htmldir=doc/git/html/
|
htmldir=doc/git/html/
|
||||||
prefix =
|
prefix =
|
||||||
@ -2161,11 +2161,12 @@ check-sha1:: test-sha1$X
|
|||||||
./test-sha1.sh
|
./test-sha1.sh
|
||||||
|
|
||||||
check: common-cmds.h
|
check: common-cmds.h
|
||||||
if sparse; \
|
@if sparse; \
|
||||||
then \
|
then \
|
||||||
for i in $(patsubst %.o, %.c, $(GIT_OBJS)); \
|
for i in $(patsubst %.o, %.c, $(GIT_OBJS)); \
|
||||||
do \
|
do \
|
||||||
sparse $(ALL_CFLAGS) $(SPARSE_FLAGS) $$i || exit; \
|
echo ' ' SP $$i; \
|
||||||
|
cgcc -no-compile $(ALL_CFLAGS) $(SPARSE_FLAGS) $$i || exit; \
|
||||||
done; \
|
done; \
|
||||||
else \
|
else \
|
||||||
echo 2>&1 "Did you mean 'make test'?"; \
|
echo 2>&1 "Did you mean 'make test'?"; \
|
||||||
|
Loading…
Reference in New Issue
Block a user