Makefile.inc: Skip -fconserve-stack flag if running scan-build

Scan-build refuses to run if the -fconserve-stack flag is added to
cflags.  It fails with the cryptic message "could not find clang line".

Change-Id: Ib1b56ef7d217138a1a195fe993d8e8dd965bd855
Signed-off-by: Martin Roth <gaumless@gmail.com>
Reviewed-on: https://review.coreboot.org/26878
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
Martin Roth 2018-06-05 21:41:19 -06:00 committed by Martin Roth
parent 07a803db77
commit 2819a40ed3
1 changed files with 5 additions and 1 deletions

View File

@ -395,7 +395,11 @@ CFLAGS_common += -Wno-packed-not-aligned
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 += -fno-delete-null-pointer-checks -fconserve-stack
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 += -fconserve-stack
endif
endif
ADAFLAGS_common += -gnatp