pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/ghc7 patches/patch-rts_ghc.mk: Fix build failure ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f729f3dc0edb
branches:  trunk
changeset: 646238:f729f3dc0edb
user:      pho <pho%pkgsrc.org@localhost>
date:      Thu Feb 05 17:45:20 2015 +0000

description:
patches/patch-rts_ghc.mk: Fix build failure on Darwin

See the comment for details.

diffstat:

 lang/ghc7/distinfo                 |   4 ++--
 lang/ghc7/patches/patch-rts_ghc.mk |  36 ++++++++++++++++++++++++++++++------
 2 files changed, 32 insertions(+), 8 deletions(-)

diffs (79 lines):

diff -r 00dfd9ef567d -r f729f3dc0edb lang/ghc7/distinfo
--- a/lang/ghc7/distinfo        Thu Feb 05 17:42:06 2015 +0000
+++ b/lang/ghc7/distinfo        Thu Feb 05 17:45:20 2015 +0000
@@ -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-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 -r 00dfd9ef567d -r f729f3dc0edb lang/ghc7/patches/patch-rts_ghc.mk
--- a/lang/ghc7/patches/patch-rts_ghc.mk        Thu Feb 05 17:42:06 2015 +0000
+++ b/lang/ghc7/patches/patch-rts_ghc.mk        Thu Feb 05 17:45:20 2015 +0000
@@ -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 @@
   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 @@
  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))
  



Home | Main Index | Thread Index | Old Index