From: Niels Möller Date: Thu, 5 Dec 2019 08:02:15 +0000 (+0100) Subject: Fix configure check for __builtin_bswap64. X-Git-Tag: nettle_3.6rc1~71 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9f4180d6f41889c8b42a70fc5b6a73c6055006fb;p=thirdparty%2Fnettle.git Fix configure check for __builtin_bswap64. * configure.ac: Use AC_TRY_LINK rather than AC_TRY_COMPILE to check for __builtin_bswap64. Since calling an non-existing function typically results in a warning only at compile time, but fails at link time. Patch contributed by by George Koehler. --- diff --git a/ChangeLog b/ChangeLog index 910b696d..41dab74f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2019-12-05 Niels Möller + + * configure.ac: Use AC_TRY_LINK rather than AC_TRY_COMPILE to + check for __builtin_bswap64. Since calling an non-existing + function typically results in a warning only at compile time, but + fails at link time. Patch contributed by by George Koehler. + 2019-12-04 Niels Möller * testsuite/testutils.c (test_cipher_cfb8): Add cast of size_t to diff --git a/configure.ac b/configure.ac index 3547cae4..7ac84f2e 100644 --- a/configure.ac +++ b/configure.ac @@ -213,7 +213,7 @@ AC_C_BIGENDIAN([AC_DEFINE([WORDS_BIGENDIAN], 1) AC_CACHE_CHECK([for __builtin_bswap64], nettle_cv_c_builtin_bswap64, -[AC_TRY_COMPILE([ +[AC_TRY_LINK([ #include ],[ uint64_t x = 17;