aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJerome Forissier <jerome.forissier@linaro.org>2018-06-26 10:04:49 +0200
committerJérôme Forissier <jerome.forissier@linaro.org>2018-06-26 14:12:51 +0200
commitbeb065df6ee53d014366068a138ccdb780b733d0 (patch)
tree22af7d216696dffdee395a15323aa658b4590fab
parent0d39a8dd13e0e926d3003a40d3a26354c4f0a0f7 (diff)
Do not set -Werror by default
Having -Werror turned on by default can be annoying, because not everyone uses the same compiler, and different compiler versions have different warnings. Therefore, provide CFG_WERROR to turn it on instead. Enable CFG_WERROR in the CI scripts because we still don't want warnings with the officially supported compilers. Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
-rw-r--r--.shippable.yml1
-rw-r--r--.travis.yml1
-rw-r--r--mk/compile.mk2
3 files changed, 3 insertions, 1 deletions
diff --git a/.shippable.yml b/.shippable.yml
index 019801db..29897c6e 100644
--- a/.shippable.yml
+++ b/.shippable.yml
@@ -13,6 +13,7 @@ build:
- export CROSS_COMPILE32="ccache arm-linux-gnueabihf-"
- export CROSS_COMPILE64="ccache aarch64-linux-gnu-"
- export CFG_DEBUG_INFO=n; export CCACHE_UNIFY=true
+ - export CFG_WERROR=y
- function _make() { make -j$(getconf _NPROCESSORS_ONLN) -s O=out $* && ccache -s && ccache -z; }
- ccache -z
diff --git a/.travis.yml b/.travis.yml
index 0b0d229d..164a381e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -79,6 +79,7 @@ script:
- if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then if [ "$(git rev-list --count HEAD^1..HEAD^2)" -gt 1 ]; then checkdiff $(git rev-parse HEAD^1) $(git rev-parse HEAD^2); fi; fi
# Run regression tests (xtest in QEMU)
+ - export CFG_WERROR=y
- (cd ${HOME}/optee_repo/build && $make check COMPILE_LEGACY=y AARCH32_CROSS_COMPILE=$HOME/optee_repo/toolchains/aarch32-legacy/bin/arm-linux-gnueabihf- LEGACY_AARCH32_CROSS_COMPILE=$HOME/optee_repo/toolchains/aarch32-legacy/bin/arm-linux-gnueabihf- BR2_CCACHE_DIR=~/.ccache DUMP_LOGS_ON_ERROR=1)
env:
diff --git a/mk/compile.mk b/mk/compile.mk
index 5559926c..5c37df6f 100644
--- a/mk/compile.mk
+++ b/mk/compile.mk
@@ -20,7 +20,7 @@ comp-cflags$(sm) = -std=gnu99
comp-aflags$(sm) =
comp-cppflags$(sm) =
-ifndef NOWERROR
+ifeq ($(CFG_WERROR),y)
comp-cflags$(sm) += -Werror
endif
comp-cflags$(sm) += -fdiagnostics-show-option