DORMANTno replies

[PATCH] Support SPARSE in Makefile, better SPARSE_FLAGS

From: Pavel Roskin <hidden>
Date: 2016-06-15 22:42:07
Subsystem: kernel build + files below scripts/ (unless maintained elsewhere), the rest · Maintainers: Nathan Chancellor, Nicolas Schier, Linus Torvalds

Support SPARSE in Makefile, better SPARSE_FLAGS

This patch makes it possible to use some other program instead of sparse
(e.g. a wrapper around sparse).  It also provides a better default for
SPARSE_FLAGS.  __BIG_ENDIAN__ should not be needed.

Signed-off-by: Pavel Roskin <redacted>
diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -66,8 +66,9 @@ INSTALL = install
 RPMBUILD = rpmbuild
 
 # 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__
+# explicitly what architecture to check for.
+SPARSE = sparse
+SPARSE_FLAGS = -D__$(shell uname -i)__
 
 
 
@@ -335,7 +336,7 @@ test-delta: test-delta.c diff-delta.o pa
 	$(CC) $(ALL_CFLAGS) -o $@ $^
 
 check:
-	for i in *.c; do sparse $(ALL_CFLAGS) $(SPARSE_FLAGS) $$i; done
+	for i in *.c; do $(SPARSE) $(ALL_CFLAGS) $(SPARSE_FLAGS) $$i; done
 
 
 

-- 
Regards,
Pavel Roskin
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help