[tor-commits] [tor] 06/13: Strip "__.SYMDEF*" before re-archiving in combine_libs on macOS and iOS.

gitolite role git at cupani.torproject.org
Thu Oct 27 15:46:19 UTC 2022


This is an automated email from the git hooks/post-receive script.

dgoulet pushed a commit to branch main
in repository tor.

commit 256339712de21d7002129aed102b637cda634ab5
Author: Alexander Færøy <ahf at torproject.org>
AuthorDate: Fri Oct 14 12:12:46 2022 +0200

    Strip "__.SYMDEF*" before re-archiving in combine_libs on macOS and iOS.
    
    This patch changes how combine_libs works on Darwin like platforms to
    make sure we don't include any `__.SYMDEF` and `__.SYMDEF SORTED`
    symbols on the archive before we repack and run ${RANLIB} on the
    archive.
    
    See: tpo/core/tor#40683.
---
 scripts/build/combine_libs | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/scripts/build/combine_libs b/scripts/build/combine_libs
index a855171dc7..9dec483602 100755
--- a/scripts/build/combine_libs
+++ b/scripts/build/combine_libs
@@ -11,6 +11,15 @@ abspath() {
     echo "$(cd "$(dirname "$1")" >/dev/null && pwd)/$(basename "$1")"
 }
 
+apple_symdef_fix() {
+    # On modern macOS and iOS we need to remove the "__.SYMDEF" and "__.SYMDEF
+    # SORTED" before we repack the archive.
+    # See: tor#40683.
+    if [ "$(uname -s)" = "Darwin" ] ; then
+        find . -name "__.SYMDEF*" -delete
+    fi
+}
+
 TARGET=$(abspath "$1")
 
 shift
@@ -25,6 +34,7 @@ for input in "$@"; do
 done
 
 cd "$TMPDIR" >/dev/null
+apple_symdef_fix
 "${AR:-ar}" "${ARFLAGS:-cru}" library.tmp.a ./*/**
 "${RANLIB:-ranlib}" library.tmp.a
 mv -f library.tmp.a "$TARGET"

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the tor-commits mailing list