build-sys: check static linking of UBSAN

Backports commit 218bb57dd79d6843e0592c30a82ea8c1fddc74a5 from qemu
This commit is contained in:
Marc-André Lureau 2018-03-08 09:00:28 -05:00 committed by Lioncash
parent bb442e7843
commit 372766d6d3
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

10
qemu/configure vendored
View file

@ -1179,7 +1179,15 @@ fi
##########################################
# checks for sanitizers
write_c_skeleton
# we could use a simple skeleton for flags checks, but this also
# detect the static linking issue of ubsan, see also:
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84285
cat > $TMPC << EOF
#include <stdint.h>
int main(void) {
return INT32_MIN / -1;
}
EOF
have_asan=no
have_ubsan=no