[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#61420] [PATCH 22/31] build: haskell-build-system: Build static exec
From: |
Lars-Dominik Braun |
Subject: |
[bug#61420] [PATCH 22/31] build: haskell-build-system: Build static executables by default. |
Date: |
Sat, 11 Feb 2023 11:08:16 +0100 |
This is the only way to get reasonably small binaries that don’t pull
in a ton of ghc-* packages.
* guix/build/haskell-build-system.scm (configure): Explicitly
add --enable-static and --disable-executable-dynamic, as well as
-split-sections to configure flags.
---
guix/build/haskell-build-system.scm | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/guix/build/haskell-build-system.scm
b/guix/build/haskell-build-system.scm
index d77f55da19..0e94cf59a5 100644
--- a/guix/build/haskell-build-system.scm
+++ b/guix/build/haskell-build-system.scm
@@ -99,10 +99,14 @@ (define* (configure #:key outputs inputs tests?
(configure-flags '())
,@(if tests?
'("--enable-tests")
'())
- ;; Build and link with shared libraries
+ ;; Build static and shared libraries.
"--enable-shared"
- "--enable-executable-dynamic"
+ "--enable-static"
+ ;; Link executables statically by default.
+ "--disable-executable-dynamic"
"--ghc-option=-fPIC"
+ ;; Ensure static libraries can be used with
-Wl,--gc-sections for size.
+ "--ghc-option=-split-sections"
,@configure-flags)))
;; Cabal errors if GHC_PACKAGE_PATH is set during 'configure', so unset
;; and restore it.
--
2.38.2
- [bug#61420] [PATCH 00/31] Haskell upgrade to Stackage 20.5, Lars-Dominik Braun, 2023/02/11
- [bug#61420] [PATCH 01/31] import: hackage: Allow version at the beginning of cabal file., Lars-Dominik Braun, 2023/02/11
- [bug#61420] [PATCH 03/31] build: haskell-build-system: Support multiple libraries., Lars-Dominik Braun, 2023/02/11
- [bug#61420] [PATCH 05/31] import: stackage: Update to release 20.5., Lars-Dominik Braun, 2023/02/11
- [bug#61420] [PATCH 04/31] gnu: Switch default to GHC 9.2., Lars-Dominik Braun, 2023/02/11
- [bug#61420] [PATCH 10/31] import: haskell: Add new internal library for GHC 9.2., Lars-Dominik Braun, 2023/02/11
- [bug#61420] [PATCH 15/31] gnu: Remove unused Haskell packages., Lars-Dominik Braun, 2023/02/11
- [bug#61420] [PATCH 22/31] build: haskell-build-system: Build static executables by default.,
Lars-Dominik Braun <=
- [bug#61420] [PATCH 08/31] import: hackage: Use upstream-name property., Lars-Dominik Braun, 2023/02/11
- [bug#61420] [PATCH 02/31] build: haskell-build-system: Remove trailing #t., Lars-Dominik Braun, 2023/02/11
- [bug#61420] [PATCH 12/31] build: haskell-build-system: Remove unused linker flags., Lars-Dominik Braun, 2023/02/11
- [bug#61420] [PATCH 21/31] gnu: ghc-lua: Disable symbol export., Lars-Dominik Braun, 2023/02/11
- [bug#61420] [PATCH 11/31] build: haskell-build-system: Process all transitive dependencies., Lars-Dominik Braun, 2023/02/11
- [bug#61420] [PATCH 16/31] gnu: ghc-parsec: Update to 3.1.15.0., Lars-Dominik Braun, 2023/02/11
- [bug#61420] [PATCH 06/31] import: hackage: Add upstream-name property., Lars-Dominik Braun, 2023/02/11
- [bug#61420] [PATCH 20/31] gnu: ghc-9.2: Support static linking with glibc < 2.34., Lars-Dominik Braun, 2023/02/11
- [bug#61420] [PATCH 18/31] gnu: elm: Support GHC 9.2., Lars-Dominik Braun, 2023/02/11