From 2819a40ed30e59068c2204ced0929df813714ba7 Mon Sep 17 00:00:00 2001 From: Martin Roth Date: Tue, 5 Jun 2018 21:41:19 -0600 Subject: [PATCH] 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 Reviewed-on: https://review.coreboot.org/26878 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi --- Makefile.inc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile.inc b/Makefile.inc index ec086b90ff..b7c490473d 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -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