From fadbe5f657147f5232b2e0ad2a2a8b654cbeb219 Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Sat, 17 May 2014 18:26:38 +0200 Subject: build: make scan-build work again MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This drops the scan-build related Kconfig options since it's now possible to simply run scan-build [-o outdir] make and get coreboot built with its report. There's also no inner make process anymore, and the way things work should be clearer now. Also adapt abuild to this new reality. Change-Id: I03e03334761ec83f718b3235ebf811834cd2e3e3 Signed-off-by: Patrick Georgi Reviewed-on: http://review.coreboot.org/5774 Tested-by: build bot (Jenkins) Reviewed-by: Kyösti Mälkki --- Makefile | 30 ------------------------------ 1 file changed, 30 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 5c4484aed1..ddacdc370b 100644 --- a/Makefile +++ b/Makefile @@ -30,19 +30,9 @@ ## SUCH DAMAGE. ## -ifeq ($(INNER_SCANBUILD),y) -CC_real:=$(CC) -endif - $(if $(wildcard .xcompile),,$(eval $(shell bash util/xcompile/xcompile $(XGCCPATH) > .xcompile))) include .xcompile -ifeq ($(INNER_SCANBUILD),y) -CC:=$(CC_real) -HOSTCC:=$(CC_real) --hostcc -HOSTCXX:=$(CC_real) --hostcxx -endif - export top := $(CURDIR) export src := src export srck := $(top)/util/kconfig @@ -119,12 +109,10 @@ include $(HAVE_DOTCONFIG) include toolchain.inc -ifneq ($(INNER_SCANBUILD),y) ifeq ($(CONFIG_COMPILER_LLVM_CLANG),y) CC:=clang -m32 -mno-mmx -mno-sse -no-integrated-as HOSTCC:=clang endif -endif ifeq ($(CONFIG_CCACHE),y) CCACHE:=$(word 1,$(wildcard $(addsuffix /ccache,$(subst :, ,$(PATH))))) @@ -143,25 +131,7 @@ strip_quotes = $(subst ",,$(subst \",,$(1))) # The primary target needs to be here before we include the # other files -ifeq ($(INNER_SCANBUILD),y) -CONFIG_SCANBUILD_ENABLE:= -endif - -ifeq ($(CONFIG_SCANBUILD_ENABLE),y) -ifneq ($(CONFIG_SCANBUILD_REPORT_LOCATION),) -CONFIG_SCANBUILD_REPORT_LOCATION:=-o $(CONFIG_SCANBUILD_REPORT_LOCATION) -endif -real-all: - echo '#!/bin/sh' > .ccwrap - echo 'CC="$(CC)"' >> .ccwrap - echo 'if [ "$$1" = "--hostcc" ]; then shift; CC="$(HOSTCC)"; fi' >> .ccwrap - echo 'if [ "$$1" = "--hostcxx" ]; then shift; CC="$(HOSTCXX)"; fi' >> .ccwrap - echo 'eval $$CC $$*' >> .ccwrap - chmod +x .ccwrap - scan-build $(CONFIG_SCANBUILD_REPORT_LOCATION) -analyze-headers --use-cc=$(top)/.ccwrap --use-c++=$(top)/.ccwrap $(MAKE) INNER_SCANBUILD=y -else real-all: real-target -endif # must come rather early .SECONDEXPANSION: -- cgit v1.2.3