summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2017-08-25 15:39:10 +0200
committerMartin Roth <martinroth@google.com>2017-09-02 15:23:05 +0000
commit1db500c101bc7e6a61df53263cac8910ba540a66 (patch)
tree35d465606a3bfa61d6ff433c48b71fa61285eb12
parentadb026f76ab2ecc1950aa5b5457d1d649f4e5daa (diff)
Fix build with CLANG, avoid GCC only CFLAGS
Commit 7c8d331fbb "Fine-tune compiler flags" added CFLAGS that are not existing on CLANG hence breaking building coreboot with clang. Fixes: https://ticket.coreboot.org/issues/134 Change-Id: Ie0250e285b0c5a9f8ee2eb99401aeca875d2789a Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/21202 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Damien Zammit <damien@zamaudio.com> Reviewed-by: Martin Roth <martinroth@google.com>
-rw-r--r--Makefile.inc2
1 files changed, 2 insertions, 0 deletions
diff --git a/Makefile.inc b/Makefile.inc
index 679e0ac393..ca9711d27b 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -363,7 +363,9 @@ CFLAGS_common += -Wwrite-strings -Wredundant-decls -Wno-trigraphs
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 += -fno-delete-null-pointer-checks -fconserve-stack
+endif
ADAFLAGS_common += -gnatg -gnatp
ADAFLAGS_common += -Wuninitialized -Wall -Werror