diff options
author | Ian Lynagh <igloo@earth.li> | 2009-12-04 14:36:14 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2009-12-04 14:36:14 +0000 |
commit | 3e18f8be62b06c846b52d79717f79d51e2060593 (patch) | |
tree | 23ec97dd15bb48f3dd78f09c76c4894ac86a88d3 /libffi | |
parent | 5c2220aa9aac0fefcba5abbfa3059a6ef138655f (diff) | |
download | haskell-3e18f8be62b06c846b52d79717f79d51e2060593.tar.gz |
Link all dynamic libraries with the correct install_name on Mac OS/X.
This is a rerecord of
Stephen Blackheath <oversensitive.pastors.stephen@blacksapphire.com>**20090930222855
to avoid conflicts.
Diffstat (limited to 'libffi')
-rw-r--r-- | libffi/ghc.mk | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libffi/ghc.mk b/libffi/ghc.mk index 7104d046b9..92e11dddfa 100644 --- a/libffi/ghc.mk +++ b/libffi/ghc.mk @@ -84,10 +84,14 @@ libffi_DYNAMIC_PROG = $(libffi_HS_DYN_LIB).a libffi_DYNAMIC_LIBS = $(libffi_HS_DYN_LIB) else libffi_DYNAMIC_PROG = +ifeq "$(darwin_TARGET_OS)" "1" +libffi_DYNAMIC_LIBS = libffi/libffi$(soext) libffi/libffi.5$(soext) libffi/libffi.5.0.9$(soext) +else libffi_DYNAMIC_LIBS = libffi/dist-install/build/libffi.so \ libffi/dist-install/build/libffi.so.5 \ libffi/dist-install/build/libffi.so.5.0.9 endif +endif ifeq "$(BuildSharedLibs)" "YES" libffi_EnableShared=yes @@ -200,6 +204,10 @@ $(libffi_DYNAMIC_LIBS): $(libffi_STAMP_BUILD) # Rename libffi.so to libHSffi...so $(libffi_HS_DYN_LIB): $(libffi_DYNAMIC_LIBS) | $$(dir $$@)/. "$(CP)" $(word 1,$(libffi_DYNAMIC_LIBS)) $(libffi_HS_DYN_LIB) +ifeq "$(darwin_TARGET_OS)" "1" + # Ensure library's install name is correct before anyone links with it. + install_name_tool -id $(ghclibdir)/$(libffi_HS_DYN_LIB_NAME) $(libffi_HS_DYN_LIB) +endif $(eval $(call all-target,libffi,$(libffi_HS_DYN_LIB))) endif |