z572 pushed a commit to branch core-packages-team
in repository guix.
commit 685cfdec6b71ff06f45e52e90c38039b333a2be5
Author: Zheng Junjie <[email protected]>
AuthorDate: Wed Feb 12 19:35:35 2025 +0800
gnu: bash-static: Fix cross-compiling for [email protected].
* gnu/packages/bash.scm (static-bash)[arguments]<#:configure-flags>: When
cross-compiling, Add bash_cv_getenv_redef=no.
Change-Id: I8105e91831dfdcce4e5494b3588ab8431dbaf5a8
---
gnu/packages/bash.scm | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm
index a809e47d43..bf6d8d3eff 100644
--- a/gnu/packages/bash.scm
+++ b/gnu/packages/bash.scm
@@ -323,6 +323,16 @@ without modification.")
(arguments
(substitute-keyword-arguments
`(#:allowed-references ("out") ,@(package-arguments bash))
+ ((#:configure-flags flags '())
+ ;; XXX: when Update glibc from 2.40 to 2.41,
+ ;; need this flag to compile successfully.
+ ;; Otherwise, an error will be reported:
+ ;; multiple definition of `getenv'
+ (if (%current-target-system)
+ `(cons
+ "bash_cv_getenv_redef=no"
+ ,flags)
+ flags))
((#:phases phases)
#~(modify-phases #$phases
(add-after 'strip 'remove-everything-but-the-binary