diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2017-04-26 15:30:36 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2017-04-26 15:30:36 +0100 |
commit | df7941827721bd4c4523a34129f2cae3272957d2 (patch) | |
tree | 96c791bf1508e63da93a72a262a754aad6af7607 | |
parent | 2fa862f5ced4f909f4450dbd6e5d592811da6dc2 (diff) |
Suppress clang ubsan shift warnings rather than filtering them out
Now I've moved to a system with clang 3.8, we can suppress
clang ubsan's warnings about shift behaviour using a compiler option
rather than having to filter them out in the greplogs script.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rwxr-xr-x | greplogs | 9 | ||||
-rwxr-xr-x | remake-merge-builds | 5 |
2 files changed, 6 insertions, 8 deletions
@@ -40,17 +40,12 @@ while read f; do # (1) linker complaints about using getpwuid_r etc in statically linked # applications (which happen because of a glib awkwardness where it puts # those functions in the same .o as functions we use) - # (2) clang sanitizer runtime errors about left shifts - # [TODO these can probably be better suppressed with a ubsan flag - # now we're using a newer clang build] - # (3) a complaint about null_auth being an overridden common between + # (2) a complaint about null_auth being an overridden common between # libnfs and libc when statically linking - # (4) OSX's ancient texinfo doesn't know about UTF-8 + # (3) OSX's ancient texinfo doesn't know about UTF-8 egrep -i '(error:|warning:|OK DONE|assert)' < "$f" | \ grep -v 'warning: unrecognized encoding name `UTF-8' | \ grep -v 'statically linked applications' | \ - grep -v 'runtime error:.*left shift.*cannot be represented' | \ - grep -v 'runtime error:.*left shift of negative value' | \ grep -v 'rpc_common.o.*definition of.*null_auth.*overriding common' | \ grep -v 'libnfs.a(libnfs_la-libnfs-zdr.o): warning: common is here' done diff --git a/remake-merge-builds b/remake-merge-builds index a30c7fd..da9b101 100755 --- a/remake-merge-builds +++ b/remake-merge-builds @@ -24,7 +24,10 @@ do_conf() { do_conf all-linux-static '--cc=ccache gcc' '--enable-debug' '--static' '--disable-system' do_conf all '--cc=ccache gcc' do_conf alldbg '--cc=ccache gcc' '--enable-debug' -do_conf clang '--cc=clang' '--cxx=clang++' '--enable-gtk' '--extra-cflags=-fsanitize=undefined -Werror' +# We have to disable shift-base sanitizer warnings because older +# versions of clang don't realize that -fwrapv means shifts into the sign bit, etc are +# defined behaviour. https://bugs.llvm.org/show_bug.cgi?id=25552 +do_conf clang '--cc=clang' '--cxx=clang++' '--enable-gtk' '--extra-cflags=-fsanitize=undefined -fno-sanitize=shift-base -Werror' # -Wno-unused-local-typedefs is working around a problem with the glib version this # toolchain is using where newer gcc gave a warning about its assert macro. Fixed |