From: Niels Möller Date: Sat, 29 Aug 2020 13:10:46 +0000 (+0200) Subject: Enable powerpc64 assembly only for 64-bit builds. X-Git-Tag: nettle_3.7rc1~75 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1b75cecc4f55797e80322325fd559d9e694c26e0;p=thirdparty%2Fnettle.git Enable powerpc64 assembly only for 64-bit builds. Based on patch by Mamone Tarsha. --- diff --git a/configure.ac b/configure.ac index d18ddf03..666b2f4a 100644 --- a/configure.ac +++ b/configure.ac @@ -322,6 +322,17 @@ case "$host_cpu" in AC_TRY_COMPILE([ #if defined(__sgi) && defined(__LP64__) #error 64-bit mips +#endif + ], [], [ + ABI=32 + ], [ + ABI=64 + ]) + ;; + *powerpc64*) + AC_TRY_COMPILE([ +#if defined(__PPC64__) +#error 64-bit powerpc #endif ], [], [ ABI=32 @@ -444,13 +455,15 @@ if test "x$enable_assembler" = xyes ; then fi ;; *powerpc64*) - asm_path="powerpc64" - if test "x$enable_fat" = xyes ; then - asm_path="powerpc64/fat $asm_path" - OPT_NETTLE_SOURCES="fat-ppc.c $OPT_NETTLE_SOURCES" - FAT_TEST_LIST="none crypto_ext" - elif test "x$enable_power_crypto_ext" = xyes ; then - asm_path="powerpc64/p8 $asm_path" + if test "$ABI" = 64 ; then + asm_path="powerpc64" + if test "x$enable_fat" = xyes ; then + asm_path="powerpc64/fat $asm_path" + OPT_NETTLE_SOURCES="fat-ppc.c $OPT_NETTLE_SOURCES" + FAT_TEST_LIST="none crypto_ext" + elif test "x$enable_power_crypto_ext" = xyes ; then + asm_path="powerpc64/p8 $asm_path" + fi fi ;;