summary refs log tree commit diff
path: root/pkgs/development/compilers/gcc
diff options
context:
space:
mode:
authorAndreas Fuchs <asf@boinkor.net>2020-08-03 23:38:57 -0400
committerAndreas Fuchs <asf@boinkor.net>2020-08-25 08:12:35 -0400
commit175995986337e58e8ceec72d09515332fe363d3a (patch)
tree58025b784d772136dedca1e603a1ec14b6f0eeaf /pkgs/development/compilers/gcc
parent0d15ea9500664a3b4e98dc1c837a809b61785b77 (diff)
downloadnixpkgs-175995986337e58e8ceec72d09515332fe363d3a.tar
nixpkgs-175995986337e58e8ceec72d09515332fe363d3a.tar.gz
nixpkgs-175995986337e58e8ceec72d09515332fe363d3a.tar.bz2
nixpkgs-175995986337e58e8ceec72d09515332fe363d3a.tar.lz
nixpkgs-175995986337e58e8ceec72d09515332fe363d3a.tar.xz
nixpkgs-175995986337e58e8ceec72d09515332fe363d3a.tar.zst
nixpkgs-175995986337e58e8ceec72d09515332fe363d3a.zip
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.
Diffstat (limited to 'pkgs/development/compilers/gcc')
-rw-r--r--pkgs/development/compilers/gcc/builder.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/development/compilers/gcc/builder.sh b/pkgs/development/compilers/gcc/builder.sh
index 45587020844..80e07c7f93f 100644
--- a/pkgs/development/compilers/gcc/builder.sh
+++ b/pkgs/development/compilers/gcc/builder.sh
@@ -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},"`