Thread (3 messages) 3 messages, 2 authors, 2014-01-21

Re: [PATCH] Allow to check mdadm with clangs static checker (scan-build)

From: NeilBrown <hidden>
Date: 2014-01-20 23:06:43

On Mon, 20 Jan 2014 17:14:12 +0100 Bernd Schubert
[off-list ref] wrote:
quoted hunk ↗ jump to hunk
Clangs scan-build tool (static checker) set the environmental variable CC,
so Makefile should allow to use that value.

Signed-off-by: Bernd Schubert <redacted>
---
 Makefile |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 043bcea..63cc3ac 100644
--- a/Makefile
+++ b/Makefile
@@ -41,7 +41,7 @@ KLIBC=/home/src/klibc/klibc-0.77
 
 KLIBC_GCC = gcc -nostdinc -iwithprefix include -I$(KLIBC)/klibc/include -I$(KLIBC)/linux/include -I$(KLIBC)/klibc/arch/i386/include -I$(KLIBC)/klibc/include/bits32
 
-CC = $(CROSS_COMPILE)gcc
+CC ?= $(CROSS_COMPILE)gcc
 CXFLAGS ?= -ggdb
 CWFLAGS = -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter
 ifdef WARN_UNUSED
I'm not exactly against this, but presumably you could tell scan-build to run

  make CC=$CC

to achieve the same effect with no patch ??

i.e.

  scan-build 'make CC=$CC'

But maybe I'll apply it anyway.

NeilBrown

Attachments

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