about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/compilers
diff options
context:
space:
mode:
authorAndreas Fuchs <asf@boinkor.net>2020-08-03 23:38:57 -0400
committerAlyssa Ross <hi@alyssa.is>2020-11-27 13:28:14 +0000
commit1313dbc4c9068f2c47c808b537aba5f14da8ba1c (patch)
tree4e44b70490ab9313cd71d8836a33ad1fc14f0e07 /nixpkgs/pkgs/development/compilers
parent91a2193e6d7f93c3cdf09dc0cbebff92bcb959dc (diff)
downloadnixlib-1313dbc4c9068f2c47c808b537aba5f14da8ba1c.tar
nixlib-1313dbc4c9068f2c47c808b537aba5f14da8ba1c.tar.gz
nixlib-1313dbc4c9068f2c47c808b537aba5f14da8ba1c.tar.bz2
nixlib-1313dbc4c9068f2c47c808b537aba5f14da8ba1c.tar.lz
nixlib-1313dbc4c9068f2c47c808b537aba5f14da8ba1c.tar.xz
nixlib-1313dbc4c9068f2c47c808b537aba5f14da8ba1c.tar.zst
nixlib-1313dbc4c9068f2c47c808b537aba5f14da8ba1c.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.

(cherry picked from commit 175995986337e58e8ceec72d09515332fe363d3a)
Diffstat (limited to 'nixpkgs/pkgs/development/compilers')
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/builder.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixpkgs/pkgs/development/compilers/gcc/builder.sh b/nixpkgs/pkgs/development/compilers/gcc/builder.sh
index d242f1a822cd..2204744a4b59 100644
--- a/nixpkgs/pkgs/development/compilers/gcc/builder.sh
+++ b/nixpkgs/pkgs/development/compilers/gcc/builder.sh
@@ -261,7 +261,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},"`