From 218bb57dd79d6843e0592c30a82ea8c1fddc74a5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marc-Andr=C3=A9=20Lureau?= Date: Thu, 8 Feb 2018 17:23:42 +0100 Subject: [PATCH] build-sys: check static linking of UBSAN MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Marc-André Lureau Message-Id: <20180208162343.30809-2-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini --- configure | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 0a53562072..913e14839d 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 +int main(void) { + return INT32_MIN / -1; +} +EOF have_asan=no have_ubsan=no -- 2.30.2