diff options
author | Carl Edquist <edquist@cs.wisc.edu> | 2021-05-10 05:22:11 -0500 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2021-05-10 13:35:20 +0100 |
commit | bf483155e506b62a515fda9e92cbc4dd43629e70 (patch) | |
tree | 27d0221d9b967db0dc6087ea2f8c41646885b9fd /configure.ac | |
parent | 09bbb2b703d78e2d577cba57b8bb3ad339303835 (diff) | |
download | coreutils-bf483155e506b62a515fda9e92cbc4dd43629e70.tar.gz |
build: fix __get_cpuid_count check to catch link failure
The test program will compile successfully even if __get_cpuid_count
is not declared. The error for the missing symbol will only show up
at link time. Thus, use AC_LINK_IFELSE instead of AC_COMPILE_IFELSE.
* configure.ac (__get_cpuid_count check): Use C_LINK_IFELSE instead
of AC_COMPILE_IFELSE.
(__get_cpuid check): Likewise.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index f0fbbd9b7..c4d8ec0b6 100644 --- a/configure.ac +++ b/configure.ac @@ -525,7 +525,7 @@ LDFLAGS=$ac_save_LDFLAGS ac_c_werror_flag=$cu_save_c_werror_flag AC_MSG_CHECKING([if __get_cpuid available]) -AC_COMPILE_IFELSE( +AC_LINK_IFELSE( [AC_LANG_SOURCE([[ #include <cpuid.h> @@ -576,7 +576,7 @@ AM_CONDITIONAL([USE_PCLMUL_CRC32], CFLAGS=$ac_save_CFLAGS AC_MSG_CHECKING([if __get_cpuid_count exists]) -AC_COMPILE_IFELSE( +AC_LINK_IFELSE( [AC_LANG_SOURCE([[ #include <cpuid.h> |