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>
This commit is contained in:
parent
a617ae70ec
commit
e9a7e8d562
1 changed files with 22 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue