[coreboot-gerrit] Change in coreboot[master]: Makefile.inc: Skip -fconserve-stack flag if running scan-build

Martin Roth (Code Review) gerrit at coreboot.org
Wed Jun 6 05:41:52 CEST 2018


Martin Roth has uploaded this change for review. ( https://review.coreboot.org/26878


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

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 at gmail.com>
---
M Makefile.inc
1 file changed, 5 insertions(+), 1 deletion(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/78/26878/1

diff --git a/Makefile.inc b/Makefile.inc
index ec086b9..b7c4904 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -395,7 +395,11 @@
 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

-- 
To view, visit https://review.coreboot.org/26878
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib1b56ef7d217138a1a195fe993d8e8dd965bd855
Gerrit-Change-Number: 26878
Gerrit-PatchSet: 1
Gerrit-Owner: Martin Roth <martinroth at google.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180606/8c0d0ff3/attachment.html>


More information about the coreboot-gerrit mailing list