summaryrefslogtreecommitdiff
path: root/Makefile.inc
diff options
context:
space:
mode:
authorMartin Roth <gaumless@gmail.com>2018-06-05 21:41:19 -0600
committerMartin Roth <martinroth@google.com>2018-06-07 16:38:08 +0000
commit2819a40ed30e59068c2204ced0929df813714ba7 (patch)
tree780bdef57c7acde985700bc79069c24abe0b1d85 /Makefile.inc
parent07a803db77eb8cab5177650a2df50c7400f2f8d1 (diff)
downloadcoreboot-2819a40ed30e59068c2204ced0929df813714ba7.tar.xz
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>
Diffstat (limited to 'Makefile.inc')
-rw-r--r--Makefile.inc6
1 files changed, 5 insertions, 1 deletions
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