Thu Feb 5 17:45:20 2015 UTC ()
patches/patch-rts_ghc.mk: Fix build failure on Darwin

See the comment for details.


(pho)
diff -r1.6 -r1.7 pkgsrc/lang/ghc7/distinfo
diff -r1.3 -r1.4 pkgsrc/lang/ghc7/patches/patch-rts_ghc.mk

cvs diff -r1.6 -r1.7 pkgsrc/lang/ghc7/distinfo (expand / switch to unified diff)

--- pkgsrc/lang/ghc7/distinfo 2015/02/05 00:59:10 1.6
+++ pkgsrc/lang/ghc7/distinfo 2015/02/05 17:45:20 1.7
@@ -1,16 +1,16 @@ @@ -1,16 +1,16 @@
1$NetBSD: distinfo,v 1.6 2015/02/05 00:59:10 pho Exp $ 1$NetBSD: distinfo,v 1.7 2015/02/05 17:45:20 pho Exp $
2 2
3SHA1 (ghc-7.6.3-src.tar.bz2) = 8938e1ef08b37a4caa071fa169e79a3001d065ff 3SHA1 (ghc-7.6.3-src.tar.bz2) = 8938e1ef08b37a4caa071fa169e79a3001d065ff
4RMD160 (ghc-7.6.3-src.tar.bz2) = 82a673ed38b7cf9a59afeb01057625fc761a822b 4RMD160 (ghc-7.6.3-src.tar.bz2) = 82a673ed38b7cf9a59afeb01057625fc761a822b
5Size (ghc-7.6.3-src.tar.bz2) = 110763823 bytes 5Size (ghc-7.6.3-src.tar.bz2) = 110763823 bytes
6SHA1 (patch-Makefile) = a6692a4a90b8003a8719c51d82d15f5af0ba1907 6SHA1 (patch-Makefile) = a6692a4a90b8003a8719c51d82d15f5af0ba1907
7SHA1 (patch-ghc.mk) = c4210aaa3e2b4a319b0b70da375ac89fddde5cb7 7SHA1 (patch-ghc.mk) = c4210aaa3e2b4a319b0b70da375ac89fddde5cb7
8SHA1 (patch-libraries_base_configure.ac) = 4f160844cf0e0fe6c5825b9a0ad8287d6eaaecc1 8SHA1 (patch-libraries_base_configure.ac) = 4f160844cf0e0fe6c5825b9a0ad8287d6eaaecc1
9SHA1 (patch-libraries_integer-gmp_configure.ac) = bc5ce3a6c39d681c413eb08b66e7287e39406fe0 9SHA1 (patch-libraries_integer-gmp_configure.ac) = bc5ce3a6c39d681c413eb08b66e7287e39406fe0
10SHA1 (patch-libraries_integer-simple_GHC_Integer.hs) = f079285bc489c194959b9bee2aa5c977ec77ae1e 10SHA1 (patch-libraries_integer-simple_GHC_Integer.hs) = f079285bc489c194959b9bee2aa5c977ec77ae1e
11SHA1 (patch-libraries_integer-simple_GHC_Integer_Type.hs) = b3140e169726f78f6d3b4edcd4cc119b6f767bfa 11SHA1 (patch-libraries_integer-simple_GHC_Integer_Type.hs) = b3140e169726f78f6d3b4edcd4cc119b6f767bfa
12SHA1 (patch-libraries_unix_System_Posix_Files.hsc) = f2e0892f9ebb9d82ddaf71b014d9af33967848dc 12SHA1 (patch-libraries_unix_System_Posix_Files.hsc) = f2e0892f9ebb9d82ddaf71b014d9af33967848dc
13SHA1 (patch-mk_config.mk.in) = 90a156f6c455d4b2c5d10fdf65b3a170dcfc4892 13SHA1 (patch-mk_config.mk.in) = 90a156f6c455d4b2c5d10fdf65b3a170dcfc4892
14SHA1 (patch-rts_Linker.c) = 39d1ca7a856a3ec25e493e97832ef255562c0719 14SHA1 (patch-rts_Linker.c) = 39d1ca7a856a3ec25e493e97832ef255562c0719
15SHA1 (patch-rts_StgCRun.c) = 5d4010dc250af25db0b5b2717c510752f4813e73 15SHA1 (patch-rts_StgCRun.c) = 5d4010dc250af25db0b5b2717c510752f4813e73
16SHA1 (patch-rts_ghc.mk) = ad6f2e7dccc3027c7770164bfdab066cbfef3a6d 16SHA1 (patch-rts_ghc.mk) = 8e9c3a6a2585f0c753f37c00c8991f2fd8524570

cvs diff -r1.3 -r1.4 pkgsrc/lang/ghc7/patches/patch-rts_ghc.mk (expand / switch to unified diff)

--- pkgsrc/lang/ghc7/patches/patch-rts_ghc.mk 2014/05/24 04:49:40 1.3
+++ pkgsrc/lang/ghc7/patches/patch-rts_ghc.mk 2015/02/05 17:45:20 1.4
@@ -1,39 +1,63 @@ @@ -1,39 +1,63 @@
1$NetBSD: patch-rts_ghc.mk,v 1.3 2014/05/24 04:49:40 obache Exp $ 1$NetBSD: patch-rts_ghc.mk,v 1.4 2015/02/05 17:45:20 pho Exp $
 2
 3Hunk #2:
2 4
3This is pkgsrc specific: dtrace(1) gets confused when we have gcc 5This is pkgsrc specific: dtrace(1) gets confused when we have gcc
4wrappers in the PATH so we have to hide them: 6wrappers in the PATH so we have to hide them:
5 7
6 gcc: installation problem, cannot exec '/usr/pkgsrc/wip/ghc/work/.gcc/bin/p 8 gcc: installation problem, cannot exec '/usr/pkgsrc/wip/ghc/work/.gcc/bin/p
7 owerpc-apple-darwin9-gcc-4.0.1': No such file or directory 9 owerpc-apple-darwin9-gcc-4.0.1': No such file or directory
8 dtrace: failed to compile script rts/RtsProbes.d: Preprocessor failed to pr 10 dtrace: failed to compile script rts/RtsProbes.d: Preprocessor failed to pr
9 ocess input program 11 ocess input program
10 12
11Also install libffi.{a,la} so we can expand to figure out .so extensions. 13Hunk #1, #3:
 14
 15Install libffi.{a,la} too, so that the plist framework can deal with
 16.so name being different between platforms. Note that
 17"libffi$(soext)*" matches to libffi.{so,so.6,so.6.0} but not to
 18libffi.6.dylib so the pattern must be corrected to "libffi*$(soext)*",
 19otherwise libtool-expand will emit the following error on Mach-O
 20platforms:
 21
 22 libtool-expand: `lib/ghc-7.6.3/libffi.6.dylib' was not found
 23
 24For what it's worth, this ain't the right way to install libtool
 25libraries. They should always be installed by running
 26"libtool --mode=install install -c foo.la /path/to/destination", which
 27can't be achieved without a major refactoring of the GHC build system.
 28And for that matter, GHC shouldn't install a local copy of libffi in
 29the first place. In fact GHC 7.8 seems to have a configure option
 30"--with-system-libffi" so we can hopefully remove these unpleasant
 31hunks in the future.
12 32
13--- rts/ghc.mk.orig 2013-04-18 21:22:47.000000000 +0000 33--- rts/ghc.mk.orig 2013-04-18 21:22:47.000000000 +0000
14+++ rts/ghc.mk 34+++ rts/ghc.mk
15@@ -114,6 +114,7 @@ $(rts_ffi_objs_stamp): $(libffi_STATIC_L 35@@ -113,7 +113,8 @@ $(rts_ffi_objs_stamp): $(libffi_STATIC_L
 36 # This is a little hacky. We don't know the SO version, so we only
16 # depend on libffi.so, but copy libffi.so* 37 # depend on libffi.so, but copy libffi.so*
17 rts/dist/build/libffi$(soext): libffi/build/inst/lib/libffi$(soext) 38 rts/dist/build/libffi$(soext): libffi/build/inst/lib/libffi$(soext)
18 cp libffi/build/inst/lib/libffi$(soext)* rts/dist/build 39- cp libffi/build/inst/lib/libffi$(soext)* rts/dist/build
 40+ cp libffi/build/inst/lib/libffi*$(soext)* rts/dist/build
19+ cp libffi/build/inst/lib/libffi.*a rts/dist/build 41+ cp libffi/build/inst/lib/libffi.*a rts/dist/build
20  42
21 rts/dist/build/$(LIBFFI_DLL): libffi/build/inst/bin/$(LIBFFI_DLL) 43 rts/dist/build/$(LIBFFI_DLL): libffi/build/inst/bin/$(LIBFFI_DLL)
22 cp $< $@ 44 cp $< $@
23@@ -484,7 +485,7 @@ endif 45@@ -484,7 +485,7 @@ endif
24  46
25 DTRACEPROBES_SRC = rts/RtsProbes.d 47 DTRACEPROBES_SRC = rts/RtsProbes.d
26 $(DTRACEPROBES_H): $(DTRACEPROBES_SRC) includes/ghcplatform.h | $$(dir $$@)/. 48 $(DTRACEPROBES_H): $(DTRACEPROBES_SRC) includes/ghcplatform.h | $$(dir $$@)/.
27- "$(DTRACE)" $(filter -I%,$(rts_CC_OPTS)) -C $(DTRACE_FLAGS) -h -o $@ -s $< 49- "$(DTRACE)" $(filter -I%,$(rts_CC_OPTS)) -C $(DTRACE_FLAGS) -h -o $@ -s $<
28+ env PATH="/usr/bin" "$(DTRACE)" $(filter -I%,$(rts_CC_OPTS)) -C $(DTRACE_FLAGS) -h -o $@ -s $< 50+ env PATH="/usr/bin" "$(DTRACE)" $(filter -I%,$(rts_CC_OPTS)) -C $(DTRACE_FLAGS) -h -o $@ -s $<
29 endif 51 endif
30  52
31 # ----------------------------------------------------------------------------- 53 # -----------------------------------------------------------------------------
32@@ -510,6 +511,7 @@ endif 54@@ -509,7 +510,8 @@ endif
 55 # installing
33  56
34 INSTALL_LIBS += $(ALL_RTS_LIBS) 57 INSTALL_LIBS += $(ALL_RTS_LIBS)
35 INSTALL_LIBS += $(wildcard rts/dist/build/libffi$(soext)*) 58-INSTALL_LIBS += $(wildcard rts/dist/build/libffi$(soext)*)
 59+INSTALL_LIBS += $(wildcard rts/dist/build/libffi*$(soext)*)
36+INSTALL_LIBS += $(wildcard rts/dist/build/libffi.*a) 60+INSTALL_LIBS += $(wildcard rts/dist/build/libffi.*a)
37 INSTALL_LIBS += $(wildcard rts/dist/build/$(LIBFFI_DLL)) 61 INSTALL_LIBS += $(wildcard rts/dist/build/$(LIBFFI_DLL))
38  62
39 install: install_libffi_headers 63 install: install_libffi_headers