summaryrefslogtreecommitdiff
path: root/util/xcompile
diff options
context:
space:
mode:
authorStefan Reinauer <stefan.reinauer@coreboot.org>2017-06-27 00:27:32 +0200
committerStefan Reinauer <stefan.reinauer@coreboot.org>2017-06-27 23:54:03 +0000
commit42b37f537ff59eb28b85f99cc592d14724788575 (patch)
tree97b33b94e0621eeced44e3dbbe01e289c369a0e1 /util/xcompile
parent0b4d5648f2996ccb07a6a44f1d0276f9a2903f25 (diff)
downloadcoreboot-42b37f537ff59eb28b85f99cc592d14724788575.tar.xz
clang: Allow initializer overrides
In the code we do the following in a number of places to pre-initialize an array with a certain value before overwriting some of the array with other values: u8 mainboard_picr_data[FCH_INT_TABLE_SIZE] = { [0 ... FCH_INT_TABLE_SIZE-1] = 0x1F, } clang does not like that behavior unless we specify the option -Wno-initializer-overrides. Remove the check for gcc in those places, too, because 1) it would silently change array contents between compilers 2) the check isn't sufficient to determine compilation on clang vs gcc Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Change-Id: I93cc121b6fec099fcdbd5fd1114c2ff7cbc291dc Reviewed-on: https://review.coreboot.org/20384 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'util/xcompile')
-rwxr-xr-xutil/xcompile/xcompile3
1 files changed, 2 insertions, 1 deletions
diff --git a/util/xcompile/xcompile b/util/xcompile/xcompile
index 66073fe574..39183468b9 100755
--- a/util/xcompile/xcompile
+++ b/util/xcompile/xcompile
@@ -254,7 +254,8 @@ CLANG_CC_${TARCH}:=${CLANG}
CLANG_CFLAGS_${TARCH}:=${CFLAGS_CLANG}
CLANG_CFLAGS_${TARCH}+=-no-integrated-as -Qunused-arguments -m${TWIDTH}
# tone down clang compiler warnings
-CLANG_CFLAGS_${TARCH}+=-Wno-unused-variable -Wno-unused-function -Wno-tautological-compare -Wno-shift-overflow -Wno-address-of-packed-member
+CLANG_CFLAGS_${TARCH}+=-Wno-unused-variable -Wno-unused-function -Wno-tautological-compare
+CLANG_CFLAGS_${TARCH}+=-Wno-shift-overflow -Wno-address-of-packed-member -Wno-initializer-overrides
CLANG_COMPILER_RT_${TARCH}:=${CC_RT_CLANG}
CLANG_COMPILER_RT_FLAGS_${TARCH}:=${CC_RT_EXTRA_CLANG}