From 1dd5dda6845442b1f135ab5160d2ddffcb9514d0 Mon Sep 17 00:00:00 2001
From: Dominyk Tiller <dominyktiller@gmail.com>
Date: Sun, 17 Jun 2018 19:20:09 +0200
Subject: [PATCH] testsuite/symbols-test: Exclude ____chkstk_darwin symbols.

These are produced by Apple's Xcode 10 compiler.

(cherry picked from commit f3e2607fce0c6da41eb1d9ee89b9535d4abec7be)
---
 ChangeLog              | 7 +++++++
 testsuite/symbols-test | 7 +++++--
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index eb3c43d5..6b14e822 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2018-06-17  Niels Möller  <nisse@lysator.liu.se>
+
+	Backported from master branch.
+	* testsuite/symbols-test: Exclude ____chkstk_darwin symbols,
+	produced by Apple's Xcode 10 compiler. Patch contributed by
+	Dominyk Tiller.
+
 2018-02-18  Niels Möller  <nisse@lysator.liu.se>
 
 	Backported from master branch.
diff --git a/testsuite/symbols-test b/testsuite/symbols-test
index 051d3d22..01ca30ce 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
-- 
GitLab