Skip to content

Commit

Permalink
security/cryptlib: fix build on armv6/armv7
Browse files Browse the repository at this point in the history
The clang option -fsanitize=safe-stack is not supported on armv6/armv7.
Patch the option detection script to not enable it there.

Approved by:	portmgr (build fix blanket)
  • Loading branch information
clausecker committed Apr 20, 2023
1 parent d762e3c commit 221dac0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions security/cryptlib/files/patch-tools_ccopts.sh
@@ -1,5 +1,14 @@
--- tools/ccopts.sh.orig 2021-10-21 02:27:26 UTC
+++ tools/ccopts.sh
@@ -675,7 +675,7 @@ hasSafeStackLibs()

if [ $ISCLANG -gt 0 ] && [ $ISSPECIAL -eq 0 ] ; then
if [ $COMPILER_VER -ge 47 ] ; then
- if [ "$OSNAME" = "Darwin" ] || [ "$OSNAME" = "OpenBSD" ] ; then
+ if [ "$OSNAME" = "Darwin" ] || [ "$OSNAME" = "OpenBSD" ] || [ "$OSNAME" = "FreeBSD" -a "$ARCH" = "arm" ] ; then
# The versions of clang shipped with OS X or OpenBSD don't
# support -fsanitize=safe-stack even as late as clang 12, so
# there's not much that we can do.
@@ -892,31 +892,6 @@ fi
# a big deal. As a convenient side-effect, this also enables the use of
# ASLR where it's supported.
Expand Down

0 comments on commit 221dac0

Please sign in to comment.