pkgsrc-Changes archive

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

CVS commit: pkgsrc/lang/ghc88



Module Name:    pkgsrc
Committed By:   pho
Date:           Thu Apr 29 05:09:08 UTC 2021

Modified Files:
        pkgsrc/lang/ghc88: Makefile distinfo
        pkgsrc/lang/ghc88/patches: patch-rules_distdir-way-opts.mk
Added Files:
        pkgsrc/lang/ghc88/patches: patch-rts_ghc.mk
            patch-rules_build-package-way.mk

Log Message:
Eliminate use of @rpath and @loader_path on Darwin

They are essentially equivalent to $ORIGIN of ELF.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 pkgsrc/lang/ghc88/Makefile
cvs rdiff -u -r1.16 -r1.17 pkgsrc/lang/ghc88/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/lang/ghc88/patches/patch-rts_ghc.mk \
    pkgsrc/lang/ghc88/patches/patch-rules_build-package-way.mk
cvs rdiff -u -r1.3 -r1.4 \
    pkgsrc/lang/ghc88/patches/patch-rules_distdir-way-opts.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/lang/ghc88/Makefile
diff -u pkgsrc/lang/ghc88/Makefile:1.18 pkgsrc/lang/ghc88/Makefile:1.19
--- pkgsrc/lang/ghc88/Makefile:1.18     Wed Apr 28 15:39:23 2021
+++ pkgsrc/lang/ghc88/Makefile  Thu Apr 29 05:09:08 2021
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.18 2021/04/28 15:39:23 pho Exp $
+# $NetBSD: Makefile,v 1.19 2021/04/29 05:09:08 pho Exp $
 # -----------------------------------------------------------------------------
 # Package metadata
 #
 DISTNAME=      ghc-8.8.4-src
 PKGNAME=       ${DISTNAME:S/-src$//}
-PKGREVISION=   3
+PKGREVISION=   4
 CATEGORIES=    lang
 MASTER_SITES=  https://downloads.haskell.org/~ghc/${PKGVERSION_NOREV}/
 EXTRACT_SUFX=  .tar.xz

Index: pkgsrc/lang/ghc88/distinfo
diff -u pkgsrc/lang/ghc88/distinfo:1.16 pkgsrc/lang/ghc88/distinfo:1.17
--- pkgsrc/lang/ghc88/distinfo:1.16     Wed Apr 28 15:39:23 2021
+++ pkgsrc/lang/ghc88/distinfo  Thu Apr 29 05:09:08 2021
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.16 2021/04/28 15:39:23 pho Exp $
+$NetBSD: distinfo,v 1.17 2021/04/29 05:09:08 pho Exp $
 
 SHA1 (ghc-8.4.4-boot-i386-unknown-freebsd.tar.xz) = 04981802730423aa12999e59679be198d540222a
 RMD160 (ghc-8.4.4-boot-i386-unknown-freebsd.tar.xz) = f617e67f2c2f07c7211cb391a4bc2e7b304045e2
@@ -46,4 +46,6 @@ SHA1 (patch-libraries_unix_System_Posix_
 SHA1 (patch-libraries_unix_System_Posix_Signals.hsc) = 49215dce493a6bbc440f91a3959e592f86fc779b
 SHA1 (patch-libraries_unix_include_execvpe.h) = 67dd9720a71a6a55bbe2b50e61621ca60187ef00
 SHA1 (patch-rts_StgCRun.c) = 121c7bd714725d5b14a3cbb03d81b1c769848824
-SHA1 (patch-rules_distdir-way-opts.mk) = 1430f03c2dfc3462a68002c76bfefcf38622429b
+SHA1 (patch-rts_ghc.mk) = 6e3daf71fb7e656131aa2aeeb0346c651520216a
+SHA1 (patch-rules_build-package-way.mk) = ec73df0bbc85e962f76a9068683879a1a1ba1815
+SHA1 (patch-rules_distdir-way-opts.mk) = a058c6428faf02ef94aab3336d2d2874f2726f4e

Index: pkgsrc/lang/ghc88/patches/patch-rules_distdir-way-opts.mk
diff -u pkgsrc/lang/ghc88/patches/patch-rules_distdir-way-opts.mk:1.3 pkgsrc/lang/ghc88/patches/patch-rules_distdir-way-opts.mk:1.4
--- pkgsrc/lang/ghc88/patches/patch-rules_distdir-way-opts.mk:1.3       Wed Apr 28 15:39:23 2021
+++ pkgsrc/lang/ghc88/patches/patch-rules_distdir-way-opts.mk   Thu Apr 29 05:09:08 2021
@@ -1,10 +1,17 @@
-$NetBSD: patch-rules_distdir-way-opts.mk,v 1.3 2021/04/28 15:39:23 pho Exp $
+$NetBSD: patch-rules_distdir-way-opts.mk,v 1.4 2021/04/29 05:09:08 pho Exp $
 
-Use correct RPATHs.
+Use correct RPATHs. On ELF we replace "$ORIGIN/../{PACKAGE_ID}" with
+the final installation path.
+
+On Darwin library paths work differently. If an executable (or a
+library) A depends on a library B, the installation path of B is first
+embedded in B, and then the path propagates to A at the time when A is
+linked. So we remove -rpath to libraries here, and do the other half
+in rules/build-package-way.mk and rts/ghc.mk.
 
 --- rules/distdir-way-opts.mk.orig     2020-07-08 16:43:04.000000000 +0000
 +++ rules/distdir-way-opts.mk
-@@ -209,7 +209,7 @@ ifneq "$4" "0"
+@@ -209,11 +209,10 @@ ifneq "$4" "0"
  ifeq "$$(TargetElf)" "YES"
  $1_$2_$3_GHC_LD_OPTS += \
      -fno-use-rpaths \
@@ -12,4 +19,9 @@ Use correct RPATHs.
 +    $$(foreach d,$$($1_$2_TRANSITIVE_DEP_COMPONENT_IDS),-optl-Wl$$(comma)-rpath -optl-Wl$$(comma)$$(ghclibdir)/$$d)
  else ifeq "$$(TargetOS_CPP)" "darwin"
  $1_$2_$3_GHC_LD_OPTS += \
-     -fno-use-rpaths \
+-    -fno-use-rpaths \
+-    $$(foreach d,$$($1_$2_TRANSITIVE_DEP_COMPONENT_IDS),-optl-Wl$$(comma)-rpath -optl-Wl$$(comma)'@loader_path/../$$d')
++    -fno-use-rpaths
+ endif
+ endif
+ endif

Added files:

Index: pkgsrc/lang/ghc88/patches/patch-rts_ghc.mk
diff -u /dev/null pkgsrc/lang/ghc88/patches/patch-rts_ghc.mk:1.1
--- /dev/null   Thu Apr 29 05:09:08 2021
+++ pkgsrc/lang/ghc88/patches/patch-rts_ghc.mk  Thu Apr 29 05:09:08 2021
@@ -0,0 +1,14 @@
+$NetBSD: patch-rts_ghc.mk,v 1.1 2021/04/29 05:09:08 pho Exp $
+
+This is for Darwin. See the patch to rules/distdir-way-opts.mk.
+
+--- rts/ghc.mk.orig    2021-04-29 03:14:20.000000000 +0000
++++ rts/ghc.mk
+@@ -251,6 +251,7 @@ endif
+ $$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) rts/dist/libs.depend $$(rts_dist_FFI_SO)
+       "$$(RM)" $$(RM_OPTS) $$@
+       "$$(rts_dist_HC)" -this-unit-id rts -shared -dynamic -dynload deploy \
++        -dylib-install-name $$(ghclibdir)/rts/$$(rts_$1_LIB_FILE) \
+         -no-auto-link-packages $$(LIBFFI_LIBS) `cat rts/dist/libs.depend` $$(rts_$1_OBJS) \
+           $$(rts_dist_$1_GHC_LD_OPTS) \
+         $$(rts_$1_DTRACE_OBJS) -o $$@
Index: pkgsrc/lang/ghc88/patches/patch-rules_build-package-way.mk
diff -u /dev/null pkgsrc/lang/ghc88/patches/patch-rules_build-package-way.mk:1.1
--- /dev/null   Thu Apr 29 05:09:08 2021
+++ pkgsrc/lang/ghc88/patches/patch-rules_build-package-way.mk  Thu Apr 29 05:09:08 2021
@@ -0,0 +1,14 @@
+$NetBSD: patch-rules_build-package-way.mk,v 1.1 2021/04/29 05:09:08 pho Exp $
+
+This is for Darwin. See the patch to rules/distdir-way-opts.mk.
+
+--- rules/build-package-way.mk.orig    2021-04-28 17:51:42.000000000 +0000
++++ rules/build-package-way.mk
+@@ -64,6 +64,7 @@ else # ifneq "$$(TargetOS_CPP)" "mingw32
+ $$($1_$2_$3_LIB) : $$($1_$2_$3_ALL_OBJS) $$(ALL_RTS_LIBS) $$($1_$2_$3_DEPS_LIBS)
+       $$(call cmd,$1_$2_HC) $$($1_$2_$3_ALL_HC_OPTS) $$($1_$2_$3_GHC_LD_OPTS) $$($1_$2_$3_ALL_OBJS) \
+          -shared -dynamic -dynload deploy \
++       -dylib-install-name $$(ghclibdir)/$$($1_$2_COMPONENT_ID)/$$($1_$2_$3_LIB_FILE) \
+        $$(addprefix -l,$$($1_$2_EXTRA_LIBRARIES)) $$(addprefix -L,$$($1_$2_EXTRA_LIBDIRS)) \
+          -no-auto-link-packages \
+          -o $$@



Home | Main Index | Thread Index | Old Index