[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
22/31: build: haskell-build-system: Build static executables by default.
From: |
guix-commits |
Subject: |
22/31: build: haskell-build-system: Build static executables by default. |
Date: |
Sun, 26 Feb 2023 04:44:38 -0500 (EST) |
lbraun pushed a commit to branch master
in repository guix.
commit dc3e22f4d5d7aa94fef9e380a3d2c0d71143ced9
Author: Lars-Dominik Braun <lars@6xq.net>
AuthorDate: Sun Jan 29 18:50:10 2023 +0100
build: haskell-build-system: Build static executables by default.
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 @@ and parameters ~s~%"
,@(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.
- 08/31: import: hackage: Use upstream-name property., (continued)
- 08/31: import: hackage: Use upstream-name property., guix-commits, 2023/02/26
- 11/31: build: haskell-build-system: Process all transitive dependencies., guix-commits, 2023/02/26
- 12/31: build: haskell-build-system: Remove unused linker flags., guix-commits, 2023/02/26
- 14/31: gnu: ghc-9.2: Increase make verbosity., guix-commits, 2023/02/26
- 15/31: gnu: Remove unused Haskell packages., guix-commits, 2023/02/26
- 16/31: gnu: ghc-parsec: Update to 3.1.15.0., guix-commits, 2023/02/26
- 17/31: gnu: idris: Fix overly zealous regular expression., guix-commits, 2023/02/26
- 19/31: build-system: haskell: Drop default "static" output., guix-commits, 2023/02/26
- 20/31: gnu: ghc-9.2: Support static linking with glibc < 2.34., guix-commits, 2023/02/26
- 21/31: gnu: ghc-lua: Disable symbol export., guix-commits, 2023/02/26
- 22/31: build: haskell-build-system: Build static executables by default.,
guix-commits <=
- 24/31: gnu: hledger: Drop Haskell libraries and documentation., guix-commits, 2023/02/26
- 26/31: gnu: git-annex: Drop Haskell documentation., guix-commits, 2023/02/26
- 27/31: gnu: shellcheck: Drop Haskell libraries., guix-commits, 2023/02/26
- 28/31: gnu: pandoc: Drop Haskell libraries and documentation., guix-commits, 2023/02/26
- 30/31: gnu: xmobar: Drop Haskell libraries and documentation., guix-commits, 2023/02/26
- 23/31: gnu: ngless: Drop Haskell libraries and documentation., guix-commits, 2023/02/26
- 25/31: gnu: darcs: Drop Haskell libraries and documentation., guix-commits, 2023/02/26
- 29/31: gnu: purescript: Drop Haskell libraries and documentation., guix-commits, 2023/02/26
- 31/31: gnu: idris: Adapt to changed haskell-build-system., guix-commits, 2023/02/26