From 631bf0bf7cb3af35f532ff124138a414c22ae610 Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Fri, 8 Nov 2013 19:19:27 +0000 Subject: [PATCH] build-sys: use more strict method to check __builtin_expect The problem with the detection of gcc's __builtin_expect, the autoconf set up uses EX_COMPILE_IFELSE which only compiles the test code with gcc -c, it does not link so a missing __builtin_expect is treated as a missing symbol and is not detected. Reported-by: Conor McCarthy Signed-off-by: Sami Kerola --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index ae5bd63..e062c58 100644 --- a/configure.ac +++ b/configure.ac @@ -70,7 +70,7 @@ AC_CHECK_FUNCS([\ ]) AC_MSG_CHECKING([if the compiler supports __builtin_expect]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ +AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return __builtin_expect(1, 1) ? 1 : 0 ]])],[ have_builtin_expect=yes