Hey folks,

With the obvious enough disclaimer that Xcode/CLT 10 are very much beta
releases at this point and will remain so for several months yet, I've
attached a diff to fix the only current build issue with the new
developer tools available for macOS 10.13/10.14.

The new Apple LLVM (10.0.0) ships with a new stack probing function,
which embeds the symbol `____chkstk_darwin` into seemingly the vast
majority of libraries & binaries, including both libnettle.a &
libhogweed.a, which in turn currently blows up nettle's `make check`
stage on the symbol check:

----------------------
PASS: sexp-conv
PASS: pkcs1-conv
PASS: nettle-pbkdf2
Exported symbols in libnettle.a, lacking the nettle prefix:
00000000000001b0 T ____chkstk_darwin
0000000000000230 T ____chkstk_darwin
0000000000000350 T ____chkstk_darwin
0000000000000360 T ____chkstk_darwin
0000000000000380 T ____chkstk_darwin
FAIL: symbols
PASS: dlopen
====================
1 of 94 tests failed
====================
make[1]: *** [check] Error 1
make: *** [check] Error 2
----------------------

The attached diff simply scopes out an exception to the check, with a
short explanatory note.

I appreciate fully y'all may decide it's too soon to be accepting
patches for prerelease developer tools, but the chances of Apple
removing the new function or disabling it by default seem pretty low.

Let me know if anything further is needed.

Thanks,

Dominyk
-- 
Sent from macOS.

If you wish to communicate more securely my PGP Public Key is at:
https://pgp.mit.edu/pks/lookup?search=0xE5F21DD98E4DF470&op=index
diff --git a/testsuite/symbols-test b/testsuite/symbols-test
index 051d3d2..01ca30c 100755
--- a/testsuite/symbols-test
+++ b/testsuite/symbols-test
@@ -15,9 +15,12 @@ fi
 #
 # * gcc on x86 generates functions like __i686.get_pc_thunk.bx in pic
 #   code.
+# * LLVM shipped with Xcode/CLT 10+ on macOS builds the symbol
+#   ____chkstk_darwin into the majority of binaries/libraries, including
+#   both the libraries checked here.
 
 ( $NM -g ../libnettle.a || $NM ../libnettle.a ) \
-    | grep ' [DRT] ' | egrep -v '( |^|\.)(\.?_?(_?nettle_)|get_pc_thunk)' \
+    | grep ' [DRT] ' | egrep -v '( 
|^|\.)(\.?_?(_?nettle_)|get_pc_thunk|(_*chkstk_darwin))' \
     | sort -k3 > test1.out
 
 if [ -s test1.out ] ; then
@@ -27,7 +30,7 @@ if [ -s test1.out ] ; then
 fi
 
 if [ -s ../libhogweed.a ] ; then
-    PATTERN='\.?_?_?nettle_|get_pc_thunk'
+    PATTERN='\.?_?_?nettle_|get_pc_thunk|(_*chkstk_darwin)'
     if grep '^#define.*NETTLE_USE_MINI_GMP.*1$' ../version.h >/dev/null ; then
        PATTERN="$PATTERN|_?(mp_|mpz_|mpn_)"
     fi

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
nettle-bugs mailing list
[email protected]
http://lists.lysator.liu.se/mailman/listinfo/nettle-bugs

Reply via email to