summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2019-05-01 12:58:14 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2019-05-01 13:01:56 +0200
commit67331e5c074e8a8cbc2db013af8e5c1851f20a11 (patch)
tree4b0ef8bdb2237e1df7116043acc7ddca7ad14410
parentf16d33237ae4793cd9c86bac177d996a9c15c9e1 (diff)
downloadptxdist-67331e5c074e8a8cbc2db013af8e5c1851f20a11.tar.gz
ptxdist-67331e5c074e8a8cbc2db013af8e5c1851f20a11.tar.xz
wrapper: build with -Wno-implicit-fallthrough if necessary
If icecc does not support remote cpp or if it is disabled then implicit fallthrough warnings may occur because the corresponding comments are no longer available. In combination with -Werror this can cause build errors. So disable implicit fallthrough in this case to avoid the errors. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rwxr-xr-xbin/ptxdist3
-rw-r--r--scripts/lib/ptxd_make_00-init.sh1
-rw-r--r--scripts/wrapper/libwrapper.sh3
3 files changed, 7 insertions, 0 deletions
diff --git a/bin/ptxdist b/bin/ptxdist
index f9311405f..247b21339 100755
--- a/bin/ptxdist
+++ b/bin/ptxdist
@@ -559,6 +559,9 @@ check_compiler_icecc() {
if ! "${PTXDIST_ICECC}" --version | grep -q 'ICECC 1\.'; then
ptxd_bailout "PTXdist only supports icecc 1.x"
fi
+ if "${PTXDIST_ICECC}" --help | grep -q ICECC_REMOTE_CPP; then
+ export PTXDIST_ICECC_REMOTE_CPP=1
+ fi &&
mkdir -p "${icecc_dir}/target" "${icecc_dir}/host" &&
(
echo "Creating icecc host environment..."
diff --git a/scripts/lib/ptxd_make_00-init.sh b/scripts/lib/ptxd_make_00-init.sh
index 70a8b99b6..a042763d1 100644
--- a/scripts/lib/ptxd_make_00-init.sh
+++ b/scripts/lib/ptxd_make_00-init.sh
@@ -304,6 +304,7 @@ ptxd_init_save_wrapper_env() {
PTXDIST_HOST_CPPFLAGS="${PTXDIST_HOST_CPPFLAGS}"
PTXDIST_HOST_LDFLAGS="${PTXDIST_HOST_LDFLAGS}"
PTXDIST_PLATFORMDIR="${PTXDIST_PLATFORMDIR}"
+ PTXDIST_ICECC_REMOTE_CPP="${PTXDIST_ICECC_REMOTE_CPP}"
EOF
}
diff --git a/scripts/wrapper/libwrapper.sh b/scripts/wrapper/libwrapper.sh
index 913c3eb06..677ca3ce4 100644
--- a/scripts/wrapper/libwrapper.sh
+++ b/scripts/wrapper/libwrapper.sh
@@ -275,6 +275,9 @@ cxx_add_host_extra() {
add_icecc_args() {
if [ -n "${PTXDIST_ICECC}" ]; then
add_late_arg "-fno-diagnostics-show-caret"
+ if [ "${PTXDIST_ICECC_REMOTE_CPP}" != 1 -o "${ICECC_REMOTE_CPP}" = "0" ]; then
+ add_late_arg "-Wno-implicit-fallthrough"
+ fi
fi
}