]> git.proxmox.com Git - mirror_qemu.git/commitdiff
build-sys: check static linking of UBSAN
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Thu, 8 Feb 2018 16:23:42 +0000 (17:23 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 13 Feb 2018 10:44:13 +0000 (11:44 +0100)
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20180208162343.30809-2-marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
configure

index 0a53562072cd627ba7b738801f5d488f4e0abe8f..913e14839dccdedc0c559d33acba108d98f62350 100755 (executable)
--- a/configure
+++ b/configure
@@ -5306,7 +5306,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