diff options
author | Zheng Junjie <[email protected]> | 2024-12-24 01:13:20 +0800 |
---|---|---|
committer | Zheng Junjie <[email protected]> | 2025-01-25 01:05:27 +0800 |
commit | 0d133fdd7342020f4aa78441698f34d877c678d8 (patch) | |
tree | fb4781b6d159e6d5803285f101b629b94c77ba51 | |
parent | 104904196c835e97e01afbb5714bb54b970c7314 (diff) |
gnu: bash: Fix build to loongarch64.
* gnu/packages/bash.scm (bash)[native-inputs]: When target is loongarch64, Add
config.
[arguments]: When target is loongarch64, Add update-config-scripts phase.
Change-Id: Icadaace85a62582fcb0724dda8f5067d22257cd6
-rw-r--r-- | gnu/packages/bash.scm | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm index 642a405985..ef530522ec 100644 --- a/gnu/packages/bash.scm +++ b/gnu/packages/bash.scm @@ -28,6 +28,7 @@ (define-module (gnu packages bash) #:use-module ((guix licenses) #:prefix license:) #:use-module (gnu packages) + #:use-module (gnu packages autotools) #:use-module (gnu packages base) #:use-module (gnu packages bootstrap) #:use-module (gnu packages compression) @@ -150,6 +151,9 @@ number/base32-hash tuples, directly usable in the 'patch-series' form." (outputs '("out" "doc" ;1.7 MiB of HTML and extra files "include")) ;headers used by extensions + (native-inputs (if (target-loongarch64?) + (list config) + '())) (inputs (list readline ncurses)) ;TODO: add texinfo (arguments `(;; When cross-compiling, `configure' incorrectly guesses that job @@ -219,7 +223,18 @@ number/base32-hash tuples, directly usable in the 'patch-series' form." "/Makefile.inc") (("^INSTALL =.*") "INSTALL = install -c\n")) - #t)))))) + #t))) + ,@(if (target-loongarch64?) + `((add-after 'unpack 'update-config-scripts + (lambda* (#:key inputs native-inputs #:allow-other-keys) + ;; Replace outdated config.guess and config.sub. + (for-each (lambda (file) + (install-file + (search-input-file + (or native-inputs inputs) + (string-append "/bin/" file)) "./support")) + '("config.guess" "config.sub"))))) + '())))) (native-search-paths (list (search-path-specification ;new in 4.4 |