]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Why OpenSSL why...
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 31 May 2023 19:09:17 +0000 (15:09 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 31 May 2023 19:15:39 +0000 (15:15 -0400)
configure
configure.ac

index 75173ac6ece3ae76b8ddaefdb024cef1e76c7b20..d5429cc181068b93d07d0020f9efc7941ee02389 100755 (executable)
--- a/configure
+++ b/configure
@@ -17510,6 +17510,9 @@ done
 case "$target" in
   *-darwin*)
     echo "Please be sure to use 'xcrun gmake' or 'xcrun lldb' in order to build and run the server from the source tree"
+                                                if test "x$target_cpu" = "xaarch64" -a "x$WITH_OPENSSL" = "xyes"; then
+      echo "If debugging with lldb 'echo -e \"set platform.plugin.darwin.ignored-exceptions EXC_BAD_INSTRUCTION\\\nprocess handle SIGILL -n false -p true -s false\" >> ~/.lldbinit'"
+    fi
     ;;
 
   *)
index 28d440016a28cc1faab10067b3118284e2699842..98d44524036d1eb927a8457402f35a7638464662 100644 (file)
@@ -2645,6 +2645,20 @@ dnl #
 case "$target" in
   *-darwin*)
     echo "Please be sure to use 'xcrun gmake' or 'xcrun lldb' in order to build and run the server from the source tree"
+    dnl #
+    dnl #  OpenSSL >= 3.0 uses instruction probing to look for extensions
+    dnl #  Unfortunately Apple ARM CPUs don't support these instructions
+    dnl #  and LLDB throws an EXC_BAD_INSTRUCTION exception.
+    dnl #
+    dnl #  OpenSSL installs a SIGILL handler to catch the signal but this
+    dnl #  is also overriden by lldb.
+    dnl #
+    dnl #  To allow us to debug on macOS + LLDB + ARM we need to ignore
+    dnl #  this exception and ignore SIGILL.
+    dnl #
+    if test "x$target_cpu" = "xaarch64" -a "x$WITH_OPENSSL" = "xyes"; then
+      echo "If debugging with lldb 'echo -e \"set platform.plugin.darwin.ignored-exceptions EXC_BAD_INSTRUCTION\\\nprocess handle SIGILL -n false -p true -s false\" >> ~/.lldbinit'"
+    fi
     ;;
 
   *)