pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk mk/haskell.mk: Enable --enable-split-sections



details:   https://anonhg.NetBSD.org/pkgsrc/rev/b5747c0d3269
branches:  trunk
changeset: 374744:b5747c0d3269
user:      pho <pho%pkgsrc.org@localhost>
date:      Sat Feb 26 03:55:37 2022 +0000

description:
mk/haskell.mk: Enable --enable-split-sections

Ask GHC to put each compiled function in a separate section and ld(1) to
perform GC. This greatly reduces the size of executables linked with static
Haskell libraries. For example, lang/purescript shrinks down from 104 MiB
to 57 MiB! Reduced storage use means reduced I/O cost!

diffstat:

 mk/haskell.mk |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (17 lines):

diff -r 2e46f9434179 -r b5747c0d3269 mk/haskell.mk
--- a/mk/haskell.mk     Fri Feb 25 23:03:10 2022 +0000
+++ b/mk/haskell.mk     Sat Feb 26 03:55:37 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: haskell.mk,v 1.42 2022/02/23 16:03:00 pho Exp $
+# $NetBSD: haskell.mk,v 1.43 2022/02/26 03:55:37 pho Exp $
 #
 # This Makefile fragment handles Haskell Cabal packages. Package
 # configuration, building, installation, registration and unregistration
@@ -182,6 +182,7 @@
 .endif
 
 CONFIGURE_ARGS+=       -O${HASKELL_OPTIMIZATION_LEVEL}
+CONFIGURE_ARGS+=       --enable-split-sections
 
 # Support RELRO. When PKGSRC_USE_RELRO isn't set to "no",
 # mk/compiler/{ghc,clang}.mk add "-Wl,-z,relro" and optionally



Home | Main Index | Thread Index | Old Index