summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.inc9
-rwxr-xr-xutil/abuild/abuild3
2 files changed, 5 insertions, 7 deletions
diff --git a/Makefile.inc b/Makefile.inc
index 6884a90967..fe325048f8 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -385,11 +385,13 @@ CFLAGS_common += -Wstrict-aliasing -Wshadow -Wdate-time
CFLAGS_common += -fno-common -ffreestanding -fno-builtin -fomit-frame-pointer
CFLAGS_common += -ffunction-sections -fdata-sections -fno-pie
ifeq ($(CONFIG_COMPILER_GCC),y)
-CFLAGS_common += -Wno-packed-not-aligned
CFLAGS_common += -fno-delete-null-pointer-checks
# Don't add these GCC specific flags when running scan-build
ifeq ($(CCC_ANALYZER_OUTPUT_FORMAT),)
+CFLAGS_common += -Wno-packed-not-aligned
CFLAGS_common += -fconserve-stack
+# cf. commit f69a99db (coreboot: x86: enable gc-sections)
+CFLAGS_common += -Wno-unused-but-set-variable
endif
endif
@@ -439,11 +441,6 @@ ADAFLAGS_common += -gnatyN
LDFLAGS_common := --gc-sections -nostdlib -nostartfiles -static --emit-relocs
-ifeq ($(CONFIG_COMPILER_GCC),y)
-# cf. commit f69a99db (coreboot: x86: enable gc-sections)
-CFLAGS_common += -Wno-unused-but-set-variable
-endif
-
ifeq ($(CONFIG_WARNINGS_ARE_ERRORS),y)
CFLAGS_common += -Werror
endif
diff --git a/util/abuild/abuild b/util/abuild/abuild
index 85881b3411..5ec416a97b 100755
--- a/util/abuild/abuild
+++ b/util/abuild/abuild
@@ -469,7 +469,7 @@ function build_config
if [ "$scanbuild" = "true" ]; then
scanbuild_out=$TARGET/${BUILD_NAME}-scanbuild
rm -rf "${scanbuild_out}"
- BUILDPREFIX="scan-build -o ${scanbuild_out}tmp"
+ BUILDPREFIX="scan-build ${SCANBUILD_ARGS} -o ${scanbuild_out}tmp"
fi
compile_target "${BUILD_NAME}"
if [ "$scanbuild" = "true" ]; then
@@ -667,6 +667,7 @@ while true ; do
--scan-build) shift
scanbuild=true
customizing="${customizing}, scan-build"
+ SCANBUILD_ARGS=${SCANBUILD_ARGS:-'-k'}
;;
-y|--ccache) shift
customizing="${customizing}, ccache"