From b9b83748f32b105b2cca0242ae4131521ad18290 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Thu, 15 Nov 2018 21:02:42 +0000 Subject: gcj: fix build on Darwin Partially addresses https://github.com/NixOS/nixpkgs/issues/29715. --- pkgs/build-support/setup-hooks/fix-darwin-dylib-names.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'pkgs/build-support') diff --git a/pkgs/build-support/setup-hooks/fix-darwin-dylib-names.sh b/pkgs/build-support/setup-hooks/fix-darwin-dylib-names.sh index 1b36f5f555d..af2ff0cc966 100644 --- a/pkgs/build-support/setup-hooks/fix-darwin-dylib-names.sh +++ b/pkgs/build-support/setup-hooks/fix-darwin-dylib-names.sh @@ -23,7 +23,14 @@ fixDarwinDylibNames() { for fn in "$@"; do if [ -L "$fn" ]; then continue; fi echo "$fn: fixing dylib" - install_name_tool -id "$fn" "${flags[@]}" "$fn" + int_out=$(install_name_tool -id "$fn" "${flags[@]}" "$fn" 2>&1) + result=$? + if [ "$result" -ne 0 ] && + ! grep "shared library stub file and can't be changed" <<< "$out" + then + echo "$int_out" >&2 + exit "$result" + fi done } -- cgit 1.4.1