diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2019-05-01 12:58:14 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2019-05-01 13:01:56 +0200 |
commit | 67331e5c074e8a8cbc2db013af8e5c1851f20a11 (patch) | |
tree | 4b0ef8bdb2237e1df7116043acc7ddca7ad14410 /scripts/wrapper/libwrapper.sh | |
parent | f16d33237ae4793cd9c86bac177d996a9c15c9e1 (diff) | |
download | ptxdist-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>
Diffstat (limited to 'scripts/wrapper/libwrapper.sh')
-rw-r--r-- | scripts/wrapper/libwrapper.sh | 3 |
1 files changed, 3 insertions, 0 deletions
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 } |