forked from mirrors/nixpkgs
gcc: On darwin, adjust IDs of installed .so files also
Turns out that libgccjit gets installed as a .so file, which the gcc builder.sh didn't change: It only touched .dylib files; that means that anything linking in libgccjit.so would receive an "Image not found" error at load time. With this change, we invoke `install_name_tool` on .so files too, adjusting their dynamic linker ID, so that they too can be found.
This commit is contained in:
parent
0d15ea9500
commit
1759959863
|
@ -251,7 +251,7 @@ postInstall() {
|
|||
fi
|
||||
|
||||
if type "install_name_tool"; then
|
||||
for i in "${!outputLib}"/lib/*.*.dylib; do
|
||||
for i in "${!outputLib}"/lib/*.*.dylib "${!outputLib}"/lib/*.so.[0-9]; do
|
||||
install_name_tool -id "$i" "$i" || true
|
||||
for old_path in $(otool -L "$i" | grep "$out" | awk '{print $1}'); do
|
||||
new_path=`echo "$old_path" | sed "s,$out,${!outputLib},"`
|
||||
|
|
Loading…
Reference in a new issue