From 3099fa4d2c4f0718f6dc6802cfdc4b1daec38124 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Tue, 30 Dec 2014 13:57:30 -0500 Subject: llvm: use absolute dylib IDs Fixes #32566. --- Library/Formula/llvm.rb | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) (limited to 'Library') diff --git a/Library/Formula/llvm.rb b/Library/Formula/llvm.rb index 804415456..ab67f73a2 100644 --- a/Library/Formula/llvm.rb +++ b/Library/Formula/llvm.rb @@ -1,5 +1,3 @@ -require 'formula' - class Llvm < Formula homepage 'http://llvm.org/' @@ -37,6 +35,9 @@ class Llvm < Formula end end + # Use absolute paths for shared library IDs + patch :DATA + option :universal option 'with-clang', 'Build Clang support library' option 'with-lld', 'Build LLD linker' @@ -114,3 +115,23 @@ class Llvm < Formula EOS end end + +__END__ +diff --git a/Makefile.rules b/Makefile.rules +index ebebc0a..b0bb378 100644 +--- a/Makefile.rules ++++ b/Makefile.rules +@@ -599,7 +599,12 @@ ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW)) + ifneq ($(HOST_OS),Darwin) + LD.Flags += $(RPATH) -Wl,'$$ORIGIN' + else +- LD.Flags += -Wl,-install_name -Wl,"@rpath/lib$(LIBRARYNAME)$(SHLIBEXT)" ++ LD.Flags += -Wl,-install_name ++ ifdef LOADABLE_MODULE ++ LD.Flags += -Wl,"$(PROJ_libdir)/$(LIBRARYNAME)$(SHLIBEXT)" ++ else ++ LD.Flags += -Wl,"$(PROJ_libdir)/$(SharedPrefix)$(LIBRARYNAME)$(SHLIBEXT)" ++ endif + endif + endif + endif -- cgit v1.2.3