[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/03: gnu: make-bootstrap: Allow compilation of the statically-link gaw
From: |
guix-commits |
Subject: |
01/03: gnu: make-bootstrap: Allow compilation of the statically-link gawk. |
Date: |
Tue, 28 Sep 2021 18:16:40 -0400 (EDT) |
civodul pushed a commit to branch core-updates-frozen
in repository guix.
commit 7d30e6e5c21f5e0b79f73428414fef2dbf75e7a6
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Tue Sep 28 23:41:10 2021 +0200
gnu: make-bootstrap: Allow compilation of the statically-link gawk.
Previously, linking would fail due to the '-fno-common' default in GCC 10:
ld: /gnu/store/…-glibc-2.33-static/lib/libc.a(getopt.o): in function
`_getopt_internal_r':
(.text+0x6e0): multiple definition of `_getopt_internal_r';
support/libsupport.a(getopt.o):/tmp/guix-build-gawk-5.1.0.drv-0/gawk-5.1.0/support/getopt.c:404:
first defined here
ld: /gnu/store/…-glibc-2.33-static/lib/libc.a(getopt.o): in function
`_getopt_internal':
Reported by Thiago Jung Bauermann <bauermann@kolabnow.com>.
* gnu/packages/make-bootstrap.scm (%static-inputs) <gawk>: Remove
getopt.o from libsupport.a.
---
gnu/packages/make-bootstrap.scm | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm
index 2d7a974..40c1f82 100644
--- a/gnu/packages/make-bootstrap.scm
+++ b/gnu/packages/make-bootstrap.scm
@@ -206,8 +206,17 @@ for `sh' in $PATH, and without nscd, and with static NSS
modules."
(("^xz_LDADD =")
"xz_LDADD = -all-static"))
#t)))))))
- (gawk (package (inherit gawk)
- (source (origin (inherit (package-source gawk))
+ (gawk (package
+ (inherit gawk)
+ (source (origin
+ (inherit (package-source gawk))
+ (modules '((guix build utils)))
+ (snippet
+ ;; Do not build 'getopt.c' since that leads to a
+ ;; link failure due to duplicate symbols with
+ ;; 'libc.a'.
+ '(substitute* "support/Makefile.in"
+ (("getopt\\.\\$\\(OBJEXT\\)") "")))
(patches (cons (search-patch "gawk-shell.patch")
(origin-patches
(package-source gawk))))))