diff mbox series

[PULL,13/48] build-sys: check static linking of UBSAN

Message ID 1518523252-49106-14-git-send-email-pbonzini@redhat.com
State New
Headers show
Series [PULL,01/48] Revert "build-sys: silence make by default or V=0" | expand

Commit Message

Paolo Bonzini Feb. 13, 2018, noon UTC
From: Marc-André Lureau <marcandre.lureau@redhat.com>

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 | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/configure b/configure
index 0a53562..913e148 100755
--- 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