]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
build: fix link errors with gcc < 4.8
authorBruno Haible <bruno@clisp.org>
Sun, 13 Aug 2023 23:45:39 +0000 (01:45 +0200)
committerPádraig Brady <P@draigBrady.com>
Mon, 14 Aug 2023 12:45:44 +0000 (13:45 +0100)
* configure.ac: Attempt to link, not only compile, the test programs
with __builtin_cpu_supports, to avoid link errors with cksum and wc.

configure.ac

index afc1098f763c9562215243e9b516d7fbb1bbfb29..948fb3653ea0f50c76603961071895cfd589793f 100644 (file)
@@ -521,7 +521,7 @@ ac_c_werror_flag=$cu_save_c_werror_flag
 ac_save_CFLAGS=$CFLAGS
 CFLAGS="-mavx -mpclmul $CFLAGS"
 AC_MSG_CHECKING([if pclmul intrinsic exists])
-AC_COMPILE_IFELSE(
+AC_LINK_IFELSE(
   [AC_LANG_SOURCE([[
     #include <x86intrin.h>
 
@@ -550,7 +550,7 @@ CFLAGS=$ac_save_CFLAGS
 
 CFLAGS="-mavx2 $CFLAGS"
 AC_MSG_CHECKING([if avx2 intrinstics exists])
-AC_COMPILE_IFELSE(
+AC_LINK_IFELSE(
   [AC_LANG_SOURCE([[
     #include <x86intrin.h>