From: Arran Cudbard-Bell Date: Wed, 31 May 2023 19:09:17 +0000 (-0400) Subject: Why OpenSSL why... X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a1040f6504361bcac86947e67779cb6345b549b3;p=thirdparty%2Ffreeradius-server.git Why OpenSSL why... --- diff --git a/configure b/configure index 75173ac6ece..d5429cc1810 100755 --- 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 ;; *) diff --git a/configure.ac b/configure.ac index 28d440016a2..98d44524036 100644 --- a/configure.ac +++ b/configure.ac @@ -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 ;; *)