* [bug#75051] [PATCH 01/14] guix: Add loongarch platform.
[not found] <cover.1734972657.git.873216071@qq.com>
@ 2024-12-23 17:05 ` Zheng Junjie via Guix-patches via
2024-12-23 17:08 ` [bug#75051] [PATCH 02/14] utils: Add target-loongarch64? Zheng Junjie via Guix-patches via
` (12 subsequent siblings)
13 siblings, 0 replies; 14+ messages in thread
From: Zheng Junjie via Guix-patches via @ 2024-12-23 17:05 UTC (permalink / raw)
To: 75051
Cc: Christopher Baines, Josselin Poiret, Ludovic Courtès,
Mathieu Othacehe, Maxim Cournoyer, Simon Tournier,
Tobias Geerinckx-Rice
* Makefile.am (MODULES): Add loongarch platform module.
* doc/guix.texi: Add documentation for loongarch platform.
* guix/platforms/loongarch.scm (loongarch64-linux): New variable.
Change-Id: I71b8f3cb3b2f0d9562bbbefdc1f2fc4b2dcc4fbb
---
Makefile.am | 1 +
doc/guix.texi | 7 ++++++-
guix/platforms/loongarch.scm | 30 ++++++++++++++++++++++++++++++
3 files changed, 37 insertions(+), 1 deletion(-)
create mode 100644 guix/platforms/loongarch.scm
diff --git a/Makefile.am b/Makefile.am
index d3eeaddaf4a..413f3caf518 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -140,6 +140,7 @@ MODULES = \
guix/platform.scm \
guix/platforms/arm.scm \
guix/platforms/avr.scm \
+ guix/platforms/loongarch.scm \
guix/platforms/mips.scm \
guix/platforms/or1k.scm \
guix/platforms/powerpc.scm \
diff --git a/doc/guix.texi b/doc/guix.texi
index f7b75698870..576bd45ba3d 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -116,7 +116,7 @@
Copyright @copyright{} 2023 Karl Hallsby@*
Copyright @copyright{} 2023 Nathaniel Nicandro@*
Copyright @copyright{} 2023 Tanguy Le Carrour@*
-Copyright @copyright{} 2023, 2024 Zheng Junjie@*
+Copyright @copyright{} 2023-2024 Zheng Junjie@*
Copyright @copyright{} 2023 Brian Cully@*
Copyright @copyright{} 2023 Felix Lechner@*
Copyright @copyright{} 2023 Foundation Devices, Inc.@*
@@ -17021,6 +17021,7 @@ Cross-Compilation
- i586-pc-gnu
- i686-linux-gnu
- i686-w64-mingw32
+ - loongarch64-linux-gnu
- mips64el-linux-gnu
- or1k-elf
- powerpc-linux-gnu
@@ -48981,6 +48982,10 @@ Supported Platforms
Platform targeting ARM v8 CPU running GNU/Linux.
@end defvar
+@defvar loongarch64-linux
+Platform targeting loongarch 64-bit CPU running GNU/Linux.
+@end defvar
+
@defvar mips64-linux
Platform targeting MIPS little-endian 64-bit CPU running GNU/Linux.
@end defvar
diff --git a/guix/platforms/loongarch.scm b/guix/platforms/loongarch.scm
new file mode 100644
index 00000000000..3c73c75ffd1
--- /dev/null
+++ b/guix/platforms/loongarch.scm
@@ -0,0 +1,30 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2024 Zheng Junjie <873216071@qq.com>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (guix platforms loongarch)
+ #:use-module (guix platform)
+ #:use-module (guix records)
+ #:export (loongarch64-linux))
+
+(define loongarch64-linux
+ (platform
+ (target "loongarch64-linux-gnu")
+ (system "loongarch64-linux")
+ (linux-architecture "loongarch")
+ (rust-target "loongarch64-unknown-linux-gnu")
+ (glibc-dynamic-linker "/lib/ld-linux-loongarch-lp64d.so.1")))
--
2.46.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [bug#75051] [PATCH 02/14] utils: Add target-loongarch64?.
[not found] <cover.1734972657.git.873216071@qq.com>
2024-12-23 17:05 ` [bug#75051] [PATCH 01/14] guix: Add loongarch platform Zheng Junjie via Guix-patches via
@ 2024-12-23 17:08 ` Zheng Junjie via Guix-patches via
2024-12-23 17:08 ` [bug#75051] [PATCH 03/14] gnu: Add linux-libre-headers-5.19.17 Zheng Junjie via Guix-patches via
` (11 subsequent siblings)
13 siblings, 0 replies; 14+ messages in thread
From: Zheng Junjie via Guix-patches via @ 2024-12-23 17:08 UTC (permalink / raw)
To: 75051
Cc: Christopher Baines, Josselin Poiret, Ludovic Courtès,
Mathieu Othacehe, Simon Tournier, Tobias Geerinckx-Rice
* guix/utils.scm (target-loongarch64): New procedure.
Change-Id: I8d21bcf04d479937039f6f507b5460bb560fd8ec
---
guix/utils.scm | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/guix/utils.scm b/guix/utils.scm
index 537d0490e01..a07f26054d4 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -112,6 +112,7 @@ (define-module (guix utils)
target-ppc64le?
target-powerpc?
target-riscv64?
+ target-loongarch64?
target-mips64el?
target-64bit?
target-little-endian?
@@ -801,6 +802,10 @@ (define* (target-avr? #:optional (target (%current-target-system)))
"Is the architecture of TARGET a variant of Microchip's AVR architecture?"
(or (string=? target "avr") (string-prefix? "avr-" target)))
+(define* (target-loongarch64? #:optional (target (or (%current-target-system)
+ (%current-system))))
+ (string-prefix? "loongarch64-" target))
+
(define* (target-ppc32? #:optional (target (or (%current-target-system)
(%current-system))))
(string-prefix? "powerpc-" target))
--
2.46.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [bug#75051] [PATCH 03/14] gnu: Add linux-libre-headers-5.19.17.
[not found] <cover.1734972657.git.873216071@qq.com>
2024-12-23 17:05 ` [bug#75051] [PATCH 01/14] guix: Add loongarch platform Zheng Junjie via Guix-patches via
2024-12-23 17:08 ` [bug#75051] [PATCH 02/14] utils: Add target-loongarch64? Zheng Junjie via Guix-patches via
@ 2024-12-23 17:08 ` Zheng Junjie via Guix-patches via
2024-12-23 17:10 ` [bug#75051] [PATCH 04/14] gnu: cross-base: Add cross-compiling support for loongarch64 Zheng Junjie via Guix-patches via
` (10 subsequent siblings)
13 siblings, 0 replies; 14+ messages in thread
From: Zheng Junjie via Guix-patches via @ 2024-12-23 17:08 UTC (permalink / raw)
To: 75051; +Cc: Leo Famulari, Wilko Meyer
linux 5.19 include loongarch support, so add it.
* gnu/packages/linux.scm (linux-libre-headers-5.19.17): New variable.
Change-Id: Iddd930c1f7243f5307bec75c41f70d5ff5bbd531
---
gnu/packages/linux.scm | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 78d3d737b59..c3d9aa429d2 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -818,6 +818,11 @@ (define-public linux-libre-headers-5.15.49
(make-linux-libre-headers "5.15.49" "gnu"
"13zqdcm4664vh7g57sxbfrlpsxm7zrma72mxdfdz7d9yndy2gfv8"))
+;; linux 5.19 include loongarch support.
+(define-public linux-libre-headers-5.19.17
+ (make-linux-libre-headers "5.19.17" "gnu"
+ "0m1yabfvaanbzv0ip04r4kvs16aq0pp2dk93xzi5cq18i3vw351m"))
+
(define-public linux-libre-headers linux-libre-headers-5.15.49)
;; linux-libre-headers-latest points to the latest headers package
;; and should be used as a dependency for packages that depend on
--
2.46.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [bug#75051] [PATCH 04/14] gnu: cross-base: Add cross-compiling support for loongarch64.
[not found] <cover.1734972657.git.873216071@qq.com>
` (2 preceding siblings ...)
2024-12-23 17:08 ` [bug#75051] [PATCH 03/14] gnu: Add linux-libre-headers-5.19.17 Zheng Junjie via Guix-patches via
@ 2024-12-23 17:10 ` Zheng Junjie via Guix-patches via
2024-12-23 17:11 ` [bug#75051] [PATCH 05/14] gnu: %glibc-stripped: Fix cross-compiling to loongarch64 Zheng Junjie via Guix-patches via
` (9 subsequent siblings)
13 siblings, 0 replies; 14+ messages in thread
From: Zheng Junjie via Guix-patches via @ 2024-12-23 17:10 UTC (permalink / raw)
To: 75051; +Cc: Andreas Enge, Janneke Nieuwenhuizen, Ludovic Courtès
gnu/packages/cross-base.scm (cross-kernel-headers/deprecated,
cross-kernel-headers*): When target loongarch64, use
linux-libre-headers-5.19.17.
Change-Id: Ib144ebf86428dddd92f5b899dc241a428f8dc374
---
gnu/packages/cross-base.scm | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index ad3616eaba0..a4e9c2a9cb1 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -418,7 +418,10 @@ (define* (cross-kernel-headers . args)
(define* (cross-kernel-headers/deprecated target
#:optional
- (linux-headers linux-libre-headers)
+ (linux-headers
+ (if (target-loongarch64? target)
+ linux-libre-headers-5.19.17
+ linux-libre-headers))
(xgcc (cross-gcc target))
(xbinutils (cross-binutils target)))
(warning (G_ "'cross-kernel-headers' must be used with keyword arguments~%"))
@@ -493,7 +496,9 @@ (define* (cross-mig target
(define* (cross-kernel-headers* target
#:key
- (linux-headers linux-libre-headers)
+ (linux-headers (if (target-loongarch64? target)
+ linux-libre-headers-5.19.17
+ linux-libre-headers))
(xgcc (cross-gcc target))
(xbinutils (cross-binutils target)))
"Return headers depending on TARGET."
--
2.46.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [bug#75051] [PATCH 05/14] gnu: %glibc-stripped: Fix cross-compiling to loongarch64.
[not found] <cover.1734972657.git.873216071@qq.com>
` (3 preceding siblings ...)
2024-12-23 17:10 ` [bug#75051] [PATCH 04/14] gnu: cross-base: Add cross-compiling support for loongarch64 Zheng Junjie via Guix-patches via
@ 2024-12-23 17:11 ` Zheng Junjie via Guix-patches via
2024-12-23 17:12 ` [bug#75051] [PATCH 06/14] gnu: openssl: Support loongarch64 Zheng Junjie via Guix-patches via
` (8 subsequent siblings)
13 siblings, 0 replies; 14+ messages in thread
From: Zheng Junjie via Guix-patches via @ 2024-12-23 17:11 UTC (permalink / raw)
To: 75051; +Cc: Andreas Enge, Janneke Nieuwenhuizen, Ludovic Courtès
gnu/packages/make-bootstrap.scm (%glibc-stripped)[inputs]: When target
loongarch64, Use linux-libre-headers-5.19.17.
Change-Id: I4b2b9168aa3716445d1b88b4db3dcf4ad038a45d
---
gnu/packages/make-bootstrap.scm | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm
index 59c117f2260..adbd2f4ef70 100644
--- a/gnu/packages/make-bootstrap.scm
+++ b/gnu/packages/make-bootstrap.scm
@@ -475,11 +475,12 @@ (define (%glibc-stripped)
glibc)))))
(inputs
`(("kernel-headers"
- ,(if (or (and (%current-target-system)
+ ,(cond ((or (and (%current-target-system)
(target-hurd? (%current-target-system)))
(string-suffix? "-hurd" (%current-system)))
- gnumach-headers
- linux-libre-headers))))
+ gnumach-headers)
+ ((target-loongarch64?) linux-libre-headers-5.19.17)
+ (else linux-libre-headers)))))
(propagated-inputs '())
;; Only one output.
--
2.46.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [bug#75051] [PATCH 06/14] gnu: openssl: Support loongarch64.
[not found] <cover.1734972657.git.873216071@qq.com>
` (4 preceding siblings ...)
2024-12-23 17:11 ` [bug#75051] [PATCH 05/14] gnu: %glibc-stripped: Fix cross-compiling to loongarch64 Zheng Junjie via Guix-patches via
@ 2024-12-23 17:12 ` Zheng Junjie via Guix-patches via
2024-12-23 17:12 ` [bug#75051] [PATCH 07/14] gnu: readline: Fix cross-compiling to loongarch64 Zheng Junjie via Guix-patches via
` (7 subsequent siblings)
13 siblings, 0 replies; 14+ messages in thread
From: Zheng Junjie via Guix-patches via @ 2024-12-23 17:12 UTC (permalink / raw)
To: 75051
* gnu/packages/tls.scm (target->openssl-target, target->openssl-target): Add
loongarch64 case.
Change-Id: Ie85b4e1f39650f6134c9b5c4c81e0d5f83068558
---
gnu/packages/tls.scm | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm
index 5f3bc72f6e2..cde5316cf43 100644
--- a/gnu/packages/tls.scm
+++ b/gnu/packages/tls.scm
@@ -397,7 +397,8 @@ (define (target->openssl-target pkg target)
(cond ((target-hurd? target)
"hurd")
((and (target-linux? target)
- (target-riscv64? target))
+ (or (target-riscv64? target)
+ (target-loongarch64? target)))
"linux64")
((target-linux? target)
"linux")
@@ -427,6 +428,8 @@ (define (target->openssl-target pkg target)
((and (target-powerpc? target)
(target-64bit? target))
"ppc64")
+ ((target-loongarch64? target)
+ "loongarch64")
((target-riscv64? target)
"riscv64")
((target-64bit? target)
--
2.46.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [bug#75051] [PATCH 07/14] gnu: readline: Fix cross-compiling to loongarch64.
[not found] <cover.1734972657.git.873216071@qq.com>
` (5 preceding siblings ...)
2024-12-23 17:12 ` [bug#75051] [PATCH 06/14] gnu: openssl: Support loongarch64 Zheng Junjie via Guix-patches via
@ 2024-12-23 17:12 ` Zheng Junjie via Guix-patches via
2024-12-23 17:13 ` [bug#75051] [PATCH 08/14] gnu: gdbm: " Zheng Junjie via Guix-patches via
` (6 subsequent siblings)
13 siblings, 0 replies; 14+ messages in thread
From: Zheng Junjie via Guix-patches via @ 2024-12-23 17:12 UTC (permalink / raw)
To: 75051
* gnu/packages/readline.scm (readline)[arguments]: When cross-compiling to
loongarch64, Add update-config-scripts phase.
[native-inputs]: When cross-compiling to loongarch64, Add config.
Change-Id: Ie369d53c7f2493a7a65fe592a3671719dee264c0
---
gnu/packages/readline.scm | 61 +++++++++++++++++++++++++--------------
1 file changed, 40 insertions(+), 21 deletions(-)
diff --git a/gnu/packages/readline.scm b/gnu/packages/readline.scm
index 8200a24f1a1..c19c7326497 100644
--- a/gnu/packages/readline.scm
+++ b/gnu/packages/readline.scm
@@ -82,29 +82,48 @@ (define-public readline
(build-system gnu-build-system)
(propagated-inputs (list ncurses))
(arguments
- (list #:configure-flags
- #~(list (string-append
- "LDFLAGS=-Wl,-rpath -Wl,"
- (dirname (search-input-file %build-inputs
- "lib/libncurses.so")))
+ (append
+ (if (and (target-loongarch64?)
+ (%current-target-system))
+ (list #:phases
+ #~(modify-phases %standard-phases
+ (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"))))))
+ '())
+ (list #:configure-flags
+ #~(list (string-append
+ "LDFLAGS=-Wl,-rpath -Wl,"
+ (dirname (search-input-file %build-inputs
+ "lib/libncurses.so")))
- ;; This test does an 'AC_TRY_RUN', which aborts when
- ;; cross-compiling, so provide the correct answer.
- #$@(if (%current-target-system)
- '("bash_cv_wcwidth_broken=no")
- '())
- ;; MinGW: ncurses provides the termcap api.
- #$@(if (target-mingw?)
- '("bash_cv_termcap_lib=ncurses")
- '()))
+ ;; This test does an 'AC_TRY_RUN', which aborts when
+ ;; cross-compiling, so provide the correct answer.
+ #$@(if (%current-target-system)
+ '("bash_cv_wcwidth_broken=no")
+ '())
+ ;; MinGW: ncurses provides the termcap api.
+ #$@(if (target-mingw?)
+ '("bash_cv_termcap_lib=ncurses")
+ '()))
- #:make-flags
- (if (target-mingw?)
- ;; MinGW: termcap in ncurses
- ;; some SIG_* #defined in _POSIX
- #~'("TERMCAP_LIB=-lncurses"
- "CPPFLAGS=-D_POSIX -D'chown(f,o,g)=0'")
- #~'())))
+ #:make-flags
+ (if (target-mingw?)
+ ;; MinGW: termcap in ncurses
+ ;; some SIG_* #defined in _POSIX
+ #~'("TERMCAP_LIB=-lncurses"
+ "CPPFLAGS=-D_POSIX -D'chown(f,o,g)=0'")
+ #~'()))))
+ (native-inputs (if (and (target-loongarch64?)
+ (%current-target-system))
+ (list config)
+ '()))
(synopsis "Edit command lines while typing, with history support")
(description
"The GNU readline library allows users to edit command lines as they
--
2.46.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [bug#75051] [PATCH 08/14] gnu: gdbm: Fix cross-compiling to loongarch64.
[not found] <cover.1734972657.git.873216071@qq.com>
` (6 preceding siblings ...)
2024-12-23 17:12 ` [bug#75051] [PATCH 07/14] gnu: readline: Fix cross-compiling to loongarch64 Zheng Junjie via Guix-patches via
@ 2024-12-23 17:13 ` Zheng Junjie via Guix-patches via
2024-12-23 17:13 ` [bug#75051] [PATCH 09/14] gnu: libatomic-ops: " Zheng Junjie via Guix-patches via
` (5 subsequent siblings)
13 siblings, 0 replies; 14+ messages in thread
From: Zheng Junjie via Guix-patches via @ 2024-12-23 17:13 UTC (permalink / raw)
To: 75051
* gnu/packages/dbm.scm (gdbm)[arguments]: When cross-compiling to
loongarch64, Add update-config phase.
[native-inputs]: When cross-compiling to loongarch64, Add config.
Change-Id: I1fd1b0b4171ae3cddbcc1683f8cb12ed85fa5da8
---
gnu/packages/dbm.scm | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/dbm.scm b/gnu/packages/dbm.scm
index 7c36d30a349..9e7d846f7fd 100644
--- a/gnu/packages/dbm.scm
+++ b/gnu/packages/dbm.scm
@@ -189,7 +189,24 @@ (define-public gdbm
(base32
"1kfapds42j1sjq6wl7fygipw5904wpbfa5kwppj3mwgz44fhicbl"))))
(arguments `(#:configure-flags '("--enable-libgdbm-compat"
- "--disable-static")))
+ "--disable-static")
+ ,@(if (and (target-loongarch64?)
+ (%current-target-system))
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'update-config
+ (lambda* (#:key native-inputs inputs #:allow-other-keys)
+ (for-each (lambda (file)
+ (install-file
+ (search-input-file
+ (or native-inputs inputs)
+ (string-append "/bin/" file)) "build-aux"))
+ '("config.guess" "config.sub"))))))
+ '())))
+ (native-inputs (if (and (target-loongarch64?)
+ (%current-target-system))
+ (list config)
+ '()))
(build-system gnu-build-system)
(home-page "https://www.gnu.org.ua/software/gdbm")
(synopsis
--
2.46.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [bug#75051] [PATCH 09/14] gnu: libatomic-ops: Fix cross-compiling to loongarch64.
[not found] <cover.1734972657.git.873216071@qq.com>
` (7 preceding siblings ...)
2024-12-23 17:13 ` [bug#75051] [PATCH 08/14] gnu: gdbm: " Zheng Junjie via Guix-patches via
@ 2024-12-23 17:13 ` Zheng Junjie via Guix-patches via
2024-12-23 17:13 ` [bug#75051] [PATCH 10/14] gnu: bash: " Zheng Junjie via Guix-patches via
` (4 subsequent siblings)
13 siblings, 0 replies; 14+ messages in thread
From: Zheng Junjie via Guix-patches via @ 2024-12-23 17:13 UTC (permalink / raw)
To: 75051
* gnu/packages/bdw-gc.scm (libatomic-ops)[native-inputs]: When cross-compiling
to loongarch64, Add config.
[arguments]: When cross-compiling to loongarch64, Add update-config-scripts
phase.
Change-Id: I7a56860910e38985573482d4a4cfa622d8158f7c
---
gnu/packages/bdw-gc.scm | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/gnu/packages/bdw-gc.scm b/gnu/packages/bdw-gc.scm
index 8eed98d1fd7..d33c51663bc 100644
--- a/gnu/packages/bdw-gc.scm
+++ b/gnu/packages/bdw-gc.scm
@@ -29,6 +29,7 @@ (define-module (gnu packages bdw-gc)
#:use-module (guix utils)
#:use-module (guix build-system gnu)
#:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages autotools)
#:use-module (gnu packages hurd))
(define-public libgc
@@ -155,6 +156,24 @@ (define-public libatomic-ops
"0glzah695wsf6c27hs5wwlw4mnq1vfivdshz1rb8pq7w4mp5dazh"))))
(build-system gnu-build-system)
(outputs '("out" "debug"))
+ (native-inputs (if (and (target-loongarch64?)
+ (%current-target-system))
+ (list config)
+ '()))
+ (arguments (if (and (target-loongarch64?)
+ (%current-target-system))
+ (list #:phases
+ #~(modify-phases %standard-phases
+ (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)) "."))
+ '("config.guess" "config.sub"))))))
+ '()))
(synopsis "Accessing hardware atomic memory update operations")
(description
"This C library provides semi-portable access to hardware-provided atomic
--
2.46.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [bug#75051] [PATCH 10/14] gnu: bash: Fix cross-compiling to loongarch64.
[not found] <cover.1734972657.git.873216071@qq.com>
` (8 preceding siblings ...)
2024-12-23 17:13 ` [bug#75051] [PATCH 09/14] gnu: libatomic-ops: " Zheng Junjie via Guix-patches via
@ 2024-12-23 17:13 ` Zheng Junjie via Guix-patches via
2024-12-23 17:13 ` [bug#75051] [PATCH 11/14] gnu: sed: " Zheng Junjie via Guix-patches via
` (3 subsequent siblings)
13 siblings, 0 replies; 14+ messages in thread
From: Zheng Junjie via Guix-patches via @ 2024-12-23 17:13 UTC (permalink / raw)
To: 75051
* gnu/packages/bash.scm (bash)[native-inputs]: When cross-compiling to
loongarch64, Add config.
[arguments]: When cross-compiling to loongarch64, Add update-config-scripts
phase.
Change-Id: Icadaace85a62582fcb0724dda8f5067d22257cd6
---
gnu/packages/bash.scm | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm
index 642a4059852..2d30af046ea 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,10 @@ (define-public bash
(outputs '("out"
"doc" ;1.7 MiB of HTML and extra files
"include")) ;headers used by extensions
+ (native-inputs (if (and (target-loongarch64?)
+ (%current-target-system))
+ (list config)
+ '()))
(inputs (list readline ncurses)) ;TODO: add texinfo
(arguments
`(;; When cross-compiling, `configure' incorrectly guesses that job
@@ -219,7 +224,19 @@ (define-public bash
"/Makefile.inc")
(("^INSTALL =.*")
"INSTALL = install -c\n"))
- #t))))))
+ #t)))
+ ,@(if (and (target-loongarch64?)
+ (%current-target-system))
+ `((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
--
2.46.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [bug#75051] [PATCH 11/14] gnu: sed: Fix cross-compiling to loongarch64.
[not found] <cover.1734972657.git.873216071@qq.com>
` (9 preceding siblings ...)
2024-12-23 17:13 ` [bug#75051] [PATCH 10/14] gnu: bash: " Zheng Junjie via Guix-patches via
@ 2024-12-23 17:13 ` Zheng Junjie via Guix-patches via
2024-12-23 17:13 ` [bug#75051] [PATCH 12/14] gnu: isl: " Zheng Junjie via Guix-patches via
` (2 subsequent siblings)
13 siblings, 0 replies; 14+ messages in thread
From: Zheng Junjie via Guix-patches via @ 2024-12-23 17:13 UTC (permalink / raw)
To: 75051; +Cc: Andreas Enge, Janneke Nieuwenhuizen, Ludovic Courtès
* gnu/packages/base.scm (sed)[native-inputs]: When cross-compiling to
loongarch64, add config.
[arguments]: When cross-compiling to loongarch64, Add update-config-scripts
phase.
Change-Id: I056d5004ec326f8c5b30853d5ea401ea12a949b7
---
gnu/packages/base.scm | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 46390506236..df0a4e5aa1b 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -217,7 +217,25 @@ (define-public sed
(modules '((guix build utils)))))
(build-system gnu-build-system)
(synopsis "Stream editor")
- (native-inputs (list perl)) ;for tests
+ (native-inputs (append (if (and (target-loongarch64?)
+ (%current-target-system))
+ (list config)
+ '())
+ (list perl))) ;for tests
+ (arguments (if (and (target-loongarch64?)
+ (%current-target-system))
+ (list #:phases
+ #~(modify-phases %standard-phases
+ (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)) "./build-aux"))
+ '("config.guess" "config.sub"))))))
+ '()))
(description
"Sed is a non-interactive, text stream editor. It receives a text
input from a file or from standard input and it then applies a series of text
--
2.46.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [bug#75051] [PATCH 12/14] gnu: isl: Fix cross-compiling to loongarch64.
[not found] <cover.1734972657.git.873216071@qq.com>
` (10 preceding siblings ...)
2024-12-23 17:13 ` [bug#75051] [PATCH 11/14] gnu: sed: " Zheng Junjie via Guix-patches via
@ 2024-12-23 17:13 ` Zheng Junjie via Guix-patches via
2024-12-23 17:13 ` [bug#75051] [PATCH 13/14] gnu: pcre2: disable jit on loongarch64 Zheng Junjie via Guix-patches via
2024-12-23 17:14 ` [bug#75051] [PATCH 14/14] gnu: elfutils: Fix cross-compiling to loongarch64 Zheng Junjie via Guix-patches via
13 siblings, 0 replies; 14+ messages in thread
From: Zheng Junjie via Guix-patches via @ 2024-12-23 17:13 UTC (permalink / raw)
To: 75051; +Cc: Andreas Enge, Janneke Nieuwenhuizen, Ludovic Courtès
* gnu/packages/gcc.scm (isl)[arguments]: When cross-compiling to
loongarch64, Add update-config-scripts phase.
[native-inputs]: When cross-compiling to loongarch64, Add config.
Change-Id: If60b28f64dd3285f5b89000c42e714be07876400
---
gnu/packages/gcc.scm | 21 +++++++++++++++++++--
1 file changed, 19 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index 6247919fec4..37c002f7fd7 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -37,6 +37,7 @@ (define-module (gnu packages gcc)
#:use-module ((guix licenses)
#:select (gpl3+ gpl2+ lgpl2.1+ lgpl2.0+ fdl1.3+))
#:use-module (gnu packages)
+ #:use-module (gnu packages autotools)
#:use-module (gnu packages bootstrap)
#:use-module (gnu packages compression)
#:use-module (gnu packages multiprecision)
@@ -1416,7 +1417,7 @@ (define-public isl
(build-system gnu-build-system)
(outputs '("out" "static"))
(arguments
- '(#:phases (modify-phases %standard-phases
+ `(#:phases (modify-phases %standard-phases
(add-after 'install 'move-static-library
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
@@ -1431,7 +1432,23 @@ (define-public isl
;; libtool looks for it in the usual locations.
(substitute* (string-append out "/lib/libisl.la")
(("^old_library=.*")
- "old_library=''\n"))))))))
+ "old_library=''\n")))))
+ ,@(if (and (target-loongarch64?)
+ (%current-target-system))
+ `((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)) "."))
+ '("config.guess" "config.sub")))))
+ '()))))
+ (native-inputs (if (and (target-loongarch64?)
+ (%current-target-system))
+ (list config)
+ '()))
(inputs (list gmp))
(home-page "https://libisl.sourceforge.io/") ;https://repo.or.cz/w/isl.git
(properties `((release-monitoring-url . ,home-page)))
--
2.46.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [bug#75051] [PATCH 13/14] gnu: pcre2: disable jit on loongarch64.
[not found] <cover.1734972657.git.873216071@qq.com>
` (11 preceding siblings ...)
2024-12-23 17:13 ` [bug#75051] [PATCH 12/14] gnu: isl: " Zheng Junjie via Guix-patches via
@ 2024-12-23 17:13 ` Zheng Junjie via Guix-patches via
2024-12-23 17:14 ` [bug#75051] [PATCH 14/14] gnu: elfutils: Fix cross-compiling to loongarch64 Zheng Junjie via Guix-patches via
13 siblings, 0 replies; 14+ messages in thread
From: Zheng Junjie via Guix-patches via @ 2024-12-23 17:13 UTC (permalink / raw)
To: 75051
* gnu/packages/pcre.scm (pcre2)[arguments]<#:configure-flags>: when
target loongarch64, don't pass --enable-jit.
Change-Id: I5c57da334da0d9fe33e3ec7963a4967e5463d125
---
gnu/packages/pcre.scm | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/pcre.scm b/gnu/packages/pcre.scm
index 6f31d3c1d7e..1dbd2180a84 100644
--- a/gnu/packages/pcre.scm
+++ b/gnu/packages/pcre.scm
@@ -112,8 +112,10 @@ (define-public pcre2
"--enable-pcre2test-libreadline"
"--enable-pcre2-16"
"--enable-pcre2-32"
- ;; riscv64-linux is an unsupported architecture.
- #$@(if (target-riscv64?)
+ ;; riscv64-linux and loongarch64-linux is an unsupported
+ ;; architecture.
+ #$@(if (or (target-riscv64?)
+ (target-loongarch64?))
#~()
#~("--enable-jit")))
#:phases
--
2.46.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [bug#75051] [PATCH 14/14] gnu: elfutils: Fix cross-compiling to loongarch64.
[not found] <cover.1734972657.git.873216071@qq.com>
` (12 preceding siblings ...)
2024-12-23 17:13 ` [bug#75051] [PATCH 13/14] gnu: pcre2: disable jit on loongarch64 Zheng Junjie via Guix-patches via
@ 2024-12-23 17:14 ` Zheng Junjie via Guix-patches via
13 siblings, 0 replies; 14+ messages in thread
From: Zheng Junjie via Guix-patches via @ 2024-12-23 17:14 UTC (permalink / raw)
To: 75051
* gnu/packages/elf.scm (elfutils)[native-inputs]: When cross-compiling to
loongarch64, add config.
[arguments]: When cross-compiling to loongarch64, Add update-config-scripts
phase.
Change-Id: I0a0b4faa8594ecca2344eb4b15392e4355e79e45
---
gnu/packages/elf.scm | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/elf.scm b/gnu/packages/elf.scm
index 8f036ab2211..57d26a9f0d8 100644
--- a/gnu/packages/elf.scm
+++ b/gnu/packages/elf.scm
@@ -120,6 +120,18 @@ (define-public elfutils
(("run-strip-strmerge.sh") "")
(("run-elflint-self.sh") "")))))
#~())
+ #$@(if (and (target-loongarch64?)
+ (%current-target-system))
+ `((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)) "./config"))
+ '("config.guess" "config.sub")))))
+ '())
#$@(if (system-hurd?)
#~((add-after 'unpack 'skip-tests
(lambda _
@@ -151,8 +163,10 @@ (define-public elfutils
(search-patch
"elfutils-libdwfl-string-overflow.patch"))))))
#~()))))
-
- (native-inputs (list m4))
+ (native-inputs (append (if (target-loongarch64?)
+ (list config)
+ (list))
+ (list m4)))
(inputs (list xz zlib))
(home-page "https://sourceware.org/elfutils/")
(synopsis "Collection of utilities and libraries to handle ELF files and
--
2.46.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
end of thread, other threads:[~2024-12-23 17:15 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <cover.1734972657.git.873216071@qq.com>
2024-12-23 17:05 ` [bug#75051] [PATCH 01/14] guix: Add loongarch platform Zheng Junjie via Guix-patches via
2024-12-23 17:08 ` [bug#75051] [PATCH 02/14] utils: Add target-loongarch64? Zheng Junjie via Guix-patches via
2024-12-23 17:08 ` [bug#75051] [PATCH 03/14] gnu: Add linux-libre-headers-5.19.17 Zheng Junjie via Guix-patches via
2024-12-23 17:10 ` [bug#75051] [PATCH 04/14] gnu: cross-base: Add cross-compiling support for loongarch64 Zheng Junjie via Guix-patches via
2024-12-23 17:11 ` [bug#75051] [PATCH 05/14] gnu: %glibc-stripped: Fix cross-compiling to loongarch64 Zheng Junjie via Guix-patches via
2024-12-23 17:12 ` [bug#75051] [PATCH 06/14] gnu: openssl: Support loongarch64 Zheng Junjie via Guix-patches via
2024-12-23 17:12 ` [bug#75051] [PATCH 07/14] gnu: readline: Fix cross-compiling to loongarch64 Zheng Junjie via Guix-patches via
2024-12-23 17:13 ` [bug#75051] [PATCH 08/14] gnu: gdbm: " Zheng Junjie via Guix-patches via
2024-12-23 17:13 ` [bug#75051] [PATCH 09/14] gnu: libatomic-ops: " Zheng Junjie via Guix-patches via
2024-12-23 17:13 ` [bug#75051] [PATCH 10/14] gnu: bash: " Zheng Junjie via Guix-patches via
2024-12-23 17:13 ` [bug#75051] [PATCH 11/14] gnu: sed: " Zheng Junjie via Guix-patches via
2024-12-23 17:13 ` [bug#75051] [PATCH 12/14] gnu: isl: " Zheng Junjie via Guix-patches via
2024-12-23 17:13 ` [bug#75051] [PATCH 13/14] gnu: pcre2: disable jit on loongarch64 Zheng Junjie via Guix-patches via
2024-12-23 17:14 ` [bug#75051] [PATCH 14/14] gnu: elfutils: Fix cross-compiling to loongarch64 Zheng Junjie via Guix-patches via
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).