* [bug#47182] [PATCH 02/18] utils: Add target-powerpc? procedure.
2021-03-16 6:44 ` [bug#47182] [PATCH 01/18] gnu: bootstrap: Add support for powerpc64le-linux Chris Marusich
@ 2021-03-16 6:44 ` Chris Marusich
2021-03-16 6:44 ` [bug#47182] [PATCH 03/18] gnu: gcc-4.7: On powerpc64le, fix /lib64 references Chris Marusich
` (16 subsequent siblings)
17 siblings, 0 replies; 33+ messages in thread
From: Chris Marusich @ 2021-03-16 6:44 UTC (permalink / raw)
To: 47182; +Cc: Chris Marusich
* guix/utils.scm (target-powerpc?): New exported procedure.
---
guix/utils.scm | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/guix/utils.scm b/guix/utils.scm
index 21e3460b2c7..fc57620319e 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -9,6 +9,7 @@
;;; Copyright © 2018, 2020 Marius Bakke <marius@gnu.org>
;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com>
+;;; Copyright © 2021 Chris Marusich <cmmarusich@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -79,6 +80,7 @@
target-arm32?
target-aarch64?
target-arm?
+ target-powerpc?
target-64bit?
cc-for-target
cxx-for-target
@@ -541,6 +543,10 @@ a character other than '@'."
(%current-system))))
(or (target-arm32? target) (target-aarch64? target)))
+(define* (target-powerpc? #:optional (target (or (%current-target-system)
+ (%current-system))))
+ (string-prefix? "powerpc" target))
+
(define* (target-64bit? #:optional (system (or (%current-target-system)
(%current-system))))
(any (cut string-prefix? <> system) '("x86_64" "aarch64" "mips64" "ppc64")))
--
2.26.2
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [bug#47182] [PATCH 03/18] gnu: gcc-4.7: On powerpc64le, fix /lib64 references.
2021-03-16 6:44 ` [bug#47182] [PATCH 01/18] gnu: bootstrap: Add support for powerpc64le-linux Chris Marusich
2021-03-16 6:44 ` [bug#47182] [PATCH 02/18] utils: Add target-powerpc? procedure Chris Marusich
@ 2021-03-16 6:44 ` Chris Marusich
2021-03-16 6:44 ` [bug#47182] [PATCH 04/18] gnu: glibc: Fix ldd path on powerpc* Chris Marusich
` (15 subsequent siblings)
17 siblings, 0 replies; 33+ messages in thread
From: Chris Marusich @ 2021-03-16 6:44 UTC (permalink / raw)
To: 47182; +Cc: Chris Marusich
Fixes: <https://bugs.gnu.org/46253>.
* gnu/packages/gcc.scm (gcc-4.7)[#:phases][pre-configure]: When the
gcc/config/rs6000 directory exists, replace "/lib64" with "/lib" in all files
within it. Note that this fix will be picked up by any package that re-uses
the pre-configure phase from gcc-4.7 (e.g., all the usual gcc packages).
(make-libstdc++)[#:phases][fix-rs6000-libdir]: New phase, which does the same
as above. It was necessary to duplicate the fix here because make-libstdc++
does not re-use the pre-configure phase from gcc-4.7.
---
gnu/packages/gcc.scm | 38 +++++++++++++++++++++++++++++++-------
1 file changed, 31 insertions(+), 7 deletions(-)
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index 4d5aaa70701..3ea8695cf18 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -3,13 +3,14 @@
;;; Copyright © 2014, 2015, 2018 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2014, 2015, 2016, 2017, 2019 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
-;;; Copyright © 2015, 2016, 2017, 2018, 2020 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2015, 2016, 2017, 2018, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 Carlos Sánchez de La Lama <csanchezdll@gmail.com>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018, 2020 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2020 Joseph LaFreniere <joseph@lafreniere.xyz>
;;; Copyright © 2020 Guy Fleury Iteriteka <gfleury@disroot.org>
;;; Copyright © 2020 Simon Tournier <zimon.toutoune@gmail.com>
+;;; Copyright © 2021 Chris Marusich <cmmarusich@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -273,6 +274,14 @@ where the OS part is overloaded to denote a specific ABI---into GCC
~a"
libc line))))
+ ;; TODO: Make this unconditional in core-updates.
+ ,@(if (target-powerpc?)
+ `((when (file-exists? "gcc/config/rs6000")
+ ;; Force powerpc libdir to be /lib and not /lib64
+ (substitute* (find-files "gcc/config/rs6000")
+ (("/lib64") "/lib"))))
+ `())
+
;; Don't retain a dependency on the build-time sed.
(substitute* "fixincludes/fixincl.x"
(("static char const sed_cmd_z\\[\\] =.*;")
@@ -598,12 +607,27 @@ using compilers other than GCC."
(name "libstdc++")
(arguments
`(#:out-of-source? #t
- #:phases (alist-cons-before
- 'configure 'chdir
- (lambda _
- (chdir "libstdc++-v3")
- #t)
- %standard-phases)
+ #:phases
+ ;; TODO: Use the target-powerpc arm for everyone.
+ ,(if (target-powerpc?)
+ `(modify-phases %standard-phases
+ ;; Force rs6000 (i.e., powerpc) libdir to be /lib and not /lib64.
+ (add-before 'chdir 'fix-rs6000-libdir
+ (lambda _
+ (when (file-exists? "gcc/config/rs6000")
+ (substitute* (find-files "gcc/config/rs6000")
+ (("/lib64") "/lib")))
+ #t))
+ (add-before 'configure 'chdir
+ (lambda _
+ (chdir "libstdc++-v3")
+ #t)))
+ `(alist-cons-before 'configure 'chdir
+ (lambda _
+ (chdir "libstdc++-v3")
+ #t)
+ %standard-phases))
+
#:configure-flags `("--disable-libstdcxx-pch"
,(string-append "--with-gxx-include-dir="
(assoc-ref %outputs "out")
--
2.26.2
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [bug#47182] [PATCH 04/18] gnu: glibc: Fix ldd path on powerpc*.
2021-03-16 6:44 ` [bug#47182] [PATCH 01/18] gnu: bootstrap: Add support for powerpc64le-linux Chris Marusich
2021-03-16 6:44 ` [bug#47182] [PATCH 02/18] utils: Add target-powerpc? procedure Chris Marusich
2021-03-16 6:44 ` [bug#47182] [PATCH 03/18] gnu: gcc-4.7: On powerpc64le, fix /lib64 references Chris Marusich
@ 2021-03-16 6:44 ` Chris Marusich
2021-03-16 7:45 ` Efraim Flashner
2021-03-16 6:44 ` [bug#47182] [PATCH 05/18] gnu: gcc-boot0: Enable 128-bit long double for POWER9 Chris Marusich
` (14 subsequent siblings)
17 siblings, 1 reply; 33+ messages in thread
From: Chris Marusich @ 2021-03-16 6:44 UTC (permalink / raw)
To: 47182; +Cc: Leo Le Bouter, Chris Marusich, Efraim Flashner
From: Leo Le Bouter <lle-bout@zaclys.net>
This should avoid some problems, such as "not a dynamic executable" errors.
* gnu/packages/patches/glibc-ldd-powerpc.patch: New patch.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/base.scm: (glibc)[native-inputs]: Add it.
[arguments]: When building for powerpc* apply it.
* gnu/packages/commencement.scm (glibc-final-with-bootstrap-bash,
glibc-final)[native-inputs]: Add patch conditionally.
This patch has been adjusted to apply to master.
Signed-off-by: Chris Marusich <cmmarusich@gmail.com>
Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
---
gnu/local.mk | 1 +
gnu/packages/base.scm | 16 +++++++++++++++-
gnu/packages/commencement.scm | 10 +++++++++-
gnu/packages/patches/glibc-ldd-powerpc.patch | 10 ++++++++++
4 files changed, 35 insertions(+), 2 deletions(-)
create mode 100644 gnu/packages/patches/glibc-ldd-powerpc.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index cf8849cf598..4bd333e56f2 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1120,6 +1120,7 @@ dist_patch_DATA = \
%D%/packages/patches/glibc-hurd-mach-print.patch \
%D%/packages/patches/glibc-hurd-magic-pid.patch \
%D%/packages/patches/glibc-hurd-signal-sa-siginfo.patch \
+ %D%/packages/patches/glibc-ldd-powerpc.patch \
%D%/packages/patches/glibc-ldd-x86_64.patch \
%D%/packages/patches/glibc-locales.patch \
%D%/packages/patches/glibc-locales-2.28.patch \
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 9aa69cfe773..7c5ac61f01c 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -5,7 +5,7 @@
;;; Copyright © 2014, 2015, 2016, 2018 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2014 Alex Kost <alezost@gmail.com>
;;; Copyright © 2014, 2015 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
-;;; Copyright © 2016, 2017, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2017, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016, 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2016, 2018 Alex Vong <alexvong1995@gmail.com>
;;; Copyright © 2017 Rene Saavedra <rennes@openmailbox.org>
@@ -15,6 +15,8 @@
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2020 Vitaliy Shatrov <D0dyBo0D0dyBo0@protonmail.com>
+;;; Copyright © 2020 Chris Marusich <cmmarusich@gmail.com>
+;;; Copyright © 2021 Leo Le Bouter <lle-bout@zaclys.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -890,6 +892,14 @@ the store.")
files)))
#t)))
+ ,@(if (target-powerpc?)
+ '((add-after 'unpack 'apply-patch
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((patch (assoc-ref inputs
+ "powerpc64le-patch")))
+ (invoke "patch" "--force" "-p1"
+ "-i" patch)))))
+ '())
,@(if (hurd-target?)
'((add-after 'install 'augment-libc.so
(lambda* (#:key outputs #:allow-other-keys)
@@ -911,6 +921,10 @@ the store.")
("gettext" ,gettext-minimal)
("python" ,python-minimal)
+ ,@(if (target-powerpc?)
+ `(("powerpc64le-patch" ,@(search-patches
+ "glibc-ldd-powerpc.patch")))
+ '())
,@(if (hurd-target?)
`(("mig" ,mig)
("perl" ,perl))
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 432910d7a30..93b0c508822 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -3313,7 +3313,11 @@ memoized as a function of '%current-system'."
`(("bison" ,bison-boot0)
("texinfo" ,texinfo-boot0)
("perl" ,perl-boot0)
- ("python" ,python-boot0)))
+ ("python" ,python-boot0)
+ ,@(if (target-powerpc?)
+ `(("powerpc64le-patch" ,@(search-patches
+ "glibc-ldd-powerpc.patch")))
+ '())))
(inputs
`( ;; The boot inputs. That includes the bootstrap libc. We don't want
;; it in $CPATH, hence the 'pre-configure' phase above.
@@ -3464,6 +3468,10 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
;; This time we need 'msgfmt' to install all the libc.mo files.
(native-inputs `(,@(package-native-inputs glibc-final-with-bootstrap-bash)
+ ,@(if (target-powerpc?)
+ `(("powerpc64le-patch" ,@(search-patches
+ "glibc-ldd-powerpc.patch")))
+ '())
("gettext" ,gettext-boot0)))
(propagated-inputs
diff --git a/gnu/packages/patches/glibc-ldd-powerpc.patch b/gnu/packages/patches/glibc-ldd-powerpc.patch
new file mode 100644
index 00000000000..8e899ee99b8
--- /dev/null
+++ b/gnu/packages/patches/glibc-ldd-powerpc.patch
@@ -0,0 +1,10 @@
+diff -r -U3 a/sysdeps/unix/sysv/linux/powerpc/ldd-rewrite.sed b/sysdeps/unix/sysv/linux/powerpc/ldd-rewrite.sed
+--- a/sysdeps/unix/sysv/linux/powerpc/ldd-rewrite.sed 1970-01-01 01:00:00.000000000 +0100
++++ b/sysdeps/unix/sysv/linux/powerpc/ldd-rewrite.sed 2020-02-29 00:15:41.080000000 +0100
+@@ -11,5 +11,5 @@
+ # this works for /lib64/ld64.so.x and /lib/ld.so.x as input
+ s_lib64_lib_
+ s_64\.so_\.so_
+-s_^RTLDLIST=\(.*lib\)\(/[^/]*\)\(\.so\.[0-9.]*\)[[:blank:]]*$_RTLDLIST="\1\2\3 \164\264\3"_
++s_^RTLDLIST=\(.*lib\)\(/[^/]*\)\(\.so\.[0-9.]*\)[[:blank:]]*$_RTLDLIST="\1\2\3 \1\264\3"_
+
--
2.26.2
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [bug#47182] [PATCH 05/18] gnu: gcc-boot0: Enable 128-bit long double for POWER9.
2021-03-16 6:44 ` [bug#47182] [PATCH 01/18] gnu: bootstrap: Add support for powerpc64le-linux Chris Marusich
` (2 preceding siblings ...)
2021-03-16 6:44 ` [bug#47182] [PATCH 04/18] gnu: glibc: Fix ldd path on powerpc* Chris Marusich
@ 2021-03-16 6:44 ` Chris Marusich
2021-03-16 6:44 ` [bug#47182] [PATCH 06/18] gnu: binutils-final: Provide bash for binary on powerpc-linux Chris Marusich
` (13 subsequent siblings)
17 siblings, 0 replies; 33+ messages in thread
From: Chris Marusich @ 2021-03-16 6:44 UTC (permalink / raw)
To: 47182; +Cc: Chris Marusich
* gnu/packages/commencement.scm (gcc-boot0) [#:configure-flags]: Add
--with-long-double-128 when the boot triplet is "powerpc64le-guix-linux-gnu",
instead of "powerpc64le-linux-gnu", which is incorrect. The actual triplet
used during bootstrapping is "powerpc64le-guix-linux-gnu".
---
gnu/packages/commencement.scm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 93b0c508822..86bc7a602da 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -9,6 +9,7 @@
;;; Copyright © 2019, 2020 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2020 Timothy Sample <samplet@ngyro.com>
;;; Copyright © 2020 Guy Fleury Iteriteka <gfleury@disroot.org>
+;;; Copyright © 2021 Chris Marusich <cmmarusich@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -2818,7 +2819,8 @@ exec " gcc "/bin/" program
"--disable-shared"
"--enable-languages=c,c++"
- ,@(if (equal? "powerpc64le-linux-gnu" (boot-triplet))
+ ;; boot-triplet inserts "guix" in the triplet.
+ ,@(if (equal? "powerpc64le-guix-linux-gnu" (boot-triplet))
;; On POWER9 (little endian) glibc needs the
;; 128-bit long double type.
'("--with-long-double-128")
--
2.26.2
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [bug#47182] [PATCH 06/18] gnu: binutils-final: Provide bash for binary on powerpc-linux.
2021-03-16 6:44 ` [bug#47182] [PATCH 01/18] gnu: bootstrap: Add support for powerpc64le-linux Chris Marusich
` (3 preceding siblings ...)
2021-03-16 6:44 ` [bug#47182] [PATCH 05/18] gnu: gcc-boot0: Enable 128-bit long double for POWER9 Chris Marusich
@ 2021-03-16 6:44 ` Chris Marusich
2021-03-16 6:45 ` [bug#47182] [PATCH 07/18] gnu: binutils-final: Support more Power architectures Chris Marusich
` (12 subsequent siblings)
17 siblings, 0 replies; 33+ messages in thread
From: Chris Marusich @ 2021-03-16 6:44 UTC (permalink / raw)
To: 47182; +Cc: Efraim Flashner
From: Efraim Flashner <efraim@flashner.co.il>
* gnu/packages/commencement.scm (binutils-final)[arguments]: On
powerpc-linux allow a reference to static-bash-for-glibc.
[inputs]: On powerpc-linux add static-bash-for-glibc.
---
gnu/packages/commencement.scm | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 86bc7a602da..c0732bbf62d 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -3514,9 +3514,19 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
(arguments
`(#:guile ,%bootstrap-guile
#:implicit-inputs? #f
- #:allowed-references ("out" ,glibc-final)
+ #:allowed-references
+ ,@(match (%current-system)
+ ("powerpc-linux"
+ `(("out" ,glibc-final ,static-bash-for-glibc)))
+ (_
+ `(("out" ,glibc-final))))
,@(package-arguments binutils)))
- (inputs (%boot2-inputs))))
+ (inputs
+ (match (%current-system)
+ ("powerpc-linux"
+ `(("bash" ,static-bash-for-glibc)
+ ,@(%boot2-inputs)))
+ (_ (%boot2-inputs))))))
(define libstdc++
;; Intermediate libstdc++ that will allow us to build the final GCC
--
2.26.2
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [bug#47182] [PATCH 07/18] gnu: binutils-final: Support more Power architectures.
2021-03-16 6:44 ` [bug#47182] [PATCH 01/18] gnu: bootstrap: Add support for powerpc64le-linux Chris Marusich
` (4 preceding siblings ...)
2021-03-16 6:44 ` [bug#47182] [PATCH 06/18] gnu: binutils-final: Provide bash for binary on powerpc-linux Chris Marusich
@ 2021-03-16 6:45 ` Chris Marusich
2021-03-16 7:49 ` Efraim Flashner
2021-03-16 6:45 ` [bug#47182] [PATCH 08/18] gnu: bdb-4.8: Fix configure on powerpc64le-linux Chris Marusich
` (11 subsequent siblings)
17 siblings, 1 reply; 33+ messages in thread
From: Chris Marusich @ 2021-03-16 6:45 UTC (permalink / raw)
To: 47182; +Cc: Chris Marusich
* gnu/packages/commencement.scm (binutils-final)[arguments]: When checking if
the system is a Power architecture, instead of hard-coding "powerpc-linux",
use the target-powerpc? procedure so it works on more Power architectures.
[inputs]: Likewise.
---
gnu/packages/commencement.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index c0732bbf62d..d4511ed9148 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -3516,14 +3516,14 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
#:implicit-inputs? #f
#:allowed-references
,@(match (%current-system)
- ("powerpc-linux"
+ ((? target-powerpc?)
`(("out" ,glibc-final ,static-bash-for-glibc)))
(_
`(("out" ,glibc-final))))
,@(package-arguments binutils)))
(inputs
(match (%current-system)
- ("powerpc-linux"
+ ((? target-powerpc?)
`(("bash" ,static-bash-for-glibc)
,@(%boot2-inputs)))
(_ (%boot2-inputs))))))
--
2.26.2
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [bug#47182] [PATCH 07/18] gnu: binutils-final: Support more Power architectures.
2021-03-16 6:45 ` [bug#47182] [PATCH 07/18] gnu: binutils-final: Support more Power architectures Chris Marusich
@ 2021-03-16 7:49 ` Efraim Flashner
2021-03-18 6:10 ` [bug#47182] [PATCH 00/18] Add support for powerpc64le-linux (wip-ppc64le-for-master) Chris Marusich
0 siblings, 1 reply; 33+ messages in thread
From: Efraim Flashner @ 2021-03-16 7:49 UTC (permalink / raw)
To: Chris Marusich; +Cc: 47182
[-- Attachment #1: Type: text/plain, Size: 1705 bytes --]
On Mon, Mar 15, 2021 at 11:45:00PM -0700, Chris Marusich wrote:
> * gnu/packages/commencement.scm (binutils-final)[arguments]: When checking if
> the system is a Power architecture, instead of hard-coding "powerpc-linux",
> use the target-powerpc? procedure so it works on more Power architectures.
> [inputs]: Likewise.
> ---
> gnu/packages/commencement.scm | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
> index c0732bbf62d..d4511ed9148 100644
> --- a/gnu/packages/commencement.scm
> +++ b/gnu/packages/commencement.scm
> @@ -3516,14 +3516,14 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
> #:implicit-inputs? #f
> #:allowed-references
> ,@(match (%current-system)
> - ("powerpc-linux"
> + ((? target-powerpc?)
I wonder if this would be better as ,@(if target-powerpc?
I didn't test to see how it would work with cross compiling, I don't
know if binutils-final gets built in that case.
> `(("out" ,glibc-final ,static-bash-for-glibc)))
> (_
> `(("out" ,glibc-final))))
> ,@(package-arguments binutils)))
> (inputs
> (match (%current-system)
> - ("powerpc-linux"
> + ((? target-powerpc?)
> `(("bash" ,static-bash-for-glibc)
> ,@(%boot2-inputs)))
> (_ (%boot2-inputs))))))
> --
> 2.26.2
>
>
>
>
--
Efraim Flashner <efraim@flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 33+ messages in thread
* [bug#47182] [PATCH 00/18] Add support for powerpc64le-linux (wip-ppc64le-for-master)
2021-03-16 7:49 ` Efraim Flashner
@ 2021-03-18 6:10 ` Chris Marusich
2021-03-18 8:29 ` Efraim Flashner
0 siblings, 1 reply; 33+ messages in thread
From: Chris Marusich @ 2021-03-18 6:10 UTC (permalink / raw)
To: Efraim Flashner; +Cc: 47182
Efraim Flashner <efraim@flashner.co.il> writes:
> On Mon, Mar 15, 2021 at 11:45:00PM -0700, Chris Marusich wrote:
>> * gnu/packages/commencement.scm (binutils-final)[arguments]: When checking if
>> the system is a Power architecture, instead of hard-coding "powerpc-linux",
>> use the target-powerpc? procedure so it works on more Power architectures.
>> [inputs]: Likewise.
>> ---
>> gnu/packages/commencement.scm | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
>> index c0732bbf62d..d4511ed9148 100644
>> --- a/gnu/packages/commencement.scm
>> +++ b/gnu/packages/commencement.scm
>> @@ -3516,14 +3516,14 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
>> #:implicit-inputs? #f
>> #:allowed-references
>> ,@(match (%current-system)
>> - ("powerpc-linux"
>> + ((? target-powerpc?)
>
> I wonder if this would be better as ,@(if target-powerpc?
> I didn't test to see how it would work with cross compiling, I don't
> know if binutils-final gets built in that case.
Are the final inputs ever cross-compiled? I'm having trouble thinking
of a case when binutils-final would ever be cross-compiled. The package
(like all the final inputs) exist specifically to provide the native GCC
used for building the rest of the things in the system. In a case where
you want to cross-compile e.g. GNU Hello, Guix first uses these final
inputs to (natively) build a cross compilation toolchain, and then it
will use that one to cross-compile GNU Hello.
I don't think we need to account for cross-compliation of the final
inputs, but please correct me if I'm wrong.
--
Chris
^ permalink raw reply [flat|nested] 33+ messages in thread
* [bug#47182] [PATCH 00/18] Add support for powerpc64le-linux (wip-ppc64le-for-master)
2021-03-18 6:10 ` [bug#47182] [PATCH 00/18] Add support for powerpc64le-linux (wip-ppc64le-for-master) Chris Marusich
@ 2021-03-18 8:29 ` Efraim Flashner
0 siblings, 0 replies; 33+ messages in thread
From: Efraim Flashner @ 2021-03-18 8:29 UTC (permalink / raw)
To: Chris Marusich; +Cc: 47182
[-- Attachment #1: Type: text/plain, Size: 2652 bytes --]
On Wed, Mar 17, 2021 at 11:10:23PM -0700, Chris Marusich wrote:
> Efraim Flashner <efraim@flashner.co.il> writes:
>
> > On Mon, Mar 15, 2021 at 11:45:00PM -0700, Chris Marusich wrote:
> >> * gnu/packages/commencement.scm (binutils-final)[arguments]: When checking if
> >> the system is a Power architecture, instead of hard-coding "powerpc-linux",
> >> use the target-powerpc? procedure so it works on more Power architectures.
> >> [inputs]: Likewise.
> >> ---
> >> gnu/packages/commencement.scm | 4 ++--
> >> 1 file changed, 2 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
> >> index c0732bbf62d..d4511ed9148 100644
> >> --- a/gnu/packages/commencement.scm
> >> +++ b/gnu/packages/commencement.scm
> >> @@ -3516,14 +3516,14 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
> >> #:implicit-inputs? #f
> >> #:allowed-references
> >> ,@(match (%current-system)
> >> - ("powerpc-linux"
> >> + ((? target-powerpc?)
> >
> > I wonder if this would be better as ,@(if target-powerpc?
> > I didn't test to see how it would work with cross compiling, I don't
> > know if binutils-final gets built in that case.
>
> Are the final inputs ever cross-compiled? I'm having trouble thinking
> of a case when binutils-final would ever be cross-compiled. The package
> (like all the final inputs) exist specifically to provide the native GCC
> used for building the rest of the things in the system. In a case where
> you want to cross-compile e.g. GNU Hello, Guix first uses these final
> inputs to (natively) build a cross compilation toolchain, and then it
> will use that one to cross-compile GNU Hello.
>
> I don't think we need to account for cross-compliation of the final
> inputs, but please correct me if I'm wrong.
>
I first tried to cross compile binutils-final from x86_64 but it failed
because all the mes packages don't support powerpc yet. Then I tried
emulating an aarch64 machine to cross compile binutils-final and that
failed at make-boot0. I think we can assume that binutils-final (and the
other -final packages) aren't going to be cross compiled.
,@(if might be cleaner to look at, but ,@(match makes it easier to
make change later without worrying about nested if statements. Which
hopefully shouldn't be an issue anyway for binutils-final.
--
Efraim Flashner <efraim@flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 33+ messages in thread
* [bug#47182] [PATCH 08/18] gnu: bdb-4.8: Fix configure on powerpc64le-linux.
2021-03-16 6:44 ` [bug#47182] [PATCH 01/18] gnu: bootstrap: Add support for powerpc64le-linux Chris Marusich
` (5 preceding siblings ...)
2021-03-16 6:45 ` [bug#47182] [PATCH 07/18] gnu: binutils-final: Support more Power architectures Chris Marusich
@ 2021-03-16 6:45 ` Chris Marusich
2021-03-16 6:45 ` [bug#47182] [PATCH 09/18] gnu: guile-avahi: Fix compilation " Chris Marusich
` (10 subsequent siblings)
17 siblings, 0 replies; 33+ messages in thread
From: Chris Marusich @ 2021-03-16 6:45 UTC (permalink / raw)
To: 47182; +Cc: Leo Le Bouter, Chris Marusich
From: Leo Le Bouter <lle-bout@zaclys.net>
* gnu/packages/dbm.scm (bdb-4.8)[arguments]: Modify 'configure phase to append
"--build=powerpc64le-unknown-linux-gnu" to configure's flags when compiling for
powerpc64le-linux.
Signed-off-by: Chris Marusich <cmmarusich@gmail.com>
---
gnu/packages/dbm.scm | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/gnu/packages/dbm.scm b/gnu/packages/dbm.scm
index 82647c0c283..2dd51efb8c9 100644
--- a/gnu/packages/dbm.scm
+++ b/gnu/packages/dbm.scm
@@ -4,6 +4,7 @@
;;; Copyright © 2016, 2017, 2018, 2020 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2017, 2018 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2018 Mark H Weaver <mhw@netris.org>
+;;; Copyright © 2021 Leo Le Bouter <lle-bout@zaclys.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -74,6 +75,11 @@
'("--build=aarch64-unknown-linux-gnu")
'())
+ ;; Bdb doesn't recognize powerpc64le as an architecture.
+ ,@(if (string=? "powerpc64le-linux" (%current-system))
+ '("--build=powerpc64le-unknown-linux-gnu")
+ '())
+
,@(if (%current-target-system) ; cross building
'((string-append "--host=" target))
'())
--
2.26.2
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [bug#47182] [PATCH 09/18] gnu: guile-avahi: Fix compilation on powerpc64le-linux.
2021-03-16 6:44 ` [bug#47182] [PATCH 01/18] gnu: bootstrap: Add support for powerpc64le-linux Chris Marusich
` (6 preceding siblings ...)
2021-03-16 6:45 ` [bug#47182] [PATCH 08/18] gnu: bdb-4.8: Fix configure on powerpc64le-linux Chris Marusich
@ 2021-03-16 6:45 ` Chris Marusich
2021-03-16 6:45 ` [bug#47182] [PATCH 10/18] gnu: texlive-bin: Fix compilation on powerpc64le* Chris Marusich
` (9 subsequent siblings)
17 siblings, 0 replies; 33+ messages in thread
From: Chris Marusich @ 2021-03-16 6:45 UTC (permalink / raw)
To: 47182; +Cc: Leo Le Bouter, Chris Marusich
From: Leo Le Bouter <lle-bout@zaclys.net>
* gnu/packages/guile-xyz.scm (guile-avahi)[arguments]: Parallel builds fail on
powerpc64le-linux. Set "#:parallel-build?" to "#f".
Signed-off-by: Chris Marusich <cmmarusich@gmail.com>
---
gnu/packages/guile-xyz.scm | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 2e02f6f4821..449c36e08f0 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -35,6 +35,7 @@
;;; Copyright © 2020, 2021 pukkamustard <pukkamustard@posteo.net>
;;; Copyright © 2021 Bonface Munyoki Kilyungi <me@bonfacemunyoki.com>
;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
+;;; Copyright © 2021 Leo Le Bouter <lle-bout@zaclys.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -4284,6 +4285,9 @@ errors.")
,@%gnu-build-system-modules)
#:make-flags
'("GUILE_AUTO_COMPILE=0") ;to prevent guild warnings
+ ;; Parallel builds fail on powerpc64le-linux.
+ ;; See https://lists.nongnu.org/archive/html/guile-avahi-bugs/2021-01/msg00000.html
+ #:parallel-build? #f
#:phases
(modify-phases %standard-phases
(add-before 'check 'fix-guile-avahi-file-name
--
2.26.2
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [bug#47182] [PATCH 10/18] gnu: texlive-bin: Fix compilation on powerpc64le*.
2021-03-16 6:44 ` [bug#47182] [PATCH 01/18] gnu: bootstrap: Add support for powerpc64le-linux Chris Marusich
` (7 preceding siblings ...)
2021-03-16 6:45 ` [bug#47182] [PATCH 09/18] gnu: guile-avahi: Fix compilation " Chris Marusich
@ 2021-03-16 6:45 ` Chris Marusich
2021-03-16 7:53 ` Efraim Flashner
2021-03-16 6:45 ` [bug#47182] [PATCH 11/18] gnu: texlive-latex-base: Fix compilation on powerpc64le* Chris Marusich
` (8 subsequent siblings)
17 siblings, 1 reply; 33+ messages in thread
From: Chris Marusich @ 2021-03-16 6:45 UTC (permalink / raw)
To: 47182; +Cc: Leo Le Bouter, Chris Marusich
From: Leo Le Bouter <lle-bout@zaclys.net>
* gnu/packages/tex.scm (texlive-bin)[arguments]: Append "--disable-luajittex"
and "--disable-mfluajit" to keyword argument "#:configure-flags" on
powerpc64le* because LuaJIT is not ported to powerpc64le* yet. Also set
"#:tests?" to "#f" on powerpc64le*.
Signed-off-by: Chris Marusich <cmmarusich@gmail.com>
---
gnu/packages/tex.scm | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index c0f4ff0fcdc..508537acdaf 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -15,6 +15,7 @@
;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
;;; Copyright © 2020, 2021 Paul Garlick <pgarlick@tourbillion-technology.com>
;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2021 Leo Le Bouter <lle-bout@zaclys.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -342,14 +343,23 @@ files from LOCATIONS with expected checksum HASH. CODE is not currently in use.
"--with-system-teckit"
"--with-system-xpdf"
"--with-system-zlib"
- "--with-system-zziplib")
-
- ;; Disable tests on mips64/aarch64 to cope with a failure of luajiterr.test.
- ;; XXX FIXME fix luajit properly on mips64 and aarch64.
+ "--with-system-zziplib"
+ ;; LuaJIT is not ported to powerpc64le* yet.
+ ,@(if (string-prefix? "powerpc64le" (or (%current-target-system)
+ (%current-system)))
+ '("--disable-luajittex"
+ "--disable-mfluajit")
+ '()))
+
+ ;; Disable tests on some architectures to cope with a failure of
+ ;; luajiterr.test.
+ ;; XXX FIXME fix luajit properly on these architectures.
#:tests? ,(let ((s (or (%current-target-system)
(%current-system))))
(not (or (string-prefix? "aarch64" s)
- (string-prefix? "mips64" s))))
+ (string-prefix? "mips64" s)
+ (string-prefix? "powerpc64le" s))))
+
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'configure-ghostscript-executable
--
2.26.2
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [bug#47182] [PATCH 10/18] gnu: texlive-bin: Fix compilation on powerpc64le*.
2021-03-16 6:45 ` [bug#47182] [PATCH 10/18] gnu: texlive-bin: Fix compilation on powerpc64le* Chris Marusich
@ 2021-03-16 7:53 ` Efraim Flashner
2021-03-18 6:16 ` [bug#47182] [PATCH 00/18] Add support for powerpc64le-linux (wip-ppc64le-for-master) Chris Marusich
0 siblings, 1 reply; 33+ messages in thread
From: Efraim Flashner @ 2021-03-16 7:53 UTC (permalink / raw)
To: Chris Marusich; +Cc: Leo Le Bouter, 47182
[-- Attachment #1: Type: text/plain, Size: 2879 bytes --]
On Mon, Mar 15, 2021 at 11:45:03PM -0700, Chris Marusich wrote:
> From: Leo Le Bouter <lle-bout@zaclys.net>
>
> * gnu/packages/tex.scm (texlive-bin)[arguments]: Append "--disable-luajittex"
> and "--disable-mfluajit" to keyword argument "#:configure-flags" on
> powerpc64le* because LuaJIT is not ported to powerpc64le* yet. Also set
> "#:tests?" to "#f" on powerpc64le*.
>
> Signed-off-by: Chris Marusich <cmmarusich@gmail.com>
> ---
> gnu/packages/tex.scm | 20 +++++++++++++++-----
> 1 file changed, 15 insertions(+), 5 deletions(-)
>
> diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
> index c0f4ff0fcdc..508537acdaf 100644
> --- a/gnu/packages/tex.scm
> +++ b/gnu/packages/tex.scm
> @@ -15,6 +15,7 @@
> ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
> ;;; Copyright © 2020, 2021 Paul Garlick <pgarlick@tourbillion-technology.com>
> ;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
> +;;; Copyright © 2021 Leo Le Bouter <lle-bout@zaclys.net>
> ;;;
> ;;; This file is part of GNU Guix.
> ;;;
> @@ -342,14 +343,23 @@ files from LOCATIONS with expected checksum HASH. CODE is not currently in use.
> "--with-system-teckit"
> "--with-system-xpdf"
> "--with-system-zlib"
> - "--with-system-zziplib")
> -
> - ;; Disable tests on mips64/aarch64 to cope with a failure of luajiterr.test.
> - ;; XXX FIXME fix luajit properly on mips64 and aarch64.
> + "--with-system-zziplib"
> + ;; LuaJIT is not ported to powerpc64le* yet.
> + ,@(if (string-prefix? "powerpc64le" (or (%current-target-system)
> + (%current-system)))
> + '("--disable-luajittex"
> + "--disable-mfluajit")
> + '()))
> +
> + ;; Disable tests on some architectures to cope with a failure of
> + ;; luajiterr.test.
> + ;; XXX FIXME fix luajit properly on these architectures.
> #:tests? ,(let ((s (or (%current-target-system)
> (%current-system))))
> (not (or (string-prefix? "aarch64" s)
> - (string-prefix? "mips64" s))))
> + (string-prefix? "mips64" s)
> + (string-prefix? "powerpc64le" s))))
> +
we can probably change this to use cute in core-updates. I don't know if
changing it here will cause rebuilds on aarch64.
> #:phases
> (modify-phases %standard-phases
> (add-after 'unpack 'configure-ghostscript-executable
> --
> 2.26.2
>
>
>
>
--
Efraim Flashner <efraim@flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 33+ messages in thread
* [bug#47182] [PATCH 00/18] Add support for powerpc64le-linux (wip-ppc64le-for-master)
2021-03-16 7:53 ` Efraim Flashner
@ 2021-03-18 6:16 ` Chris Marusich
2021-03-18 8:34 ` Efraim Flashner
0 siblings, 1 reply; 33+ messages in thread
From: Chris Marusich @ 2021-03-18 6:16 UTC (permalink / raw)
To: Efraim Flashner; +Cc: Leo Le Bouter, 47182
Efraim Flashner <efraim@flashner.co.il> writes:
>> #:tests? ,(let ((s (or (%current-target-system)
>> (%current-system))))
>> (not (or (string-prefix? "aarch64" s)
>> - (string-prefix? "mips64" s))))
>> + (string-prefix? "mips64" s)
>> + (string-prefix? "powerpc64le" s))))
>> +
>
> we can probably change this to use cute in core-updates. I don't know if
> changing it here will cause rebuilds on aarch64.
The result of unquoting the expression will be either #t or #f,
depending on the system. For an aarch64 system, the string s hasn't
changed (it'll still start with "aarch64", right?). Therefore, my
understanding is that this change here will not alter the package
definition; it will still say "#:tests? #f", just like it did before, on
an aarch64 system. Is there something else I'm missing?
--
Chris
^ permalink raw reply [flat|nested] 33+ messages in thread
* [bug#47182] [PATCH 00/18] Add support for powerpc64le-linux (wip-ppc64le-for-master)
2021-03-18 6:16 ` [bug#47182] [PATCH 00/18] Add support for powerpc64le-linux (wip-ppc64le-for-master) Chris Marusich
@ 2021-03-18 8:34 ` Efraim Flashner
2021-03-19 6:22 ` Chris Marusich
0 siblings, 1 reply; 33+ messages in thread
From: Efraim Flashner @ 2021-03-18 8:34 UTC (permalink / raw)
To: Chris Marusich; +Cc: Leo Le Bouter, 47182
[-- Attachment #1: Type: text/plain, Size: 1559 bytes --]
On Wed, Mar 17, 2021 at 11:16:07PM -0700, Chris Marusich wrote:
> Efraim Flashner <efraim@flashner.co.il> writes:
>
> >> #:tests? ,(let ((s (or (%current-target-system)
> >> (%current-system))))
> >> (not (or (string-prefix? "aarch64" s)
> >> - (string-prefix? "mips64" s))))
> >> + (string-prefix? "mips64" s)
> >> + (string-prefix? "powerpc64le" s))))
> >> +
> >
> > we can probably change this to use cute in core-updates. I don't know if
> > changing it here will cause rebuilds on aarch64.
>
> The result of unquoting the expression will be either #t or #f,
> depending on the system. For an aarch64 system, the string s hasn't
> changed (it'll still start with "aarch64", right?). Therefore, my
> understanding is that this change here will not alter the package
> definition; it will still say "#:tests? #f", just like it did before, on
> an aarch64 system. Is there something else I'm missing?
>
I like the way it looks better if we use something like
#:tests? ,(if (any (cute string-prefix? <> (or (%current-target-system)
(%current-system)))
'("aarch64" "powerpc64le" "mips64"))
'#f '#t)
--
Efraim Flashner <efraim@flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 33+ messages in thread
* [bug#47182] [PATCH 00/18] Add support for powerpc64le-linux (wip-ppc64le-for-master)
2021-03-18 8:34 ` Efraim Flashner
@ 2021-03-19 6:22 ` Chris Marusich
0 siblings, 0 replies; 33+ messages in thread
From: Chris Marusich @ 2021-03-19 6:22 UTC (permalink / raw)
To: Efraim Flashner; +Cc: Leo Le Bouter, 47182
[-- Attachment #1: Type: text/plain, Size: 1685 bytes --]
Efraim Flashner <efraim@flashner.co.il> writes:
> On Wed, Mar 17, 2021 at 11:16:07PM -0700, Chris Marusich wrote:
>> Efraim Flashner <efraim@flashner.co.il> writes:
>>
>> >> #:tests? ,(let ((s (or (%current-target-system)
>> >> (%current-system))))
>> >> (not (or (string-prefix? "aarch64" s)
>> >> - (string-prefix? "mips64" s))))
>> >> + (string-prefix? "mips64" s)
>> >> + (string-prefix? "powerpc64le" s))))
>> >> +
>> >
>> > we can probably change this to use cute in core-updates. I don't know if
>> > changing it here will cause rebuilds on aarch64.
>>
>> The result of unquoting the expression will be either #t or #f,
>> depending on the system. For an aarch64 system, the string s hasn't
>> changed (it'll still start with "aarch64", right?). Therefore, my
>> understanding is that this change here will not alter the package
>> definition; it will still say "#:tests? #f", just like it did before, on
>> an aarch64 system. Is there something else I'm missing?
>>
>
> I like the way it looks better if we use something like
>
> #:tests? ,(if (any (cute string-prefix? <> (or (%current-target-system)
> (%current-system)))
> '("aarch64" "powerpc64le" "mips64"))
> '#f '#t)
Both forms achieve the same result. I honestly think either would be
fine. Therefore, I don't intend to change the commit corresponding to
this specific patch. However, if you went and changed it per above, I
wouldn't mind at all.
--
Chris
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]
^ permalink raw reply [flat|nested] 33+ messages in thread
* [bug#47182] [PATCH 11/18] gnu: texlive-latex-base: Fix compilation on powerpc64le*.
2021-03-16 6:44 ` [bug#47182] [PATCH 01/18] gnu: bootstrap: Add support for powerpc64le-linux Chris Marusich
` (8 preceding siblings ...)
2021-03-16 6:45 ` [bug#47182] [PATCH 10/18] gnu: texlive-bin: Fix compilation on powerpc64le* Chris Marusich
@ 2021-03-16 6:45 ` Chris Marusich
2021-03-16 6:45 ` [bug#47182] [PATCH 12/18] gnu: libelf: Fix compilation for powerpc64le-linux Chris Marusich
` (7 subsequent siblings)
17 siblings, 0 replies; 33+ messages in thread
From: Chris Marusich @ 2021-03-16 6:45 UTC (permalink / raw)
To: 47182; +Cc: Leo Le Bouter, Chris Marusich
From: Leo Le Bouter <lle-bout@zaclys.net>
* gnu/packages/tex.scm (texlive-latex-base)[arguments]: LuaJIT is not ported to
powerpc64le* yet. Update replacement 'build phase to add "luajittex" within the
"disabled-formats" list on powerpc64le*.
Signed-off-by: Chris Marusich <cmmarusich@gmail.com>
---
gnu/packages/tex.scm | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 508537acdaf..86cb1ee4558 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -3,7 +3,7 @@
;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2016 Roel Janssen <roel@gnu.org>
-;;; Copyright © 2016, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2018, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 Federico Beffa <beffa@fbengineering.ch>
;;; Copyright © 2016 Thomas Danckaert <post@thomasdanckaert.be>
;;; Copyright © 2016, 2017, 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
@@ -2520,6 +2520,10 @@ formats.")
"eptex eptex" "ptex ptex" "pdfxmltex pdftex" "platex eptex"
"csplain pdftex" "mf mf-nowin" "mex pdftex" "pdfmex pdftex"
"luacsplain luatex"
+ ,@(if (string-prefix? "powerpc64le"
+ (or (%current-target-system)
+ (%current-system)))
+ '("luajittex") '())
"cont-en xetex" "cont-en pdftex" "pdfcsplain xetex"
"pdfcsplain pdftex" "pdfcsplain luatex" "cslatex pdftex"
"mptopdf pdftex" "uplatex euptex" "jadetex pdftex"
--
2.26.2
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [bug#47182] [PATCH 12/18] gnu: libelf: Fix compilation for powerpc64le-linux.
2021-03-16 6:44 ` [bug#47182] [PATCH 01/18] gnu: bootstrap: Add support for powerpc64le-linux Chris Marusich
` (9 preceding siblings ...)
2021-03-16 6:45 ` [bug#47182] [PATCH 11/18] gnu: texlive-latex-base: Fix compilation on powerpc64le* Chris Marusich
@ 2021-03-16 6:45 ` Chris Marusich
2021-03-16 6:45 ` [bug#47182] [PATCH 13/18] Add powerpc64le-linux as a supported Guix architecture Chris Marusich
` (6 subsequent siblings)
17 siblings, 0 replies; 33+ messages in thread
From: Chris Marusich @ 2021-03-16 6:45 UTC (permalink / raw)
To: 47182; +Cc: Leo Le Bouter, Chris Marusich
From: Leo Le Bouter <lle-bout@zaclys.net>
* gnu/packages/elf.scm (libelf)[arguments]: Modify replacement 'configure phase
to invoke "./configure" with "--host=powerpc64le-unknown-linux-gnu" on
powerpc64le-linux.
Signed-off-by: Chris Marusich <cmmarusich@gmail.com>
---
gnu/packages/elf.scm | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/gnu/packages/elf.scm b/gnu/packages/elf.scm
index 2e21cab48d1..aab912648b2 100644
--- a/gnu/packages/elf.scm
+++ b/gnu/packages/elf.scm
@@ -8,6 +8,7 @@
;;; Copyright © 2018, 2020 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2020 Mark Wielaard <mark@klomp.org>
;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
+;;; Copyright © 2021 Leo Le Bouter <lle-bout@zaclys.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -211,6 +212,10 @@ static analysis of the ELF binaries at hand.")
(setenv "CONFIG_SHELL" (which "bash"))
(invoke "./configure"
(string-append "--prefix=" out)
+ ,@(if (string=? "powerpc64le-linux"
+ (%current-system))
+ '("--host=powerpc64le-unknown-linux-gnu")
+ '())
,@(if (string=? "aarch64-linux"
(%current-system))
'("--host=aarch64-unknown-linux-gnu")
--
2.26.2
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [bug#47182] [PATCH 13/18] Add powerpc64le-linux as a supported Guix architecture.
2021-03-16 6:44 ` [bug#47182] [PATCH 01/18] gnu: bootstrap: Add support for powerpc64le-linux Chris Marusich
` (10 preceding siblings ...)
2021-03-16 6:45 ` [bug#47182] [PATCH 12/18] gnu: libelf: Fix compilation for powerpc64le-linux Chris Marusich
@ 2021-03-16 6:45 ` Chris Marusich
2021-03-16 6:45 ` [bug#47182] [PATCH 14/18] syscalls: Fix clone on powerpc64le-linux Chris Marusich
` (5 subsequent siblings)
17 siblings, 0 replies; 33+ messages in thread
From: Chris Marusich @ 2021-03-16 6:45 UTC (permalink / raw)
To: 47182; +Cc: Chris Marusich
This makes powerpc64le-linux a supported architecture for Guix, but not for
Guix System.
* Makefile.am (SUPPORTED_SYSTEMS): Add an entry for powerpc64le-linux.
* etc/guix-install.sh (chk_sys_arch): Same.
* guix/packages.scm (%supported-systems): Same.
* m4/guix.m4 (GUIX_ASSERT_SUPPORTED_SYSTEM): Same.
* tests/guix-build.sh (all_systems): Same.
---
Makefile.am | 4 +++-
etc/guix-install.sh | 4 ++++
guix/packages.scm | 4 +++-
m4/guix.m4 | 3 ++-
tests/guix-build.sh | 6 ++++--
5 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index f40d9509bee..1c2d45527c7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -14,6 +14,7 @@
# Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
# Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
# Copyright © 2019 Efraim Flashner <efraim@flashner.co.il>
+# Copyright © 2021 Chris Marusich <cmmarusich@gmail.com>
#
# This file is part of GNU Guix.
#
@@ -799,7 +800,8 @@ SOURCE_TARBALLS = \
$(foreach ext,tar.gz,$(PACKAGE_FULL_TARNAME).$(ext))
# Systems supported by Guix.
-SUPPORTED_SYSTEMS ?= x86_64-linux i686-linux armhf-linux aarch64-linux
+SUPPORTED_SYSTEMS ?= x86_64-linux i686-linux armhf-linux aarch64-linux \
+ powerpc64le-linux
# Guix binary tarballs.
BINARY_TARBALLS = \
diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index 94c04aa646a..c84e7b75779 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -8,6 +8,7 @@
# Copyright © 2020 Simon Tournier <zimon.toutoune@gmail.com>
# Copyright © 2020 Daniel Brooks <db48x@db48x.net>
# Copyright © 2021 Jakub Kądziołka <kuba@kadziolka.net>
+# Copyright © 2021 Chris Marusich <cmmarusich@gmail.com>
#
# This file is part of GNU Guix.
#
@@ -187,6 +188,9 @@ chk_sys_arch()
armv7l)
local arch=armhf
;;
+ ppc64le | powerpc64le)
+ local arch=powerpc64le
+ ;;
*)
_err "${ERR}Unsupported CPU type: ${arch}"
exit 1
diff --git a/guix/packages.scm b/guix/packages.scm
index a057a88c638..55e5e70b8c6 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -5,6 +5,7 @@
;;; Copyright © 2016 Alex Kost <alezost@gmail.com>
;;; Copyright © 2017, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2021 Chris Marusich <cmmarusich@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -345,7 +346,8 @@ name of its URI."
(define %supported-systems
;; This is the list of system types that are supported. By default, we
;; expect all packages to build successfully here.
- '("x86_64-linux" "i686-linux" "armhf-linux" "aarch64-linux" "mips64el-linux" "i586-gnu"))
+ '("x86_64-linux" "i686-linux" "armhf-linux" "aarch64-linux" "mips64el-linux" "i586-gnu"
+ "powerpc64le-linux"))
(define %hurd-systems
;; The GNU/Hurd systems for which support is being developed.
diff --git a/m4/guix.m4 b/m4/guix.m4
index c1ce0876fa0..f0d85a28d6d 100644
--- a/m4/guix.m4
+++ b/m4/guix.m4
@@ -2,6 +2,7 @@ dnl GNU Guix --- Functional package management for GNU
dnl Copyright © 2012, 2013, 2014, 2015, 2016, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
dnl Copyright © 2014 Mark H Weaver <mhw@netris.org>
dnl Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
+dnl Copyright © 2021 Chris Marusich <cmmarusich@gmail.com>
dnl
dnl This file is part of GNU Guix.
dnl
@@ -88,7 +89,7 @@ courageous and port the GNU System distribution to it (see
# Currently only Linux-based systems are supported, and only on some
# platforms.
case "$guix_system" in
- x86_64-linux|i686-linux|armhf-linux|aarch64-linux)
+ x86_64-linux|i686-linux|armhf-linux|aarch64-linux|powerpc64le-linux)
;;
*)
if test "x$guix_courageous" = "xyes"; then
diff --git a/tests/guix-build.sh b/tests/guix-build.sh
index b7602e668c4..e20702c521b 100644
--- a/tests/guix-build.sh
+++ b/tests/guix-build.sh
@@ -1,6 +1,7 @@
# GNU Guix --- Functional package management for GNU
# Copyright © 2012, 2013, 2014, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
# Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
+# Copyright © 2021 Chris Marusich <cmmarusich@gmail.com>
#
# This file is part of GNU Guix.
#
@@ -61,8 +62,9 @@ guix build -e '(@@ (gnu packages bootstrap) %bootstrap-guile)'
test `guix build sed -s x86_64-linux -d | wc -l` = 1
# Passing multiple '-s' flags.
-all_systems="-s x86_64-linux -s i686-linux -s armhf-linux -s aarch64-linux"
-test `guix build sed $all_systems -d | sort -u | wc -l` = 4
+all_systems="-s x86_64-linux -s i686-linux -s armhf-linux -s aarch64-linux \
+-s powerpc64le-linux"
+test `guix build sed $all_systems -d | sort -u | wc -l` = 5
# Check there's no weird memoization effect leading to erroneous results.
# See <https://bugs.gnu.org/40482>.
--
2.26.2
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [bug#47182] [PATCH 14/18] syscalls: Fix clone on powerpc64le-linux.
2021-03-16 6:44 ` [bug#47182] [PATCH 01/18] gnu: bootstrap: Add support for powerpc64le-linux Chris Marusich
` (11 preceding siblings ...)
2021-03-16 6:45 ` [bug#47182] [PATCH 13/18] Add powerpc64le-linux as a supported Guix architecture Chris Marusich
@ 2021-03-16 6:45 ` Chris Marusich
2021-03-16 6:45 ` [bug#47182] [PATCH 15/18] syscalls: Fix RNDADDTOENTCNT " Chris Marusich
` (4 subsequent siblings)
17 siblings, 0 replies; 33+ messages in thread
From: Chris Marusich @ 2021-03-16 6:45 UTC (permalink / raw)
To: 47182; +Cc: Chris Marusich
This makes the clone procedure work correctly and fixes some test failures on
powerpc64le-linux, including tests/containers.scm.
* guix/build/syscalls.scm (clone): Add an entry for ppc64le.
---
guix/build/syscalls.scm | 1 +
1 file changed, 1 insertion(+)
diff --git a/guix/build/syscalls.scm b/guix/build/syscalls.scm
index 4379768f5e3..a2c1d80fb1a 100644
--- a/guix/build/syscalls.scm
+++ b/guix/build/syscalls.scm
@@ -1021,6 +1021,7 @@ Turning finalization off shuts down the finalization thread as a side effect."
("mips64" 5055)
("armv7l" 120)
("aarch64" 220)
+ ("ppc64le" 120)
(_ #f))))
(lambda (flags)
"Create a new child process by duplicating the current parent process.
--
2.26.2
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [bug#47182] [PATCH 15/18] syscalls: Fix RNDADDTOENTCNT on powerpc64le-linux.
2021-03-16 6:44 ` [bug#47182] [PATCH 01/18] gnu: bootstrap: Add support for powerpc64le-linux Chris Marusich
` (12 preceding siblings ...)
2021-03-16 6:45 ` [bug#47182] [PATCH 14/18] syscalls: Fix clone on powerpc64le-linux Chris Marusich
@ 2021-03-16 6:45 ` Chris Marusich
2021-03-16 6:45 ` [bug#47182] [PATCH 16/18] ci: %cross-targets: Add powerpc64le-linux-gnu Chris Marusich
` (3 subsequent siblings)
17 siblings, 0 replies; 33+ messages in thread
From: Chris Marusich @ 2021-03-16 6:45 UTC (permalink / raw)
To: 47182; +Cc: Chris Marusich
This fixes the failing test add-to-entropy-count in tests/syscalls.scm on
powerpc64le-linux.
* guix/build/syscalls.scm (RNDADDTOENTCNT): When %host-type starts with
"powerpc64le", set this to #x80045201. Otherwise, set it to #x40045201 as
before.
---
guix/build/syscalls.scm | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/guix/build/syscalls.scm b/guix/build/syscalls.scm
index a2c1d80fb1a..8886fc0fb94 100644
--- a/guix/build/syscalls.scm
+++ b/guix/build/syscalls.scm
@@ -6,6 +6,7 @@
;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
;;; Copyright © 2020 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2021 Chris Marusich <cmmarusich@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -942,7 +943,11 @@ backend device."
;;;
;; From <uapi/linux/random.h>.
-(define RNDADDTOENTCNT #x40045201)
+(define RNDADDTOENTCNT
+ ;; Avoid using %current-system here to avoid depending on host-side code.
+ (if (string-prefix? "powerpc64le" %host-type)
+ #x80045201
+ #x40045201))
(define (add-to-entropy-count port-or-fd n)
"Add N to the kernel's entropy count (the value that can be read from
--
2.26.2
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [bug#47182] [PATCH 16/18] ci: %cross-targets: Add powerpc64le-linux-gnu.
2021-03-16 6:44 ` [bug#47182] [PATCH 01/18] gnu: bootstrap: Add support for powerpc64le-linux Chris Marusich
` (13 preceding siblings ...)
2021-03-16 6:45 ` [bug#47182] [PATCH 15/18] syscalls: Fix RNDADDTOENTCNT " Chris Marusich
@ 2021-03-16 6:45 ` Chris Marusich
2021-03-16 6:45 ` [bug#47182] [PATCH 17/18] utils: Fix target-64bit? on powerpc64le-linux Chris Marusich
` (2 subsequent siblings)
17 siblings, 0 replies; 33+ messages in thread
From: Chris Marusich @ 2021-03-16 6:45 UTC (permalink / raw)
To: 47182; +Cc: Chris Marusich
* gnu/ci.scm (%cross-targets): Add an entry for powerpc64le-linux-gnu.
---
gnu/ci.scm | 1 +
1 file changed, 1 insertion(+)
diff --git a/gnu/ci.scm b/gnu/ci.scm
index acd05a18b47..eb07e69a179 100644
--- a/gnu/ci.scm
+++ b/gnu/ci.scm
@@ -156,6 +156,7 @@ SYSTEM."
"arm-linux-gnueabihf"
"aarch64-linux-gnu"
"powerpc-linux-gnu"
+ "powerpc64le-linux-gnu"
"riscv64-linux-gnu"
"i586-pc-gnu" ;aka. GNU/Hurd
"i686-w64-mingw32"
--
2.26.2
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [bug#47182] [PATCH 17/18] utils: Fix target-64bit? on powerpc64le-linux.
2021-03-16 6:44 ` [bug#47182] [PATCH 01/18] gnu: bootstrap: Add support for powerpc64le-linux Chris Marusich
` (14 preceding siblings ...)
2021-03-16 6:45 ` [bug#47182] [PATCH 16/18] ci: %cross-targets: Add powerpc64le-linux-gnu Chris Marusich
@ 2021-03-16 6:45 ` Chris Marusich
2021-03-16 6:45 ` [bug#47182] [PATCH 18/18] gnu: sed: Make it build on SELinux-enabled kernels Chris Marusich
2021-03-16 8:30 ` [bug#47182] [PATCH 01/18] gnu: bootstrap: Add support for powerpc64le-linux Chris Marusich
17 siblings, 0 replies; 33+ messages in thread
From: Chris Marusich @ 2021-03-16 6:45 UTC (permalink / raw)
To: 47182; +Cc: Chris Marusich
* guix/utils.scm (target-64bit?): Change the string from "ppc64" to
"powerpc64", which matches Guix system names like "powerpc64le-linux".
---
guix/utils.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/guix/utils.scm b/guix/utils.scm
index fc57620319e..2dd1ddeb8a7 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -549,7 +549,7 @@ a character other than '@'."
(define* (target-64bit? #:optional (system (or (%current-target-system)
(%current-system))))
- (any (cut string-prefix? <> system) '("x86_64" "aarch64" "mips64" "ppc64")))
+ (any (cut string-prefix? <> system) '("x86_64" "aarch64" "mips64" "powerpc64")))
(define* (cc-for-target #:optional (target (%current-target-system)))
(if target
--
2.26.2
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [bug#47182] [PATCH 18/18] gnu: sed: Make it build on SELinux-enabled kernels.
2021-03-16 6:44 ` [bug#47182] [PATCH 01/18] gnu: bootstrap: Add support for powerpc64le-linux Chris Marusich
` (15 preceding siblings ...)
2021-03-16 6:45 ` [bug#47182] [PATCH 17/18] utils: Fix target-64bit? on powerpc64le-linux Chris Marusich
@ 2021-03-16 6:45 ` Chris Marusich
2021-03-16 8:30 ` [bug#47182] [PATCH 01/18] gnu: bootstrap: Add support for powerpc64le-linux Chris Marusich
17 siblings, 0 replies; 33+ messages in thread
From: Chris Marusich @ 2021-03-16 6:45 UTC (permalink / raw)
To: 47182; +Cc: Chris Marusich
Fixes: <https://bugs.gnu.org/41498>.
* gnu/packages/base.scm (sed)[arguments]: New field. This adds a
snippet, equivalent to the patch submitted upstream, which fixes an
issue that prevents sed from building on SELinux-enabled kernels.
Adjusted by Efraim Flashner to apply to master.
---
gnu/packages/base.scm | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 7c5ac61f01c..f0f93533986 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -148,6 +148,22 @@ including, for example, recursive directory searching.")
(base32
"0alqagh0nliymz23kfjg6g9w3cr086k0sfni56gi8fhzqwa3xksk"))))
(build-system gnu-build-system)
+ (arguments
+ ;; TODO: When merging this into core-updates, keep the version of
+ ;; this code (with comment!) applied as a snippet.
+ `(,@(if (string-prefix? "powerpc64le" (or (%current-target-system)
+ (%current-system)))
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'allow-building-on-selinux-systems
+ (lambda _
+ (substitute* "Makefile.in"
+ (("^ abs_srcdir='\\$\\(abs_srcdir\\)'.*" previous-line)
+ (string-append
+ previous-line
+ " CONFIG_HEADER='$(CONFIG_HEADER)'\t\t\\\n")))
+ #t))))
+ '())))
(synopsis "Stream editor")
(native-inputs
`(("perl" ,perl))) ;for tests
--
2.26.2
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [bug#47182] [PATCH 01/18] gnu: bootstrap: Add support for powerpc64le-linux.
2021-03-16 6:44 ` [bug#47182] [PATCH 01/18] gnu: bootstrap: Add support for powerpc64le-linux Chris Marusich
` (16 preceding siblings ...)
2021-03-16 6:45 ` [bug#47182] [PATCH 18/18] gnu: sed: Make it build on SELinux-enabled kernels Chris Marusich
@ 2021-03-16 8:30 ` Chris Marusich
17 siblings, 0 replies; 33+ messages in thread
From: Chris Marusich @ 2021-03-16 8:30 UTC (permalink / raw)
To: 47182
Chris Marusich <cmmarusich@gmail.com> writes:
> * gnu/packages/bootstrap.scm (%bootstrap-executables)
> (bootstrap-executable-file-name, bootstrap-guile-url-path)
> (bootstrap-guile-hash, %bootstrap-coreutils&co, %bootstrap-binutils)
> (%bootstrap-glibc, %bootstrap-gcc): Add entries for powerpc64le-linux.
> (%bootstrap-executable-base-urls): Add an entry for alpha.gnu.org.
Unfortunately, despite my prior claims to the contrary, this change
seems to trigger a rebuild of the hello package and the gcc-toolchain
package on x86_64-linux, which means it's going to trigger a full-world
rebuild, after all. You can see this yourself by running
"./pre-inst-env guix build -d hello gcc-toolchain" on master (on an
x86_64-linux machine), applying this patch, and then running the command
again - the derivations change.
Is there any way to avoid this? I will try to think of something, but
suggestions would be welcome in the meantime... We can't merge this
patch series until we fix this.
It also makes me want to double check the other patches to make sure
they don't accidentally rebuild stuff. I thought I verified that they
didn't, but now I'm not so sure.
--
Chris
^ permalink raw reply [flat|nested] 33+ messages in thread