Skip to content

Instantly share code, notes, and snippets.

@pcercuei
Created April 9, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pcercuei/460fd27cc088f6215435 to your computer and use it in GitHub Desktop.
Save pcercuei/460fd27cc088f6215435 to your computer and use it in GitHub Desktop.
diff --git a/Makefile b/Makefile
index b15036b..cef3392 100644
--- a/Makefile
+++ b/Makefile
@@ -335,15 +335,6 @@ endif
export KBUILD_MODULES KBUILD_BUILTIN
export KBUILD_CHECKSRC KBUILD_SRC KBUILD_EXTMOD
-ifneq ($(CC),)
-ifeq ($(shell $(CC) -v 2>&1 | grep -c "clang version"), 1)
-COMPILER := clang
-else
-COMPILER := gcc
-endif
-export COMPILER
-endif
-
# Look for make include files relative to root of kernel src
MAKEFLAGS += --include-dir=$(srctree)
@@ -369,6 +360,13 @@ PERL = perl
PYTHON = python
CHECK = sparse
+ifeq ($(shell $(CC) -v 2>&1 | grep -c "clang version"), 1)
+COMPILER := clang
+else
+COMPILER := gcc
+endif
+export COMPILER
+
CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \
-Wbitwise -Wno-return-void $(CF)
CFLAGS_MODULE =
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment