furnace/extern/libsndfile-modified/src/make-static-lib-hidden-privates.sh
tildearrow 061991fe60 desubmodulize libsndfile - PLEASE READ
it appears a one-character typo in the cmake_minimum_required line prevents it from compiling under CMake 4.0.
in order to fix that, I had to take this thing out of submodules...

it is recommended to do this after you pull;

git submodule deinit extern/libsndfile
2025-04-02 15:09:53 -05:00

15 lines
472 B
Bash
Executable file

#!/bin/bash -e
# This script takes a static library and removes all non-public symbols.
# Ie, it makes a static lib whose symbols are far less likely to clash with
# the symbols of another shared or static library.
grep sf_ Symbols.gnu-binutils | sed -e "s/[ ;]//g" > Symbols.static
ld -r --whole-archive .libs/libsndfile.a -o libsndfile_a.o
objcopy --keep-global-symbols=Symbols.static libsndfile_a.o libsndfile.o
rm -f libsndfile.a
ar cru libsndfile.a libsndfile.o