From af5574ccfb7b91068422bc7c8c1ddbeddc04090a Mon Sep 17 00:00:00 2001 From: Zheng Junjie Date: Sat, 25 Apr 2026 02:30:52 +0800 Subject: gnu: libgc: Add static output. * gnu/packages/bdw-gc.scm (libgc)[arguments]<#:configure-flags>: Add --enable-static. <#:phases>: Add move-static-library phase. [outputs]: Add static. * gnu/packages/bdw-gc.scm (libgc/static-libs): Use define-deprecated/public-alias. * gnu/packages/make-bootstrap.scm (make-guile-static): Use libgc:static. Change-Id: If793d090dd34272a489f6175ac34fbc2c033072a --- gnu/packages/bdw-gc.scm | 30 ++++++++++++++++++------------ gnu/packages/make-bootstrap.scm | 3 ++- 2 files changed, 20 insertions(+), 13 deletions(-) (limited to 'gnu') diff --git a/gnu/packages/bdw-gc.scm b/gnu/packages/bdw-gc.scm index 4f0845f300d..14fffc0dbac 100644 --- a/gnu/packages/bdw-gc.scm +++ b/gnu/packages/bdw-gc.scm @@ -6,6 +6,7 @@ ;;; Copyright © 2019, 2020, 2022 Marius Bakke ;;; Copyright © 2022, 2023 Efraim Flashner ;;; Copyright © 2025 Janneke Nieuwenhuizen +;;; Copyright © 2026 Zheng Junjie ;;; ;;; This file is part of GNU Guix. ;;; @@ -23,6 +24,7 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu packages bdw-gc) + #:use-module (guix deprecation) #:use-module (guix licenses) #:use-module (guix packages) #:use-module (guix download) @@ -55,6 +57,8 @@ #~(list ;; Install gc_cpp.h et al. "--enable-cplusplus" + ;; Used by 'guile-static'. + "--enable-static" ;; In GNU/Hurd systems during the 'check' phase, ;; there is a deadlock caused by the 'gctest' test. @@ -68,7 +72,17 @@ #~()) #$@(if (target-mingw?) #~("--enable-threads=pthreads") - #~()))) + #~())) + #:phases + #~(modify-phases %standard-phases + (add-after 'install 'move-static-library + (lambda _ + (for-each + (lambda (a) + (install-file a (string-append #$output:static + "/lib")) + (delete-file a)) + (find-files (string-append #$output "/lib") "\\.a")))))) (cond ((target-ppc64le?) (list #:make-flags @@ -87,7 +101,7 @@ ;; cross-compiling, and demands using libatomic-ops instead. (list libatomic-ops) '())) - (outputs '("out" "debug")) + (outputs '("out" "debug" "static")) (properties '((release-monitoring-url . "https://www.hboehm.info/gc/gc_source/") (upstream-name . "gc"))) @@ -112,16 +126,8 @@ C or C++ programs, though that is not its primary goal.") (license (x11-style (string-append home-page "license.txt"))))) -;; TODO: Add a static output in libgc in the next rebuild cycle. -(define-public libgc/static-libs - (package/inherit - libgc - (arguments - (substitute-keyword-arguments arguments - ((#:configure-flags flags #~'()) - #~(cons "--enable-static" #$flags)))) - - (properties '((hidden? . #t))))) +;; XXX: Deprecated on <2026-04-25>. +(define-deprecated/public-alias libgc/static-libs libgc) (define-public libgc-7 (package diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm index de1dd6ebd22..075111187fc 100644 --- a/gnu/packages/make-bootstrap.scm +++ b/gnu/packages/make-bootstrap.scm @@ -7,6 +7,7 @@ ;;; Copyright © 2019, 2020, 2022 Marius Bakke ;;; Copyright © 2020 Mathieu Othacehe ;;; Copyright © 2021 Pierre Langlois +;;; Copyright © 2026 Zheng Junjie ;;; ;;; This file is part of GNU Guix. ;;; @@ -622,7 +623,7 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." (propagated-inputs (modify-inputs propagated-inputs - (replace "libgc" libgc/static-libs))) + (replace "libgc" `(,libgc "static")))) (arguments (substitute-keyword-arguments arguments -- cgit v1.2.3