From dcd7d16b8b89defcedefb4b8a71977d376d04273 Mon Sep 17 00:00:00 2001
From: Maxime Devos <maximedevos@telenet.be>
Date: Mon, 31 May 2021 14:07:50 +0200
Subject: [PATCH 7/7] gnu: smalltalk: Find glibc even when cross-compiling.
Curiously, glibc is named "cross-libc" instead of "libc"
when cross-compiling. I don't know why. Anyway, here
is a fix. Smalltalk still fails to cross-compile though.
* gnu/packages/smalltalk.scm
(smalltalk)[arguments]{phases}<#:fix-libc>: Also search for
"cross-libc" instead of only "libc" in 'inputs'.
---
gnu/packages/smalltalk.scm | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
@@ -4,6 +4,7 @@
;;; Copyright © 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
;;; Copyright © 2016 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -103,7 +104,11 @@
#t))
(add-before 'configure 'fix-libc
(lambda* (#:key inputs #:allow-other-keys)
- (let ((libc (assoc-ref inputs "libc")))
+ (let ((libc (or (assoc-ref inputs "libc")
+ ;; When cross-compiling, the input
+ ;; is named "cross-libc" instead of
+ ;; simply "libc". I don't know why.
+ (assoc-ref inputs "cross-libc"))))
(substitute* "libc.la.in"
(("@LIBC_SO_NAME@") "libc.so")
(("@LIBC_SO_DIR@") (string-append libc "/lib"))))
--
2.31.1