mirror of
git://git.code.sf.net/p/dhcpd-pools/code
synced 2025-12-16 07:47:00 +00:00
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 <mr.spuratic@gmail.com> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
parent
1eca347196
commit
631bf0bf7c
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue