diff options
author | Niels Möller <nisse@lysator.liu.se> | 2020-08-29 15:10:46 +0200 |
---|---|---|
committer | Niels Möller <nisse@lysator.liu.se> | 2020-08-29 15:10:46 +0200 |
commit | 1b75cecc4f55797e80322325fd559d9e694c26e0 (patch) | |
tree | 31f23c46d6f977af829fc8dfe589e0ae6d9ead9a /configure.ac | |
parent | 1a42200219cb96b5e071091f08d248985f3d2cdc (diff) | |
download | nettle-1b75cecc4f55797e80322325fd559d9e694c26e0.tar.gz |
Enable powerpc64 assembly only for 64-bit builds.
Based on patch by Mamone Tarsha.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac index d18ddf03..666b2f4a 100644 --- a/configure.ac +++ b/configure.ac @@ -329,6 +329,17 @@ case "$host_cpu" in ABI=64 ]) ;; + *powerpc64*) + AC_TRY_COMPILE([ +#if defined(__PPC64__) +#error 64-bit powerpc +#endif + ], [], [ + ABI=32 + ], [ + ABI=64 + ]) + ;; esac if test "x$ABI" != xstandard ; then @@ -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 ;; |