]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
ppc64: Use assembly files only if __VSX__ is defined.
authorNiels Möller <nisse@lysator.liu.se>
Wed, 2 Apr 2025 14:39:03 +0000 (16:39 +0200)
committerNiels Möller <nisse@lysator.liu.se>
Wed, 2 Apr 2025 14:43:53 +0000 (16:43 +0200)
ChangeLog
configure.ac

index 6ddde442d14bb23a6d653c9758cd677da43dad15..4470c32fa0d7aaafaf6a45fd6896904b31f97dc6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2025-04-02  Niels Möller  <nisse@lysator.liu.se>
 
+       Cherry-picked from branch nettle-3.10-fixes:
+       * configure.ac: For ppc64, check if __VSX__ is defined, and
+       disable use of assembly if it isn't.
+
        * .gitlab-ci.yml: Fix native/fat to actually run make
        check-fat-override. Add an EXTRA_CHECK_TARGET variable also for
        the .cross-build template, use it for check-fat-override where
index 3d41974b3017fd59c925cac47422df35a119a02c..53e9013c8aee53b12cffa97f3c175b3095ac2d50 100644 (file)
@@ -367,6 +367,16 @@ case "$host_cpu" in
       ]], [[]])], [], [
        ELFV2_ABI=yes
       ])
+      if test "$enable_assembler" = yes ; then
+       AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#if defined(__VSX__)
+#error VSX available
+#endif
+      ]], [[]])], [
+         AC_MSG_WARN([VSX instructions (Power7 or later) not available, disabling use of assembly.])
+         enable_assembler=no
+      ], [])
+      fi
     fi
     ;;
   aarch64*)