diff options
author | pho <pho> | 2015-02-05 17:45:20 +0000 |
---|---|---|
committer | pho <pho> | 2015-02-05 17:45:20 +0000 |
commit | 14bdc1910fec30fdde299a3d547f71806af6c8c7 (patch) | |
tree | 3802a248f661e88930107be5a34fa151711228f0 /lang/ghc7 | |
parent | 3fffad0b3e15eb4aed387f96450c9d376aee162d (diff) | |
download | pkgsrc-14bdc1910fec30fdde299a3d547f71806af6c8c7.tar.gz |
patches/patch-rts_ghc.mk: Fix build failure on Darwin
See the comment for details.
Diffstat (limited to 'lang/ghc7')
-rw-r--r-- | lang/ghc7/distinfo | 4 | ||||
-rw-r--r-- | lang/ghc7/patches/patch-rts_ghc.mk | 36 |
2 files changed, 32 insertions, 8 deletions
diff --git a/lang/ghc7/distinfo b/lang/ghc7/distinfo index c0dd5989fbc..82eaa89dbe5 100644 --- a/lang/ghc7/distinfo +++ b/lang/ghc7/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.6 2015/02/05 00:59:10 pho Exp $ +$NetBSD: distinfo,v 1.7 2015/02/05 17:45:20 pho Exp $ SHA1 (ghc-7.6.3-src.tar.bz2) = 8938e1ef08b37a4caa071fa169e79a3001d065ff RMD160 (ghc-7.6.3-src.tar.bz2) = 82a673ed38b7cf9a59afeb01057625fc761a822b @@ -13,4 +13,4 @@ SHA1 (patch-libraries_unix_System_Posix_Files.hsc) = f2e0892f9ebb9d82ddaf71b014d SHA1 (patch-mk_config.mk.in) = 90a156f6c455d4b2c5d10fdf65b3a170dcfc4892 SHA1 (patch-rts_Linker.c) = 39d1ca7a856a3ec25e493e97832ef255562c0719 SHA1 (patch-rts_StgCRun.c) = 5d4010dc250af25db0b5b2717c510752f4813e73 -SHA1 (patch-rts_ghc.mk) = ad6f2e7dccc3027c7770164bfdab066cbfef3a6d +SHA1 (patch-rts_ghc.mk) = 8e9c3a6a2585f0c753f37c00c8991f2fd8524570 diff --git a/lang/ghc7/patches/patch-rts_ghc.mk b/lang/ghc7/patches/patch-rts_ghc.mk index 4194f7be60d..f1d884bbf03 100644 --- a/lang/ghc7/patches/patch-rts_ghc.mk +++ b/lang/ghc7/patches/patch-rts_ghc.mk @@ -1,4 +1,6 @@ -$NetBSD: patch-rts_ghc.mk,v 1.3 2014/05/24 04:49:40 obache Exp $ +$NetBSD: patch-rts_ghc.mk,v 1.4 2015/02/05 17:45:20 pho Exp $ + +Hunk #2: This is pkgsrc specific: dtrace(1) gets confused when we have gcc wrappers in the PATH so we have to hide them: @@ -8,14 +10,34 @@ wrappers in the PATH so we have to hide them: dtrace: failed to compile script rts/RtsProbes.d: Preprocessor failed to pr ocess input program -Also install libffi.{a,la} so we can expand to figure out .so extensions. +Hunk #1, #3: + +Install libffi.{a,la} too, so that the plist framework can deal with +.so name being different between platforms. Note that +"libffi$(soext)*" matches to libffi.{so,so.6,so.6.0} but not to +libffi.6.dylib so the pattern must be corrected to "libffi*$(soext)*", +otherwise libtool-expand will emit the following error on Mach-O +platforms: + + libtool-expand: `lib/ghc-7.6.3/libffi.6.dylib' was not found + +For what it's worth, this ain't the right way to install libtool +libraries. They should always be installed by running +"libtool --mode=install install -c foo.la /path/to/destination", which +can't be achieved without a major refactoring of the GHC build system. +And for that matter, GHC shouldn't install a local copy of libffi in +the first place. In fact GHC 7.8 seems to have a configure option +"--with-system-libffi" so we can hopefully remove these unpleasant +hunks in the future. --- rts/ghc.mk.orig 2013-04-18 21:22:47.000000000 +0000 +++ rts/ghc.mk -@@ -114,6 +114,7 @@ $(rts_ffi_objs_stamp): $(libffi_STATIC_L +@@ -113,7 +113,8 @@ $(rts_ffi_objs_stamp): $(libffi_STATIC_L + # This is a little hacky. We don't know the SO version, so we only # depend on libffi.so, but copy libffi.so* rts/dist/build/libffi$(soext): libffi/build/inst/lib/libffi$(soext) - cp libffi/build/inst/lib/libffi$(soext)* rts/dist/build +- cp libffi/build/inst/lib/libffi$(soext)* rts/dist/build ++ cp libffi/build/inst/lib/libffi*$(soext)* rts/dist/build + cp libffi/build/inst/lib/libffi.*a rts/dist/build rts/dist/build/$(LIBFFI_DLL): libffi/build/inst/bin/$(LIBFFI_DLL) @@ -29,10 +51,12 @@ Also install libffi.{a,la} so we can expand to figure out .so extensions. endif # ----------------------------------------------------------------------------- -@@ -510,6 +511,7 @@ endif +@@ -509,7 +510,8 @@ endif + # installing INSTALL_LIBS += $(ALL_RTS_LIBS) - INSTALL_LIBS += $(wildcard rts/dist/build/libffi$(soext)*) +-INSTALL_LIBS += $(wildcard rts/dist/build/libffi$(soext)*) ++INSTALL_LIBS += $(wildcard rts/dist/build/libffi*$(soext)*) +INSTALL_LIBS += $(wildcard rts/dist/build/libffi.*a) INSTALL_LIBS += $(wildcard rts/dist/build/$(LIBFFI_DLL)) |