Hi!
This quick & dirty fix indeed results in a working build of glibc:
--8<---------------cut here---------------start------------->8---
(use-modules (guix packages)
(guix utils)
(gnu packages base))
(package
(inherit glibc)
(arguments
(substitute-keyword-arguments (package-arguments glibc)
((#:phases phases '%standard-phases)
`(modify-phases ,phases
(add-before 'configure 'fix-cross-binutils
(lambda _
(substitute* "configure"
(("OBJCOPY=`\\$CC -print-prog-name=objcopy`")
"OBJCOPY=${ac_tool_prefix}objcopy")
(("OBJDUMP=`\\$CC -print-prog-name=objdump`")
"OBJDUMP=${ac_tool_prefix}objdump")))))))))
--8<---------------cut here---------------end--------------->8---
> $./pre-inst-env guix build --target=aarch64-linux-gnu -f fix-glibc.scm
> /gnu/store/xdgbmqiydgyv5r93mkizs6vcwq3na6mz-glibc-2.41-debug
> /gnu/store/i655fr6praxsrvg83a1gb2m7frdl2vz7-glibc-2.41
> /gnu/store/qdw11zi94i3fzgyc63r8d9kyk953q36b-glibc-2.41-static
So in theory you could patch the package definition of glibc in base.scm
by adding the lines above, rebuild guix and than try to rebuild the
system image. Not sure if this works, but worth a try.
--
Best regards
Christoph Buck <[email protected]>
GnuPG key: https://web.icepic.de/public_key.txt
FingerPrint: B43F 4D2B 2017 E715 36C0 03C6 B8BB BCDE CD00 3305