aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/llvm.rb
diff options
context:
space:
mode:
authorRonaldo M. Ferraz2011-01-14 14:13:32 -0200
committerMike McQuaid2011-01-20 20:45:56 +0000
commit53886683124046fb92b54d8f3c2aff2d90582c9a (patch)
tree92df61fa0c1c399216fa6b94fd4e44e4d74b5307 /Library/Formula/llvm.rb
parent8bf646b7ac53d16ee0c5baa8ffff3330389b48c9 (diff)
downloadhomebrew-53886683124046fb92b54d8f3c2aff2d90582c9a.tar.bz2
Added a patch to fix load errors in LLVM's shared library for 10.6
LLVM tries to build its shared library using a flat namespace, and that runs contrary to current practice when building Mac OS X libraries. This patch fixes the Makefile.rules to use proper libtool/link options. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Formula/llvm.rb')
-rw-r--r--Library/Formula/llvm.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/Library/Formula/llvm.rb b/Library/Formula/llvm.rb
index eb0df61f1..d4a48ac10 100644
--- a/Library/Formula/llvm.rb
+++ b/Library/Formula/llvm.rb
@@ -16,6 +16,13 @@ class Llvm <Formula
homepage 'http://llvm.org/'
md5 '220d361b4d17051ff4bb21c64abe05ba'
+ def patches
+ # changes the link options for the shared library build
+ # to use the preferred way to build libraries in Mac OS X
+ # Reported upstream: http://llvm.org/bugs/show_bug.cgi?id=8985
+ DATA if build_shared?
+ end
+
def options
[['--with-clang', 'Also build & install clang'],
['--shared', 'Build shared library'],
@@ -69,3 +76,18 @@ class Llvm <Formula
EOS
end
end
+
+__END__
+diff --git a/Makefile.rules b/Makefile.rules
+index 9cff105..44d5b2d 100644
+--- a/Makefile.rules
++++ b/Makefile.rules
+@@ -497,7 +497,7 @@ ifeq ($(HOST_OS),Darwin)
+ # Get "4" out of 10.4 for later pieces in the makefile.
+ DARWIN_MAJVERS := $(shell echo $(DARWIN_VERSION)| sed -E 's/10.([0-9]).*/\1/')
+
+- SharedLinkOptions=-Wl,-flat_namespace -Wl,-undefined,suppress \
++ SharedLinkOptions=-Wl,-undefined,dynamic_lookup \
+ -dynamiclib
+ ifneq ($(ARCH),ARM)
+ SharedLinkOptions += -mmacosx-version-min=$(DARWIN_VERSION)