From b934663c26e9b4f19df806e14ca239c5c793e979 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Mon, 4 Jan 2021 05:16:27 +0100 Subject: [PATCH] Tweak OSX packaging, don't strip NSS libs This fixes i386 optimized builds: ``` dyld: Symbol not found: _PL_CompareValues Referenced from: /Volumes/Ardour-6.5.86/Ardour6.app/Contents/MacOS/../lib/libnssutil3.dylib Expected in: /Volumes/Ardour-6.5.86/Ardour6.app/Contents/MacOS/../lib/libplds4.dylib in /Volumes/Ardour-6.5.86/Ardour6.app/Contents/MacOS/../lib/libnssutil3.dylib ``` --- tools/osx_packaging/osx_build | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tools/osx_packaging/osx_build b/tools/osx_packaging/osx_build index 7a8508b5a2..1da8c1a860 100755 --- a/tools/osx_packaging/osx_build +++ b/tools/osx_packaging/osx_build @@ -444,12 +444,18 @@ while [ true ] ; do continue fi # libffi contains "S" (other section symbols) that should not be stripped. - if [[ $file == *"libffi"* ]] ; then + if [[ $file = *"libffi"* ]] ; then continue fi if test x$STRIP != x ; then - strip -u -r -arch all $file &>/dev/null + # NSS is dynamically loaded, symbols cannot be stripped + if [[ $file = "libnspr4.dylib" -o $file = "libplds4.dylib" ]] ; then + # only remove debug and local symbols + strip -S -x -u -r -arch all $file &>/dev/null + else + strip -u -r -arch all $file &>/dev/null + fi fi deps=`otool -L $file | awk '{print $1}' | egrep "($GTKSTACK_ROOT|/opt/|/local/|libs/$STDCPP)" | grep -v 'libjack\.' | grep -v "$(basename $file)"`