]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
Enable powerpc64 assembly only for 64-bit builds.
authorNiels Möller <nisse@lysator.liu.se>
Sat, 29 Aug 2020 13:10:46 +0000 (15:10 +0200)
committerNiels Möller <nisse@lysator.liu.se>
Sat, 29 Aug 2020 13:10:46 +0000 (15:10 +0200)
Based on patch by Mamone Tarsha.

configure.ac

index d18ddf03439e059d4a63ec4a6ba1098b218ee6c2..666b2f4a06672a646d8e2528210acf31eacee8a1 100644 (file)
@@ -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
       ;;