[PATCH 0/9] Add 32-bit powerpc support

  • Done
  • quality assurance status badge
Details
5 participants
  • Chris Marusich
  • Efraim Flashner
  • Ludovic Courtès
  • Maxime Devos
  • Vincent Legoll
Owner
unassigned
Submitted by
Efraim Flashner
Severity
normal
E
E
Efraim Flashner wrote on 6 Apr 2021 14:24
(name . Efraim Flashner)(address . efraim@flashner.co.il)
cover.1617711307.git.efraim@flashner.co.il

The wip-ppc branch on Savannah is currently in a good state. With the
recent rapid churn on core-updates I haven't been very quick about
rebasing on core-updates but I can confirm that building out to mesa
works. Building is slow, it took 6 days to build from guile-final to
mesa without stopping.

The patches start with adding the bootstrap binaries for powerpc.

The next patch fixes guile-3.0.2+ on powerpc (and probably other 32-bit
big-endian systems) and is the result of almost 3 weeks of bisecting.

Next is a patch for binutils to disable one of the tests. The test is
new to core-updates, and fails on powerpc-linux but not the other
architectures we support.

The mesa patch works, but I have to see about enabling the tests. I have
also tested updating mesa and enabling the llvm backend on aarch64 and
the tests no longer fail there, so I'll do another couple (3 hour) mesa
builds to see if the comment needs adjusting or if the tests can be
enabled on powerpc-linux.

mac-fdisk I didn't have a solid reason to put in the wip-ppc branch but
there it is. I need to change CC=gcc to use cc-for-target.

The patch for american-fuzzy-lop I snuck into master

the qemu-command in gnu/build/vm shouldn't overlap with ppc64le.

the last two patches, disabling the tests for mercurial and nss, can
probably be dropped. The comments are accurate though, and we have done
similar in the past on mips64le and armhf.

Efraim Flashner (9):
gnu: bootstrap: Add support for powerpc-linux.
gnu: guile-3.0: Fix building on powerpc-linux.
gnu: binutils: Adjust test suite on powerpc-linux.
gnu: mesa: Add support for powerpc-linux.
gnu: Add mac-fdisk.
gnu: american-fuzzy-lop: Add support for powerpc-linux.
build: qemu-command: Add support for powerpc.
gnu: mercurial: Skip tests on powerpc-linux.
gnu: nss: Skip tests on powerpc-linux.

gnu/build/vm.scm | 1 +
gnu/local.mk | 2 +
gnu/packages/base.scm | 11 +-
gnu/packages/bootstrap.scm | 37 +-
gnu/packages/commencement.scm | 21 +-
gnu/packages/debug.scm | 2 +
gnu/packages/disk.scm | 44 +
gnu/packages/gl.scm | 18 +-
gnu/packages/guile.scm | 21 +-
gnu/packages/nss.scm | 7 +-
.../patches/mac-fdisk-gentoo-patchset.patch | 866 +++++++
gnu/packages/patches/mac-fdisk-p18.patch | 2070 +++++++++++++++++
gnu/packages/version-control.scm | 6 +-
guix/packages.scm | 4 +-
m4/guix.m4 | 4 +-
15 files changed, 3096 insertions(+), 18 deletions(-)
create mode 100644 gnu/packages/patches/mac-fdisk-gentoo-patchset.patch
create mode 100644 gnu/packages/patches/mac-fdisk-p18.patch


base-commit: f08b070019a3c1697bb0b4a783dcd4f31243715a
--
2.31.1
E
E
Efraim Flashner wrote on 6 Apr 2021 14:32
[PATCH 1/9] gnu: bootstrap: Add support for powerpc-linux.
(name . Efraim Flashner)(address . efraim@flashner.co.il)
e690c54ea603e68c01240e8155aa122e06f6ccd4.1617711307.git.efraim@flashner.co.il
On 923bb70a1bff657125c3008f119a477e5cb57c2b
gnu:glibc-for-bootstrap: Fix patch.

Run
./pre-inst-env guix build --target=powerpc-linux-gnu bootstrap-tarballs

Producing

/gnu/store/dyj1wvayyp1ihaknkxniz1xamcf4yrhl-bootstrap-tarballs-0

With guix hash -rx /gnu/store/dyj1wvayyp1ihaknkxniz1xamcf4yrhl-bootstrap-tarballs-0

02xx2ydj28pwv3vflqffinpq1icj09gzi9icm8j4bwc4lca9irxn

* gnu/packages/bootstrap.scm (%bootstrap-executables): Add entries for
powerpc-linux.
(%bootstrap-guile-hash, %bootstrap-coreutils&co, %bootstrap-binutils,
%bootstrap-glibc, %bootstrap-gcc): Add entry for powerpc-linux.
* gnu/packages.scm (%supported-systems): Add powerpc-linux.
(%hydra-supported-systems): Remove powerpc-linux.
* m4/guix.m4: Add powerpc-linux as a supported system.
---
gnu/packages/bootstrap.scm | 37 ++++++++++++++++++++++++++++++++++++-
guix/packages.scm | 4 ++--
m4/guix.m4 | 4 ++--
3 files changed, 40 insertions(+), 5 deletions(-)

Toggle diff (178 lines)
diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index c50e94e891..049735013a 100644
--- a/gnu/packages/bootstrap.scm
+++ b/gnu/packages/bootstrap.scm
@@ -89,6 +89,15 @@
,(base32 "1j51gv08sfg277yxj73xd564wjq3f8xwd6s9rbcg8v9gms47m4cx"))
("xz"
,(base32 "1d779rwsrasphg5g3r37qppcqy3p7ay1jb1y83w7x4i3qsc7zjy2")))
+ ("powerpc-linux"
+ ("bash"
+ ,(base32 "0hwlw5lcyjzadprf5fm0cv4zb6jw667g9amnmhq0lbixasy7j72j"))
+ ("mkdir"
+ ,(base32 "12lfwh5p8pp06250wgi9mdvjv1jdfpd5xpmvfc0616aj0xqh09hp"))
+ ("tar"
+ ,(base32 "00sbmwl8qh6alxv9mw4hvj1j4yipwmw5mrw6qad8bi2pr7ya5386"))
+ ("xz"
+ ,(base32 "0hi47y6zh5zz137i59l5ibw92x6g54zn7ris1b1ym9rvavsasg7b")))
("armhf-linux"
("bash"
,(base32 "0s6f1s26g4dsrrkl39zblvwpxmbzi6n9mgqf6vxsqz42gik6bgyn"))
@@ -139,6 +148,7 @@
;; This is where the bootstrap executables come from.
'("https://git.savannah.gnu.org/cgit/guix.git/plain/gnu/packages/bootstrap/"
"https://alpha.gnu.org/gnu/guix/bootstrap/"
+ "http://flashner.co.il/guix/bootstrap/"
"http://lilypond.org/janneke/guix/"))
(define (bootstrap-executable-file-name system program)
@@ -146,6 +156,7 @@
(match system
("powerpc64le-linux" (string-append system "/20210106/" program))
("i586-gnu" (string-append system "/20200326/" program))
+ ("powerpc-linux" (string-append system "/20200923/bin/" program))
(_ (string-append system "/" program
"?id=44f07d1dc6806e97c4e9ee3e6be883cc59dc666e"))))
@@ -341,6 +352,8 @@ or false to signal an error."
(match system
("aarch64-linux"
"/20170217/guile-2.0.14.tar.xz")
+ ("powerpc-linux"
+ "/20200923/guile-2.0.14.tar.xz")
("armhf-linux"
"/20150101/guile-2.0.11.tar.xz")
("i586-gnu"
@@ -366,7 +379,9 @@ or false to signal an error."
("aarch64-linux"
(base32 "1giy2aprjmn5fp9c4s9r125fljw4wv6ixy5739i5bffw4jgr0f9r"))
("i586-gnu"
- (base32 "0wgqpsmvg25rnqn49ap7kwd2qxccd8dr4lllzp7i3rjvgav27vac"))))
+ (base32 "0wgqpsmvg25rnqn49ap7kwd2qxccd8dr4lllzp7i3rjvgav27vac"))
+ ("powerpc-linux"
+ (base32 "1by2p7s27fbyjzfkcw8h65h4kkqh7d23kv4sgg5jppjn2qx7swq4"))))
(define (bootstrap-guile-origin system)
"Return an <origin> object for the Guile tarball of SYSTEM."
@@ -500,6 +515,8 @@ $out/bin/guile --version~%"
"/20210106/static-binaries-0-powerpc64le-linux-gnu.tar.xz")
("i586-gnu"
"/20200326/static-binaries-0-i586-pc-gnu.tar.xz")
+ ("powerpc-linux"
+ "/20200923/static-binaries.tar.xz")
(_
"/20131110/static-binaries.tar.xz")))
%bootstrap-base-urls))
@@ -523,6 +540,9 @@ $out/bin/guile --version~%"
("i586-gnu"
(base32
"17kllqnf3fg79gzy9ansgi801c46yh9c23h4d923plvb0nfm1cfn"))
+ ("powerpc-linux"
+ (base32
+ "0kspxy0yczan2vlih6aa9hailr2inz000fqa0gn5x9d1fxxa5y8m"))
("mips64el-linux"
(base32
"072y4wyfsj1bs80r6vbybbafy8ya4vfy7qj25dklwk97m6g71753"))))))
@@ -573,6 +593,8 @@ $out/bin/guile --version~%"
"/20210106/binutils-static-stripped-2.34-powerpc64le-linux-gnu.tar.xz")
("i586-gnu"
"/20200326/binutils-static-stripped-2.34-i586-pc-gnu.tar.xz")
+ ("powerpc-linux"
+ "/20200923/binutils-2.35.1.tar.xz")
(_
"/20131110/binutils-2.23.2.tar.xz")))
%bootstrap-base-urls))
@@ -596,6 +618,9 @@ $out/bin/guile --version~%"
("i586-gnu"
(base32
"11kykv1kmqc5wln57rs4klaqa13hm952smkc57qcsyss21kfjprs"))
+ ("powerpc-linux"
+ (base32
+ "0asbg1c4avkrvh057mx0942xwddd136jni382zqsxzn79ls42yq8"))
("mips64el-linux"
(base32
"1x8kkhcxmfyzg1ddpz2pxs6fbdl6412r7x0nzbmi5n7mj8zw2gy7"))))))
@@ -653,6 +678,8 @@ $out/bin/guile --version~%"
"/20210106/glibc-stripped-2.31-powerpc64le-linux-gnu.tar.xz")
("i586-gnu"
"/20200326/glibc-stripped-2.31-i586-pc-gnu.tar.xz")
+ ("powerpc-linux"
+ "/20200923/glibc-2.32.tar.xz")
(_
"/20131110/glibc-2.18.tar.xz")))
%bootstrap-base-urls))
@@ -676,6 +703,9 @@ $out/bin/guile --version~%"
("i586-gnu"
(base32
"14ddm10lpbas8bankmn5bcrlqvz1v5dnn1qjzxb19r57vd2w5952"))
+ ("powerpc-linux"
+ (base32
+ "0smmssyjrlk5cvx49586smmk81gkwff0i6r91n4rir4jm6ba25sb"))
("mips64el-linux"
(base32
"0k97a3whzx3apsi9n2cbsrr79ad6lh00klxph9hw4fqyp1abkdsg")))))))))
@@ -749,6 +779,8 @@ exec ~a/bin/.gcc-wrapped -B~a/lib \
"/20210106/gcc-stripped-5.5.0-powerpc64le-linux-gnu.tar.xz")
("i586-gnu"
"/20200326/gcc-stripped-5.5.0-i586-pc-gnu.tar.xz")
+ ("powerpc-linux"
+ "/20200923/gcc-5.5.0.tar.xz")
(_
"/20131110/gcc-4.8.2.tar.xz")))
%bootstrap-base-urls))
@@ -772,6 +804,9 @@ exec ~a/bin/.gcc-wrapped -B~a/lib \
("i586-gnu"
(base32
"1j2zc58wzil71a34h7c70sd68dmqvcscrw3rmn2whq79vd70zvv5"))
+ ("powerpc-linux"
+ (base32
+ "1p7df3yixhm87dw5sccc6yn1i9db1r9hnmsg87wq5xi4rfmirq7w"))
("mips64el-linux"
(base32
"1m5miqkyng45l745n0sfafdpjkqv9225xf44jqkygwsipj2cv9ks")))))))))
diff --git a/guix/packages.scm b/guix/packages.scm
index 56173e1204..e60201d8fc 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -350,7 +350,7 @@ name of its URI."
;; 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"
- "powerpc64le-linux"))
+ "powerpc64le-linux" "powerpc-linux"))
(define %hurd-systems
;; The GNU/Hurd systems for which support is being developed.
@@ -361,7 +361,7 @@ name of its URI."
;;
;; XXX: MIPS is unavailable in CI:
;; <https://lists.gnu.org/archive/html/guix-devel/2017-03/msg00790.html>.
- (fold delete %supported-systems '("mips64el-linux")))
+ (fold delete %supported-systems '("mips64el-linux" "powerpc-linux")))
;; A package.
diff --git a/m4/guix.m4 b/m4/guix.m4
index 05d409a674..e778a56004 100644
--- a/m4/guix.m4
+++ b/m4/guix.m4
@@ -1,7 +1,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 © 2017, 2020 Efraim Flashner <efraim@flashner.co.il>
dnl Copyright © 2021 Chris Marusich <cmmarusich@gmail.com>
dnl
dnl This file is part of GNU Guix.
@@ -89,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|powerpc64le-linux)
+ x86_64-linux|i686-linux|armhf-linux|aarch64-linux|powerpc64le-linux|powerpc-linux)
;;
*)
if test "x$guix_courageous" = "xyes"; then
--
2.31.1
E
E
Efraim Flashner wrote on 6 Apr 2021 14:32
[PATCH 2/9] gnu: guile-3.0: Fix building on powerpc-linux.
(name . Efraim Flashner)(address . efraim@flashner.co.il)
c11ad7faa3690b2dfef924a31137f6ced5aab23f.1617711307.git.efraim@flashner.co.il
* gnu/packages/guile.scm (guile-3.0)[arguments]: On powerpc add two
phases to adjust for 32-bit big-endian systems.
---
gnu/packages/guile.scm | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)

Toggle diff (34 lines)
diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm
index f63322794d..dca1b1c16f 100644
--- a/gnu/packages/guile.scm
+++ b/gnu/packages/guile.scm
@@ -305,7 +305,26 @@ without requiring the source code to be rewritten.")
(substitute-keyword-arguments (package-arguments guile-2.2)
((#:configure-flags flags ''())
`(cons "--disable-jit" ,flags)))
- (package-arguments guile-2.2)))
+ (if (string-prefix? "powerpc-" (%current-system))
+ (substitute-keyword-arguments (package-arguments guile-2.2)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'unpack 'adjust-bootstrap-flags
+ (lambda _
+ ;; Upstream not yet notified about suggested solution.
+ ;; See existing bug reports:
+ ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=45214
+ ;; https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=977223
+ (substitute* "bootstrap/Makefile.in"
+ (("^GUILE_OPTIMIZATIONS.*")
+ "GUILE_OPTIMIZATIONS = -O1 -Oresolve-primitives -Ocps\n"))
+ #t))
+ (add-after 'unpack 'remove-failing-tests
+ (lambda _
+ ;; TODO: Discover why this test fails on powerpc-linux
+ (delete-file "test-suite/standalone/test-out-of-memory")
+ #t)))))
+ (package-arguments guile-2.2))))
(native-search-paths
(list (search-path-specification
(variable "GUILE_LOAD_PATH")
--
2.31.1
E
E
Efraim Flashner wrote on 6 Apr 2021 14:32
[PATCH 3/9] gnu: binutils: Adjust test suite on powerpc-linux.
(name . Efraim Flashner)(address . efraim@flashner.co.il)
cff09d1a4d4201f5568bccfaad96fb624a1f4165.1617711307.git.efraim@flashner.co.il
* gnu/packages/base.scm (binutils)[arguments]: Add phase on
powerpc-linux to adjust the test suite.
* gnu/packages/commencement.scm (binutils-boot0)[arguments]: Move custom
phases after inherited arguments. Add phase on powerpc-linux to adjust
the test suite.
---
gnu/packages/base.scm | 11 ++++++++++-
gnu/packages/commencement.scm | 21 ++++++++++++++++-----
2 files changed, 26 insertions(+), 6 deletions(-)

Toggle diff (65 lines)
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index dbb7c619fe..b9fc0a6e29 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -531,7 +531,16 @@ change. GNU make offers many powerful extensions over the standard utility.")
;; Make sure 'ar' and 'ranlib' produce archives in a
;; deterministic fashion.
- "--enable-deterministic-archives")))
+ "--enable-deterministic-archives")
+ ,@(if (string=? (%current-system) "powerpc-linux")
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'disable-rust-libiberty-test
+ (lambda _
+ (substitute* "libiberty/testsuite/Makefile.in"
+ ((" check-rust-demangle ") ""))
+ #t))))
+ '())))
(synopsis "Binary utilities: bfd gas gprof ld")
(description
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 7c39a84008..f707a01d30 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -2653,7 +2653,22 @@ exec " gcc "/bin/" program
#:modules ((guix build gnu-build-system)
(guix build utils)
(ice-9 ftw)) ; for 'scandir'
+
+ ;; #:phases gets modified for powerpc-linux in binutils,
+ ;; so #:phases here needs to be after the inherited one.
+ ,@(substitute-keyword-arguments (package-arguments binutils)
+ ((#:configure-flags cf)
+ `(cons ,(string-append "--target=" (boot-triplet))
+ ,cf)))
+
#:phases (modify-phases %standard-phases
+ ,@(if (string=? (%current-system) "powerpc-linux")
+ '((add-after 'unpack 'disable-rust-libiberty-test
+ (lambda _
+ (substitute* "libiberty/testsuite/Makefile.in"
+ ((" check-rust-demangle ") ""))
+ #t)))
+ '())
(add-after 'install 'add-symlinks
(lambda* (#:key outputs #:allow-other-keys)
;; The cross-gcc invokes 'as', 'ld', etc, without the
@@ -2667,12 +2682,8 @@ exec " gcc "/bin/" program
(with-directory-excursion (string-append out "/bin")
(for-each (lambda (name)
(symlink name (remove-triplet-prefix name)))
- (scandir "." has-triplet-prefix?)))))))
+ (scandir "." has-triplet-prefix?)))))))))
- ,@(substitute-keyword-arguments (package-arguments binutils)
- ((#:configure-flags cf)
- `(cons ,(string-append "--target=" (boot-triplet))
- ,cf)))))
(inputs (%boot0-inputs))))
(define libstdc++-boot0
--
2.31.1
E
E
Efraim Flashner wrote on 6 Apr 2021 14:32
[PATCH 4/9] gnu: mesa: Add support for powerpc-linux.
(name . Efraim Flashner)(address . efraim@flashner.co.il)
3a5dddb867370ce5f91fa7e1b5051f2bba5fcec5.1617711307.git.efraim@flashner.co.il
* gnu/packages/gl.scm (mesa)[inputs]: Add llvm, glslang for powerpc.
[arguments]: Customize the configure flags for powerpc. Skip tests on
powerpc.
---
gnu/packages/gl.scm | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)

Toggle diff (71 lines)
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index ee29a79366..3b6a829031 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -271,7 +271,7 @@ also known as DXTn or DXTC) for Mesa.")
("libxrandr" ,libxrandr)
("libxvmc" ,libxvmc)
,@(match (%current-system)
- ((or "x86_64-linux" "i686-linux")
+ ((or "x86_64-linux" "i686-linux" "powerpc-linux")
;; Note: update the 'clang' input of mesa-opencl when bumping this.
`(("llvm" ,llvm-11)))
(_
@@ -283,7 +283,7 @@ also known as DXTn or DXTC) for Mesa.")
("flex" ,flex)
("gettext" ,gettext-minimal)
,@(match (%current-system)
- ((or "x86_64-linux" "i686-linux")
+ ((or "x86_64-linux" "i686-linux" "powerpc-linux")
`(("glslang" ,glslang)))
(_
`()))
@@ -298,6 +298,8 @@ also known as DXTn or DXTC) for Mesa.")
((or "armhf-linux" "aarch64-linux")
;; TODO: Fix svga driver for aarch64 and armhf.
'("-Dgallium-drivers=etnaviv,freedreno,kmsro,lima,nouveau,panfrost,r300,r600,swrast,tegra,v3d,vc4,virgl"))
+ ("powerpc-linux"
+ '("-Dgallium-drivers=nouveau,r300,r600,radeonsi,swrast,virgl"))
(_
'("-Dgallium-drivers=iris,nouveau,r300,r600,radeonsi,svga,swrast,virgl")))
;; Enable various optional features. TODO: opencl requires libclc,
@@ -318,12 +320,14 @@ also known as DXTn or DXTC) for Mesa.")
,@(match (%current-system)
((or "i686-linux" "x86_64-linux")
'("-Dvulkan-drivers=intel,amd"))
+ ("powerpc-linux" ; No default on this platform.
+ '("-Dvulkan-drivers=amd"))
(_
'("-Dvulkan-drivers=auto")))
;; Enable the Vulkan overlay layer on i686-linux and x86-64-linux.
,@(match (%current-system)
- ((or "x86_64-linux" "i686-linux")
+ ((or "x86_64-linux" "i686-linux" "powerpc-linux")
'("-Dvulkan-overlay-layer=true"))
(_
'()))
@@ -337,6 +341,9 @@ also known as DXTn or DXTC) for Mesa.")
((or "x86_64-linux" "i686-linux")
'("-Ddri-drivers=i915,i965,nouveau,r200,r100"
"-Dllvm=enabled")) ; default is x86/x86_64 only
+ ("powerpc-linux"
+ '("-Ddri-drivers=nouveau,r200,r100"
+ "-Dllvm=enabled"))
(_
'("-Ddri-drivers=nouveau,r200,r100"))))
@@ -344,6 +351,11 @@ also known as DXTn or DXTC) for Mesa.")
;; documentation recommends using 'release' for performance anyway.
#:build-type "release"
+ ;; The llvm-based tests are flakey on non-Intel hardware.
+ #:tests? ,(if (string=? "powerpc-linux" (or (%current-system)
+ (%current-target-system)))
+ '#f '#t)
+
#:modules ((ice-9 match)
(srfi srfi-1)
(guix build utils)
--
2.31.1
E
E
Efraim Flashner wrote on 6 Apr 2021 14:32
[PATCH 5/9] gnu: Add mac-fdisk.
(name . Efraim Flashner)(address . efraim@flashner.co.il)
704d44c4cb94b28a4a6d832296a602eb6ad4e711.1617711307.git.efraim@flashner.co.il
* gnu/packages/disk.scm (mac-fdisk): New variable.
* gnu/packages/patches/mac-fdisk-gentoo-patchset.patch,
gnu/packages/patches/mac-fdisk-p18.patch: New files.
* gnu/local.mk (dist_patch_DATA): Register them.
---
gnu/local.mk | 2 +
gnu/packages/disk.scm | 44 +
.../patches/mac-fdisk-gentoo-patchset.patch | 866 +++++++
gnu/packages/patches/mac-fdisk-p18.patch | 2070 +++++++++++++++++
4 files changed, 2982 insertions(+)
create mode 100644 gnu/packages/patches/mac-fdisk-gentoo-patchset.patch
create mode 100644 gnu/packages/patches/mac-fdisk-p18.patch

Toggle diff (581 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index ce0a79fb4d..4545cd0a7f 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1374,6 +1374,8 @@ dist_patch_DATA = \
%D%/packages/patches/luit-posix.patch \
%D%/packages/patches/lvm2-static-link.patch \
%D%/packages/patches/mailutils-fix-uninitialized-variable.patch \
+ %D%/packages/patches/mac-fdisk-gentoo-patchset.patch \
+ %D%/packages/patches/mac-fdisk-p18.patch \
%D%/packages/patches/make-impure-dirs.patch \
%D%/packages/patches/mars-install.patch \
%D%/packages/patches/mars-sfml-2.3.patch \
diff --git a/gnu/packages/disk.scm b/gnu/packages/disk.scm
index ed112f2ec2..ce49f493ea 100644
--- a/gnu/packages/disk.scm
+++ b/gnu/packages/disk.scm
@@ -302,6 +302,50 @@ fdisk. fdisk is used for the creation and manipulation of disk partition
tables, and it understands a variety of different formats.")
(license license:gpl3+)))
+(define-public mac-fdisk
+ (package
+ (name "mac-fdisk")
+ (version "0.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "mirror://debian/pool/main/m/mac-fdisk/"
+ "mac-fdisk_" version ".orig.tar.gz"))
+ (sha256
+ (base32 "0rkaqp82l47pg0ymqys07mljf3widv2yk4hhgs2yz8hwli5zqnbh"))
+ (patches (search-patches "mac-fdisk-p18.patch"
+ "mac-fdisk-gentoo-patchset.patch"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (delete 'configure) ; no configure script.
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (sbin (string-append out "/sbin"))
+ (man8 (string-append out "/share/man/man8")))
+ (mkdir-p sbin)
+ (mkdir-p man8)
+ (copy-file "fdisk" (string-append sbin "/mac-fdisk"))
+ (copy-file "pdisk" (string-append sbin "/pmac-fdisk"))
+ (copy-file "mac-fdisk.8.in" (string-append man8 "/mac-fdisk.8"))
+ (copy-file "pmac-fdisk.8.in" (string-append man8 "/pmac-fdisk.8"))
+ #t))))
+ #:make-flags (list "CC=gcc")
+ #:tests? #f)) ; no tests
+ (home-page "https://tracker.debian.org/pkg/mac-fdisk")
+ (synopsis "Apple disk partition manipulation tool")
+ (description "The @code{fdisk} utilities from the MkLinux project, adopted
+for Linux/m68k. @code{mac-fdisk} allows you to create and edit the partition
+table of a disk. It supports only the Apple partition format used on Macintosh
+and PowerMac, use @code{pmac-fdisk} for PC partition format disks as used on
+PowerPC machines. @code{mac-fdisk} is an interactive tool with a menu similar
+to PC @code{fdisk}, supported options are somewhat different from PC
+@code{fdisk} due to the differences in partition format.")
+ (supported-systems '("powerpc-linux" "i686-linux" "x86_64-linux"))
+ (license license:gpl2)))
+
(define-public gptfdisk
(package
(name "gptfdisk")
diff --git a/gnu/packages/patches/mac-fdisk-gentoo-patchset.patch b/gnu/packages/patches/mac-fdisk-gentoo-patchset.patch
new file mode 100644
index 0000000000..b1bd38f671
--- /dev/null
+++ b/gnu/packages/patches/mac-fdisk-gentoo-patchset.patch
@@ -0,0 +1,866 @@
+https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-fs/mac-fdisk/files
+
+---
+ bitfield.c | 16 +++++-----
+ bitfield.h | 4 +--
+ dump.c | 42 ++++++++++++--------------
+ errors.c | 11 ++++---
+ fdisk.c | 68 ++++++++++++++++++++++++++++++++++++++----
+ fdisk.h | 5 ++++
+ fdisklabel.c | 79 +++++++++++++++++++++++++++----------------------
+ fdisklabel.h | 2 +-
+ io.c | 8 +++--
+ kernel-defs.h | 6 ++++
+ partition_map.c | 43 ++++++++++++++++-----------
+ pdisk.c | 7 ++---
+ 12 files changed, 186 insertions(+), 105 deletions(-)
+
+diff --git a/bitfield.c b/bitfield.c
+index 687e8bd..02e7f68 100644
+--- a/bitfield.c
++++ b/bitfield.c
+@@ -67,13 +67,12 @@ const unsigned long masks[] = {
+ //
+ // Routines
+ //
+-unsigned long
+-bitfield_set(unsigned long *bf, int base, int length, unsigned long value)
++unsigned int
++bitfield_set(unsigned int *bf, int base, int length, unsigned int value)
+ {
+- unsigned long t;
+- unsigned long m;
++ unsigned int t;
++ unsigned int m;
+ int s;
+- int i;
+
+ // compute shift & mask, coerce value to correct number of bits,
+ // zap the old bits and stuff the new value
+@@ -86,12 +85,11 @@ bitfield_set(unsigned long *bf, int base, int length, unsigned long value)
+ }
+
+
+-unsigned long
+-bitfield_get(unsigned long bf, int base, int length)
++unsigned int
++bitfield_get(unsigned int bf, int base, int length)
+ {
+- unsigned long m;
++ unsigned int m;
+ int s;
+- int i;
+
+ // compute shift & mask
+ // return the correct number of bits (shifted to low end)
+diff --git a/bitfield.h b/bitfield.h
+index ff56759..abfdf05 100644
+--- a/bitfield.h
++++ b/bitfield.h
+@@ -63,5 +63,5 @@
+ //
+ // Forward declarations
+ //
+-unsigned long bitfield_set(unsigned long *bf, int base, int length, unsigned long value);
+-unsigned long bitfield_get(unsigned long bf, int base, int length);
++unsigned int bitfield_set(unsigned int *bf, int base, int length, unsigned int value);
++unsigned int bitfield_get(unsigned int bf, int base, int length);
+diff --git a/dump.c b/dump.c
+index 4153dc5..edeeb31 100644
+--- a/dump.c
++++ b/dump.c
+@@ -30,10 +30,8 @@
+ */
+
+ #include <stdio.h>
+-#ifndef __linux__
+ #include <stdlib.h>
+ #include <unistd.h>
+-#endif
+ #include <string.h>
+ #include <errno.h>
+ #include <fcntl.h>
+@@ -63,16 +61,16 @@ typedef struct names {
+ // Global Constants
+ //
+ NAMES plist[] = {
+- "Drvr", "Apple_Driver",
+- "Dr43", "Apple_Driver43",
+- "Free", "Apple_Free",
+- " HFS", "Apple_HFS",
+- " MFS", "Apple_MFS",
+- "PDOS", "Apple_PRODOS",
+- "junk", "Apple_Scratch",
+- "unix", "Apple_UNIX_SVR2",
+- " map", "Apple_partition_map",
+- 0, 0
++ {"Drvr"}, {"Apple_Driver"},
++ {"Dr43"}, {"Apple_Driver43"},
++ {"Free"}, {"Apple_Free"},
++ {" HFS"}, {"Apple_HFS"},
++ {" MFS"}, {"Apple_MFS"},
++ {"PDOS"}, {"Apple_PRODOS"},
++ {"junk"}, {"Apple_Scratch"},
++ {"unix"}, {"Apple_UNIX_SVR2"},
++ {" map"}, {"Apple_partition_map"},
++ {0}, {0}
+ };
+
+ const char * kStringEmpty = "";
+@@ -164,10 +162,10 @@ dump_partition_map(partition_map_header *map, int disk_order)
+ }
+ #ifdef __mc68000__
+ printf("%*s type name "
+- "%*s %-*s ( size ) system\n", strlen(map->name)+1, "#", j, "length", j, "base");
++ "%*s %-*s ( size ) system\n", (int)strlen(map->name)+1, "#", j, "length", j, "base");
+ #else
+ printf("%*s type name "
+- "%*s %-*s ( size ) system\n", strlen(map->name)+1, "#", j, "length", j, "base");
++ "%*s %-*s ( size ) system\n", (int)strlen(map->name)+1, "#", j, "length", j, "base");
+ #endif
+
+ /* Grok devfs names. (courtesy Colin Walters)*/
+@@ -201,7 +199,6 @@ dump_partition_entry(partition_map *entry, int digits, char *dev)
+ partition_map_header *map;
+ int j;
+ DPME *p;
+- BZB *bp;
+ char *s;
+ #ifdef __mc68000__
+ int aflag = 1;
+@@ -224,13 +221,13 @@ dump_partition_entry(partition_map *entry, int digits, char *dev)
+ }
+ }
+ #ifdef __mc68000__
+- printf("%s%-2d %.4s %-12.12s ", dev, entry->disk_address, s, p->dpme_name);
++ printf("%s%-2d %.4s %-12.12s ", dev, (int)entry->disk_address, s, p->dpme_name);
+ #else
+- printf("%s%-4d %.4s %-18.32s ", dev, entry->disk_address, s, p->dpme_name);
++ printf("%s%-4d %.4s %-18.32s ", dev, (int)entry->disk_address, s, p->dpme_name);
+ #endif
+ } else {
+ printf("%s%-4d %20.32s %-18.32s ", dev,
+- entry->disk_address, p->dpme_type, p->dpme_name);
++ (int)entry->disk_address, p->dpme_type, p->dpme_name);
+ }
+
+ if (pflag) {
+@@ -314,7 +311,6 @@ list_all_disks()
+ int i;
+ int fd;
+ DPME * data;
+- long t;
+
+ data = (DPME *) malloc(PBLOCK_SIZE);
+ if (data == NULL) {
+@@ -382,7 +378,7 @@ show_data_structures(partition_map_header *map)
+ printf("Header:\n");
+ printf("fd=%d (%s)\n", map->fd, (map->regular_file)?"file":"device");
+ printf("map %d blocks out of %d, media %u blocks\n",
+- map->blocks_in_map, map->maximum_in_map, map->media_size);
++ map->blocks_in_map, map->maximum_in_map, (unsigned int)map->media_size);
+ printf("Map is%s writeable", (map->writeable)?kStringEmpty:kStringNot);
+ printf(", but%s changed\n", (map->changed)?kStringEmpty:kStringNot);
+ printf("\n");
+@@ -426,7 +422,7 @@ u32 dpme_reserved_3[62] ;
+ for (entry = map->disk_order; entry != NULL; entry = entry->next_on_disk) {
+ p = entry->data;
+ printf("%2d: %20.32s ",
+- entry->disk_address, p->dpme_type);
++ (int)entry->disk_address, p->dpme_type);
+ printf("%7u @ %-7u ", p->dpme_pblocks, p->dpme_pblock_start);
+ printf("%c%c%c%c%c%c%c%c%c%c ",
+ (dpme_valid_get(p))?'V':'v',
+@@ -449,7 +445,7 @@ u32 dpme_reserved_3[62] ;
+ "goto_address checksum processor\n");
+ for (entry = map->disk_order; entry != NULL; entry = entry->next_on_disk) {
+ p = entry->data;
+- printf("%2d: ", entry->disk_address);
++ printf("%2d: ", (int)entry->disk_address);
+ printf("%7u ", p->dpme_boot_block);
+ printf("%7u ", p->dpme_boot_bytes);
+ printf("%8x ", p->dpme_load_addr);
+@@ -466,7 +462,7 @@ xx: cccc RU *dd s...
+ */
+ for (entry = map->disk_order; entry != NULL; entry = entry->next_on_disk) {
+ p = entry->data;
+- printf("%2d: ", entry->disk_address);
++ printf("%2d: ", (int)entry->disk_address);
+
+ bp = (BZB *) (p->dpme_bzb);
+ j = -1;
+diff --git a/errors.c b/errors.c
+index 47c9c30..4e9e486 100644
+--- a/errors.c
++++ b/errors.c
+@@ -26,12 +26,11 @@
+ */
+
+ #include <stdio.h>
+-#ifndef __linux__
+ #include <stdlib.h>
+-#endif
+ #include <string.h>
+ #include <stdarg.h>
+
++#include <errno.h>
+ #include "errors.h"
+ #include "pdisk.h"
+
+@@ -115,8 +114,8 @@ fatal(int value, char *fmt, ...)
+ va_end(ap);
+
+ #ifdef __linux__
+- if (value > 0 && value < sys_nerr) {
+- fprintf(stderr, " (%s)\n", sys_errlist[value]);
++ if (value > 0 && value < errno) {
++ fprintf(stderr, " (%s)\n", strerror(value));
+ } else {
+ fprintf(stderr, "\n");
+ }
+@@ -144,8 +143,8 @@ error(int value, char *fmt, ...)
+ va_end(ap);
+
+ #ifdef __linux__
+- if (value > 0 && value < sys_nerr) {
+- fprintf(stderr, " (%s)\n", sys_errlist[value]);
++ if (value > 0 && value < errno) {
++ fprintf(stderr, " (%s)\n", strerror(value));
+ } else {
+ fprintf(stderr, "\n");
+ }
+diff --git a/fdisk.c b/fdisk.c
+index d77619b..dec19ae 100644
+--- a/fdisk.c
++++ b/fdisk.c
+@@ -59,9 +59,14 @@
+ */
+
+
++#ifndef _LARGEFILE64_SOURCE
++#define _LARGEFILE64_SOURCE
++#endif
++#include <sys/types.h>
+ #include <unistd.h>
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
+ #include <fcntl.h>
+ #include <ctype.h>
+ #include <setjmp.h>
+@@ -70,12 +75,65 @@
+
+ #include <sys/ioctl.h>
+
+-typedef unsigned short kdev_t; /* BAD hack; kdev_t is not exported */
+-
+ #include "kernel-defs.h"
+
+ #include "fdisk.h"
+
++/* ----------- */
++#define _PPC64_TYPES_H
++#define BITS_PER_LONG 64
++
++typedef __signed__ char __s8;
++typedef signed char s8;
++typedef unsigned char u8;
++typedef unsigned char __u8;
++
++typedef __signed__ short __s16;
++typedef signed short s16;
++/*typedef unsigned short __u16;*/
++typedef unsigned short u16;
++
++typedef __signed__ int __s32;
++typedef signed int s32;
++/*typedef unsigned int __u32;*/
++typedef unsigned int u32;
++
++typedef __signed__ long __s64;
++typedef signed long s64;
++typedef unsigned long __u64;
++typedef unsigned long u64;
++
++typedef struct {
++ __u32 u[4];
++} __attribute((aligned(16))) __vector128;
++
++typedef __vector128 vector128;
++
++typedef u32 dma_addr_t;
++typedef u64 dma64_addr_t;
++
++typedef struct {
++ unsigned long entry;
++ unsigned long toc;
++ unsigned long env;
++} func_descr_t;
++
++typedef unsigned int umode_t;
++
++#define BITS_TO_LONGS(bits) \
++ (((bits)+BITS_PER_LONG-1)/BITS_PER_LONG)
++#define DECLARE_BITMAP(name,bits) \
++ unsigned long name[BITS_TO_LONGS(bits)]
++#define CLEAR_BITMAP(name,bits) \
++ memset(name, 0, BITS_TO_LONGS(bits)*sizeof(unsigned long))
++
++/* hd/ide ctl's that pass (arg) ptrs to user space are numbered 0x030n/0x031n */
++#define HDIO_GETGEO 0x0301 /* get device geometry */
++
++#define BLKRRPART _IO(0x12,95) /* re-read partition table */
++
++/* ---------- */
++
+ #define hex_val(c) ({ \
+ char _c = (c); \
+ isdigit(_c) ? _c - '0' : \
+@@ -192,10 +250,10 @@ char read_char(char *mesg);
+
+ jmp_buf listingbuf;
+
+-inline unsigned short __swap16(unsigned short x) {
++static inline unsigned short __swap16(unsigned short x) {
+ return (((__u16)(x) & 0xFF) << 8) | (((__u16)(x) & 0xFF00) >> 8);
+ }
+-inline __u32 __swap32(__u32 x) {
++static inline __u32 __swap32(__u32 x) {
+ return (((__u32)(x) & 0xFF) << 24) | (((__u32)(x) & 0xFF00) << 8) | (((__u32)(x) & 0xFF0000) >> 8) | (((__u32)(x) & 0xFF000000) >> 24);
+ }
+
+@@ -1415,7 +1473,7 @@ void try(char *device)
+ }
+ }
+
+-void main(int argc, char **argv)
++int main(int argc, char **argv)
+ {
+ if (argc > 3)
+ fatal(usage);
+diff --git a/fdisk.h b/fdisk.h
+index 2b6ddc8..0a0566d 100644
+--- a/fdisk.h
++++ b/fdisk.h
+@@ -2,6 +2,11 @@
+ fdisk.h
+ */
+
++#ifdef __linux__
++#define _FILE_OFFSET_BITS 64
++#define _LARGE_FILES
++#endif
++
+ #define SECTOR_SIZE 512
+ #define NETBSD_PARTITION 0xa5
+ #define cround(n) (((n) + display_factor * unit_flag) / display_factor)
+diff --git a/fdisklabel.c b/fdisklabel.c
+index 70c3cfa..7622bc2 100644
+--- a/fdisklabel.c
++++ b/fdisklabel.c
+@@ -35,9 +35,14 @@
+ SUCH DAMAGE.
+ */
+
++#ifndef _LARGEFILE64_SOURCE
++#define _LARGEFILE64_SOURCE
++#endif
++#include <sys/types.h>
+ #include <unistd.h>
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
+ #include <fcntl.h>
+ #include <ctype.h>
+ #include <setjmp.h>
+@@ -46,6 +51,8 @@
+ #include <sys/ioctl.h>
+ #include <sys/param.h>
+
++#include <asm/types.h>
++
+ #include "kernel-defs.h"
+
+ #include "fdisk.h"
+@@ -68,7 +75,7 @@ static int bsd_initlabel (struct partition *p, struct disklabel *d, int pindex)
+ static int bsd_readlabel (struct partition *p, struct disklabel *d);
+ static int bsd_writelabel (struct partition *p, struct disklabel *d);
+ static void sync_disks (void);
+-#if defined (i386)
++#if defined (i386) || defined (__amd64)
+ static int bsd_translate_fstype (int linux_type);
+ static void bsd_link_part (void);
+ #endif
+@@ -78,7 +85,7 @@ void alpha_bootblock_checksum (char *boot);
+
+ static struct disklabel bsd_dlabel;
+ static char buffer[BSD_BBSIZE];
+-#if defined (i386)
++#if defined (i386) || defined (__amd64)
+ static struct partition *bsd_part;
+ static int bsd_part_index;
+ #endif
+@@ -95,13 +102,13 @@ bmenu (void)
+ " n add a new BSD partition\n"
+ " p print BSD partition table\n"
+ " q quit without saving changes\n"
+-#if defined (i386)
++#if defined (i386) || defined (__amd64)
+ " r return to main menu\n"
+ #endif
+ " s show complete disklabel\n"
+ " t change a partition's filesystem id\n"
+ " w write disklabel to disk\n"
+-#if defined (i386)
++#if defined (i386) || defined (__amd64)
+ " x link BSD partition to non-BSD partition"
+ #endif
+ );
+@@ -110,7 +117,7 @@ bmenu (void)
+ void
+ bselect (void)
+ {
+-#if defined (i386)
++#if defined (i386) || defined (__amd64)
+ int t;
+
+ for (t=0; t<4; t++)
+@@ -181,7 +188,7 @@ bselect (void)
+ case 'w':
+ bsd_write_disklabel ();
+ break;
+-#if defined (i386)
++#if defined (i386) || defined (__amd64)
+ case 'r':
+ return;
+ case 'x':
+@@ -219,7 +226,7 @@ bsd_new_part (void)
+ if (!bsd_check_new_partition (&i))
+ return;
+
+-#if defined (i386)
++#if defined (i386) || defined (__amd64)
+ begin = bsd_part -> start_sect;
+ end = begin + bsd_part -> nr_sects - 1;
+ #elif defined (__alpha__) || defined (__powerpc__)
+@@ -253,7 +260,7 @@ bsd_print_disklabel (int show_all)
+
+ if (show_all)
+ {
+-#if defined (i386)
++#if defined (i386) || defined (__amd64)
+ fprintf(f, "# %s%d:\n", disk_device, bsd_part_index+1);
+ #elif defined (__alpha__) || defined (__powerpc__)
+ fprintf(f, "# %s:\n", disk_device);
+@@ -262,8 +269,8 @@ bsd_print_disklabel (int show_all)
+ fprintf(f, "type: %s\n", bsd_dktypenames[lp->d_type]);
+ else
+ fprintf(f, "type: %d\n", lp->d_type);
+- fprintf(f, "disk: %.*s\n", sizeof(lp->d_typename), lp->d_typename);
+- fprintf(f, "label: %.*s\n", sizeof(lp->d_packname), lp->d_packname);
++ fprintf(f, "disk: %.*s\n", (int)sizeof(lp->d_typename), lp->d_typename);
++ fprintf(f, "label: %.*s\n", (int)sizeof(lp->d_packname), lp->d_packname);
+ fprintf(f, "flags:");
+ if (lp->d_flags & BSD_D_REMOVABLE)
+ fprintf(f, " removable");
+@@ -272,17 +279,17 @@ bsd_print_disklabel (int show_all)
+ if (lp->d_flags & BSD_D_BADSECT)
+ fprintf(f, " badsect");
+ fprintf(f, "\n");
+- fprintf(f, "bytes/sector: %d\n", lp->d_secsize);
+- fprintf(f, "sectors/track: %d\n", lp->d_nsectors);
+- fprintf(f, "tracks/cylinder: %d\n", lp->d_ntracks);
+- fprintf(f, "sectors/cylinder: %d\n", lp->d_secpercyl);
+- fprintf(f, "cylinders: %d\n", lp->d_ncylinders);
++ fprintf(f, "bytes/sector: %d\n", (int)lp->d_secsize);
++ fprintf(f, "sectors/track: %d\n", (int)lp->d_nsectors);
++ fprintf(f, "tracks/cylinder: %d\n", (int)lp->d_ntracks);
++ fprintf(f, "sectors/cylinder: %d\n", (int)lp->d_secpercyl);
++ fprintf(f, "cylinders: %d\n", (int)lp->d_ncylinders);
+ fprintf(f, "rpm: %d\n", lp->d_rpm);
+ fprintf(f, "interleave: %d\n", lp->d_interleave);
+ fprintf(f, "trackskew: %d\n", lp->d_trackskew);
+ fprintf(f, "cylinderskew: %d\n", lp->d_cylskew);
+- fprintf(f, "headswitch: %d\t\t# milliseconds\n", lp->d_headswitch);
+- fprintf(f, "track-to-track seek: %d\t# milliseconds\n", lp->d_trkseek);
++ fprintf(f, "headswitch: %d\t\t# milliseconds\n", (int)lp->d_headswitch);
++ fprintf(f, "track-to-track seek: %d\t# milliseconds\n", (int)lp->d_trkseek);
+ fprintf(f, "drivedata: ");
+ for (i = NDDATA - 1; i >= 0; i--)
+ if (lp->d_drivedata[i])
+@@ -290,7 +297,7 @@ bsd_print_disklabel (int show_all)
+ if (i < 0)
+ i = 0;
+ for (j = 0; j <= i; j++)
+- fprintf(f, "%d ", lp->d_drivedata[j]);
++ fprintf(f, "%d ", (int)lp->d_drivedata[j]);
+ }
+ fprintf (f, "\n%d partitions:\n", lp->d_npartitions);
+ fprintf (f, "# size offset fstype [fsize bsize cpg]\n");
+@@ -298,7 +305,7 @@ bsd_print_disklabel (int show_all)
+ for (i = 0; i < lp->d_npartitions; i++, pp++) {
+ if (pp->p_size) {
+ fprintf(f, " %c: %8d %8d ", 'a' + i,
+- pp->p_size, pp->p_offset);
++ (int)pp->p_size, (int)pp->p_offset);
+ if ((unsigned) pp->p_fstype < BSD_FSMAXTYPES)
+ fprintf(f, "%8.8s", bsd_fstypes[pp->p_fstype].name
This message was truncated. Download the full message here.
E
E
Efraim Flashner wrote on 6 Apr 2021 14:32
[PATCH 6/9] gnu: american-fuzzy-lop: Add support for powerpc-linux.
(name . Efraim Flashner)(address . efraim@flashner.co.il)
26d9929a7c41d1c614dc2cc7fd082976c9f42b64.1617711307.git.efraim@flashner.co.il
* gnu/packages/debug.scm (american-fuzzy-lop): Add case for
powerpc-linux.
(qemu-for-american-fuzzy-lop): Same.
---
gnu/packages/debug.scm | 2 ++
1 file changed, 2 insertions(+)

Toggle diff (22 lines)
diff --git a/gnu/packages/debug.scm b/gnu/packages/debug.scm
index 2913c348f3..1326ce6e16 100644
--- a/gnu/packages/debug.scm
+++ b/gnu/packages/debug.scm
@@ -179,6 +179,7 @@ tools that process C/C++ code.")
("aarch64-linux" "aarch64")
("armhf-linux" "arm")
("mips64el-linux" "mips64el")
+ ("powerpc-linux" "ppc")
;; Prevent errors when querying this package on unsupported
;; platforms, e.g. when running "guix package --search="
(_ "UNSUPPORTED"))))
@@ -254,6 +255,7 @@ down the road.")
("aarch64-linux" "aarch64")
("armhf-linux" "arm")
("mips64el-linux" "mips64el")
+ ("powerpc-linux" "ppc")
;; Prevent errors when querying this package on unsupported
;; platforms, e.g. when running "guix package --search="
(_ "UNSUPPORTED"))))
--
2.31.1
E
E
Efraim Flashner wrote on 6 Apr 2021 14:32
[PATCH 7/9] build: qemu-command: Add support for powerpc.
(name . Efraim Flashner)(address . efraim@flashner.co.il)
9f9bc5d3686731bf30c72c821f0b5a54c66843aa.1617711307.git.efraim@flashner.co.il
* gnu/build/vm.scm (qemu-command): Add missing case for powerpc.
---
gnu/build/vm.scm | 1 +
1 file changed, 1 insertion(+)

Toggle diff (14 lines)
diff --git a/gnu/build/vm.scm b/gnu/build/vm.scm
index 253d9bcd31..a2c2d79bb9 100644
--- a/gnu/build/vm.scm
+++ b/gnu/build/vm.scm
@@ -75,6 +75,7 @@
(cond
((string-match "^i[3456]86$" cpu) "i386")
((string-match "armhf" cpu) "arm")
+ ((string-match "powerpc" cpu) "ppc")
(else cpu)))))
(define* (load-in-linux-vm builder
--
2.31.1
E
E
Efraim Flashner wrote on 6 Apr 2021 14:32
[PATCH 8/9] gnu: mercurial: Skip tests on powerpc-linux.
(name . Efraim Flashner)(address . efraim@flashner.co.il)
7e40c580cc4efc7627696e517bc338d38d4405b5.1617711307.git.efraim@flashner.co.il
* gnu/packages/version-control.scm (mercurial)[arguments]: Skip tests on
powerpc-linux.
---
gnu/packages/version-control.scm | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

Toggle diff (19 lines)
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 4d4b276a10..13e2ccd400 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -1688,7 +1688,11 @@ execution of any hook written in any language before every commit.")
"--slowtimeout" "86400"
;; The test suite takes a long time and produces little
;; output by default. Prevent timeouts due to silence.
- "-v"))))))))
+ "-v"))))))
+ ;; Tests on powerpc-linux take more than 10 hours.
+ #:tests? ,(if (string=? "powerpc-linux" (or (%current-system)
+ (%current-target-system)))
+ '#f '#t)))
;; The following inputs are only needed to run the tests.
(native-inputs
`(("python-nose" ,python-nose)
--
2.31.1
E
E
Efraim Flashner wrote on 6 Apr 2021 14:32
[PATCH 9/9] gnu: nss: Skip tests on powerpc-linux.
(name . Efraim Flashner)(address . efraim@flashner.co.il)
b0b76cdac4e9147105b1613fbb69707b8de5366a.1617711307.git.efraim@flashner.co.il
* gnu/packages/nss.scm (nss)[arguments]: Skip tests on powerpc-linux.
---
gnu/packages/nss.scm | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)

Toggle diff (27 lines)
diff --git a/gnu/packages/nss.scm b/gnu/packages/nss.scm
index e054363e9f..954a1d3b80 100644
--- a/gnu/packages/nss.scm
+++ b/gnu/packages/nss.scm
@@ -1,7 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2020 Jonathan Brielmaier <jonathan.brielmaier@web.de>
@@ -109,7 +109,10 @@ in the Mozilla clients.")
;; Parallel builds are not supported (see:
;; https://bugzilla.mozilla.org/show_bug.cgi?id=1640328).
`(#:parallel-build? #f
- #:tests? #t ;requires at least one hour to run
+ ;; Tests on powerpc-linux take forever and fail sporatically.
+ #:tests? ,(if (string=? "powerpc-linux" (or (%current-system)
+ (%current-target-system)))
+ '#f '#t)
#:make-flags
(let* ((out (assoc-ref %outputs "out"))
(nspr (string-append (assoc-ref %build-inputs "nspr")))
--
2.31.1
V
V
Vincent Legoll wrote on 6 Apr 2021 19:00
(name . Efraim Flashner)(address . efraim@flashner.co.il)
CAEwRq=pkXrQnxKJMqw9bDm4xiWQPski-2K8AoOPkR23shvXysA@mail.gmail.com
Hello,

On Tue, Apr 6, 2021 at 2:44 PM Efraim Flashner <efraim@flashner.co.il> wrote:
Toggle quote (2 lines)
> + ;; Tests on powerpc-linux take forever and fail sporatically.

s/sporatically/sporadically/

--
Vincent Legoll
V
V
Vincent Legoll wrote on 6 Apr 2021 19:02
Re: [PATCH 7/9] build: qemu-command: Add support for powerpc.
(name . Efraim Flashner)(address . efraim@flashner.co.il)
CAEwRq=qyBemm_8eqV2_Pr8wFKAb1hRK2aKwDw_qhds0ZN5vy4w@mail.gmail.com
Hello,

On Tue, Apr 6, 2021 at 2:44 PM Efraim Flashner <efraim@flashner.co.il> wrote:
Toggle quote (2 lines)
> + ((string-match "powerpc" cpu) "ppc")

Won't there be some "powerpc64le" conflict here ?

--
Vincent Legoll
E
E
Efraim Flashner wrote on 6 Apr 2021 21:17
(name . Vincent Legoll)(address . vincent.legoll@gmail.com)
YGyzyA4LoKxwFfWI@3900XT
On Tue, Apr 06, 2021 at 07:02:47PM +0200, Vincent Legoll wrote:
Toggle quote (8 lines)
> Hello,
>
> On Tue, Apr 6, 2021 at 2:44 PM Efraim Flashner <efraim@flashner.co.il> wrote:
> > + ((string-match "powerpc" cpu) "ppc")
>
> Won't there be some "powerpc64le" conflict here ?
>

I thought not, but it appears it would match all of powerpc*

(ins)scheme@(guile-user)> (use-modules (ice-9 regex))
(ins)scheme@(guile-user)> (string-match "powerpc" "powerpc")
$1 = #("powerpc" (0 . 7))
(ins)scheme@(guile-user)> (string-match "powerpc" "powerpc64le")
$2 = #("powerpc64le" (0 . 7))
(ins)scheme@(guile-user)> (string-match "powerpc" "armhf")
$3 = #f

If it were string=? then it would be fine, but that would break the
^i[3456]86$ regex. It looks like I would need to add a powerpc64 case
above the powerpc case. Looking at the output of qemu adding
((string-match "powerpc64" cpu) "ppc64") would be the right answer.

--
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
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmBss8UACgkQQarn3Mo9
g1F6OA/+PHxDSLSUaxQUonH3nlZBhXaRJ97HT9ho/BSCL23wPj50EzKsTLzg1SV3
NYLa0vFoXCEQqxMnGz3fdT2yyJMG976zhJRPLni3wCy1RzWxmX+KJLZLKeBQDyin
qwSu/Ld9huqckLm8dHR/bHEPwRF0pUQj2BBu0JvxDnrI/XXszBIRR8L0JskhLfpT
YuJw+Yh1ANltzXLPFsNmo5ZXXKJM4ruQVtussRWpVxN4Bj9Z8W5GgoijeZMbHVOk
brTHAiaTtLhjL/SxVl9uOhHGinDMvg5onAi2doQUD3E35jAl442hTeqGXDiQa0N6
PpVMG1wNEPvzmaBKEWohS/F4thdOuXIaADYsqP4E6xSlm6qMjvjun0wHI/RtSxMg
xsvQy3nR1tpHxlygWV0VNr7IYNNqPSQGEnTsbu28H7/HKO4OpjgHgnpD9AumYnzh
SRPBBoGEc/L+QaY03uKLCJMKJKGzga/HSndgHRkPWKlkTNQ7NjVZdDlPwK6DnWmq
Vwy43aRNxr0oAMAPQN0pDXr5SgJJBluIiAU9tAnGIyZIfZdV35pTWXiEag12XteO
lLH20ZMzsLOLyHP2EFmTACJ2Go20DhJQshqs8nUN91SARSXu2yoYvZ7T+uUJ1AOe
yzMYsB1dRmNJ85HvAySAVg2RGE5V2zS/Rw7IogqHIfegc2x267Y=
=wAhS
-----END PGP SIGNATURE-----


E
E
Efraim Flashner wrote on 6 Apr 2021 21:18
Re: [PATCH 9/9] gnu: nss: Skip tests on powerpc-linux.
(name . Vincent Legoll)(address . vincent.legoll@gmail.com)
YGy0AnamHYVtHVz0@3900XT
On Tue, Apr 06, 2021 at 07:00:50PM +0200, Vincent Legoll wrote:
Toggle quote (8 lines)
> Hello,
>
> On Tue, Apr 6, 2021 at 2:44 PM Efraim Flashner <efraim@flashner.co.il> wrote:
> > + ;; Tests on powerpc-linux take forever and fail sporatically.
>
> s/sporatically/sporadically/
>

Not going to lie, spelling is hard. I normally have spell check turned
off for scheme files.

--
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
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmBstAEACgkQQarn3Mo9
g1EYaA/9FZ6hnb+PyLozgHgWcp3XJHqHS7bapmtqjFb0ZwtrHyJINOVfPvJJpO32
Hl6cUNEqyKssyL0whDCl2Tp5HrZ3syuLisr0j06eYs6mFEf7AVOhGFhQE+xWoP6+
bJrxMvmrJiVkQAtr3lkf6ZRT8BGQPI0GeaRrYa6BEbwdcNQNqhMTsuK7k5SIQ8Dk
tenpTH1EuBDX4zhaxLpDdB7kKcUwMTqsEmBdWqbFZPta0FsDe3nlPlQujwsYduo4
MO3pDRiwFZLq4/1Cy7mt6yHmD+JZZVeq58yO6dm/3GNi1FzCmU1yVXAlabytjh04
JG2DvV9O6t9f/5+zK+AE3oTqdtht9/w7MmmyYz34QJE2guYzmriZXs36fJuWUxoh
hszCsyM3G6P7spwU+cwL9IpOe09xPq8YZv0gwHDmS/cKb+YZw6Xyzlmo4Q1mK91k
MWFztLFF1wNO3S74VJzkN4nDIdOvk4prxYmf3ZEd6rgdwxDBMOrIPGRhSHPSJOR8
YAjWLasbbuvbBhBn5gYkW3NPXPk8Jj5QPyU3M/B2y/RfYt28LNKyROv/5X50/u+G
IeWBrH/0O/fBsMSzCHEG1/fEjRlZpp3H81NJXQF7GOMWwLO4cwaTbmjg2ezOE8a8
C58cipki0MJPV5fO13PbVk77lkfDgFKT+2ttBKV4OuVLxU0bcD8=
=CJDk
-----END PGP SIGNATURE-----


E
E
Efraim Flashner wrote on 6 Apr 2021 21:29
Re: [PATCH 4/9] gnu: mesa: Add support for powerpc-linux.
YGy2lmYzrTOARlnN@3900XT
On Tue, Apr 06, 2021 at 03:32:48PM +0300, Efraim Flashner wrote:
Toggle quote (8 lines)
>
> + ;; The llvm-based tests are flakey on non-Intel hardware.
> + #:tests? ,(if (string=? "powerpc-linux" (or (%current-system)
> + (%current-target-system)))
> + '#f '#t)
> +
>

Looks like Charlène of OpenBSD (I think?) is right, there are some
endianness bugs in mesa with llvm. I've tried, building mesa for powerpc
without llvm isn't actually possible, so disabled tests for now.

Snippet from the test suite log:

Testing util_format_a1b5g5r5_unorm_unpack_rgba_8unorm ...
FAILED: {0x39, 0xc5, 0x00, 0x00} obtained
{0x00, 0x00, 0xff, 0x00} expected
FAILED: {0xc5, 0x00, 0x18, 0xff} obtained
{0x00, 0xff, 0x00, 0x00} expected
FAILED: {0x00, 0x18, 0xe6, 0x00} obtained
{0xff, 0x00, 0x00, 0x00} expected
FAILED: {0x00, 0x20, 0x00, 0x00} obtained
{0x00, 0x00, 0x00, 0xff} expected
Testing util_format_a1b5g5r5_unorm_norm_flags ...
Testing util_format_x1b5g5r5_unorm_fetch_rgba_float ...
FAILED: {0.225806, 0.774194, 0.000000, 1.000000} obtained
{0.000000, 0.000000, 1.000000, 1.000000} expected
FAILED: {0.774194, 0.000000, 0.096774, 1.000000} obtained
{0.000000, 1.000000, 0.000000, 1.000000} expected
FAILED: {0.000000, 0.096774, 0.903226, 1.000000} obtained
{1.000000, 0.000000, 0.000000, 1.000000} expected
FAILED: {1.000000, 0.870968, 1.000000, 1.000000} obtained
{1.000000, 1.000000, 1.000000, 1.000000} expected
Testing util_format_x1b5g5r5_unorm_pack_rgba_float ...
FAILED: 00 3e obtained
3e 00 expected
FAILED: 07 c0 obtained
c0 07 expected
FAILED: f8 00 obtained
00 f8 expected
FAILED: ff fe obtained
fe ff expected


--
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
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmBstpMACgkQQarn3Mo9
g1HNnA//cDfqfc3lR94dHwvZ+f/FZsqgz5thprglbQRtS3iTqwf9fQA2/vP1dEIp
H01bqesG1Ln3UMP5CXm7Fm9BDlSbmRbPztmq34WBC0y/Qt7tpjooSN9lLXdr/M9i
INIL5FXkg/ywMYce6EUnJLughFbQg3uVcZXklb1z1y5y1L5mnxEJODrZYjHIM5lA
ETR1pgNpWRzD+QcQsiN/4OHbX3GvpMbeqHB7yb4GYpmb8Pe6JHNFHh9xwTZeD9w4
Ug9gO/fFurEulIePH47y5ND7q9l2fJWssITUagF0PujKSk2HeTBs7UScZbvLnSCz
5aAW8OiT3P5XMYez9Uk8q6+5rlCUSp3yL4ov6qnTriaWIxDjY0BzC/7x0gZocGC0
2SdsUJlGnAR58sWnleLLPHI3TAMTBVa3lpdCEBnk3QhACwq/ih6XkdBGCdigSi73
sOX7/3DVdOW+k1CgkaXLzXP+pDPNazodU0DUCbWQoRy0BRLFUHofn/SCLYtpXoO1
JTbknMNIyKc+a4+qzI0o8D309jJpY44kqFhjk9IGkiGd04F0F5+IQs1KZ0GLOc6q
OCjbIPkOsivSX1SuPYzxWrNpl2QGFzt5otkY03+4jpadDdbHSJS1ELlwPUyvsW/X
mMOJNe3rErddT+wcqhCopu+56zjIaQCI0RHf2PnPFY0ejkIEj2c=
=b8/q
-----END PGP SIGNATURE-----


V
V
Vincent Legoll wrote on 7 Apr 2021 00:27
Re: [PATCH 7/9] build: qemu-command: Add support for powerpc.
(name . Efraim Flashner)(address . efraim@flashner.co.il)
CAEwRq=op4nhStX282YdziZL9zUShVFcPQmpYUSEoZU70sn_LtQ@mail.gmail.com
On Tue, Apr 6, 2021 at 9:18 PM Efraim Flashner <efraim@flashner.co.il> wrote:
Toggle quote (25 lines)
>
> On Tue, Apr 06, 2021 at 07:02:47PM +0200, Vincent Legoll wrote:
> > Hello,
> >
> > On Tue, Apr 6, 2021 at 2:44 PM Efraim Flashner <efraim@flashner.co.il> wrote:
> > > + ((string-match "powerpc" cpu) "ppc")
> >
> > Won't there be some "powerpc64le" conflict here ?
> >
>
> I thought not, but it appears it would match all of powerpc*
>
> (ins)scheme@(guile-user)> (use-modules (ice-9 regex))
> (ins)scheme@(guile-user)> (string-match "powerpc" "powerpc")
> $1 = #("powerpc" (0 . 7))
> (ins)scheme@(guile-user)> (string-match "powerpc" "powerpc64le")
> $2 = #("powerpc64le" (0 . 7))
> (ins)scheme@(guile-user)> (string-match "powerpc" "armhf")
> $3 = #f
>
> If it were string=? then it would be fine, but that would break the
> ^i[3456]86$ regex. It looks like I would need to add a powerpc64 case
> above the powerpc case. Looking at the output of qemu adding
> ((string-match "powerpc64" cpu) "ppc64") would be the right answer.

or you can use anchored regex, like in the x86 case:

((string-match "^powerpc$" cpu) "ppc")

--
Vincent Legoll
V
V
Vincent Legoll wrote on 7 Apr 2021 00:31
Re: [PATCH 9/9] gnu: nss: Skip tests on powerpc-linux.
(name . Efraim Flashner)(address . efraim@flashner.co.il)
CAEwRq=qShDHfLT=VJYqG_LUqiqVNgPqSFECKfupNf7vKQxFRrw@mail.gmail.com
On Tue, Apr 6, 2021 at 9:18 PM Efraim Flashner <efraim@flashner.co.il> wrote:
Toggle quote (6 lines)
> On Tue, Apr 06, 2021 at 07:00:50PM +0200, Vincent Legoll wrote:
> > s/sporatically/sporadically/
>
> Not going to lie, spelling is hard. I normally have spell check turned
> off for scheme files.

But you *are* lying, you have the guile spell-(and-syntax-)checker enabled
for all your scheme files, and it is a picky one... ;-)

--
Vincent Legoll
C
C
Chris Marusich wrote on 14 Apr 2021 05:25
Re: bug#47615: [PATCH 0/9] Add 32-bit powerpc support
(name . Efraim Flashner)(address . efraim@flashner.co.il)
87fszt35ux.fsf_-_@gmail.com
Efraim Flashner <efraim@flashner.co.il> writes:

Toggle quote (28 lines)
> * gnu/packages/debug.scm (american-fuzzy-lop): Add case for
> powerpc-linux.
> (qemu-for-american-fuzzy-lop): Same.
> ---
> gnu/packages/debug.scm | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/gnu/packages/debug.scm b/gnu/packages/debug.scm
> index 2913c348f3..1326ce6e16 100644
> --- a/gnu/packages/debug.scm
> +++ b/gnu/packages/debug.scm
> @@ -179,6 +179,7 @@ tools that process C/C++ code.")
> ("aarch64-linux" "aarch64")
> ("armhf-linux" "arm")
> ("mips64el-linux" "mips64el")
> + ("powerpc-linux" "ppc")
> ;; Prevent errors when querying this package on unsupported
> ;; platforms, e.g. when running "guix package --search="
> (_ "UNSUPPORTED"))))
> @@ -254,6 +255,7 @@ down the road.")
> ("aarch64-linux" "aarch64")
> ("armhf-linux" "arm")
> ("mips64el-linux" "mips64el")
> + ("powerpc-linux" "ppc")
> ;; Prevent errors when querying this package on unsupported
> ;; platforms, e.g. when running "guix package --search="
> (_ "UNSUPPORTED"))))

LGTM, I see it's in master already like you said.

--
Chris
-----BEGIN PGP SIGNATURE-----

iQJJBAEBCAAzFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAmB2YJYVHGNtbWFydXNp
Y2hAZ21haWwuY29tAAoJEN1AmhXYIkad9lcP/iJUChNisCeTMoVd8PLLXeCqeT+G
xwfde5VuvXWRhUyMxfoa/VowTI7NfH0nfL4d6m9KnG9dwilaVNKokjiVhprXZuT+
+zIpA4nYD1rJqmKp4m+yUU3Uo9MXfRMeXw8GCZN+NRc9q4k80vFAKqc1wd8VvCGW
wJoczr08GW7usum6oxAJn1CoSrbWTQenyX9tSLf086QwtW75a42VKZtJcQRoLf/8
VG4znljmr9lWlPeX2m5qXSbMSLOohjPThuhA1l7WAQ1GY8CJbqgymb+Vbm0pxi2z
2ATaG1bvFPDsVR+IKzqqA8gyw8KH9PaEObmYlI7no5CGHtjD7hd0M6mQDXYiKIk1
4cruhFsHkc1gB55vyFEbCn1OIUWemELpBFlcdNJnA/r+MncMHai7VEW/ZlCC6YfJ
pCK5ObSdBJisnaILlGacbbymcb4OBGMjcHlEHfwKz9bWddw8JTmPoQX8BrrvkfkG
rOVEBgDyVenFacNxK7Xbq38DSE/MA8KiO5cKBp5gfyV6h6ukSImLSgwNpMjV8jGP
BV0pzgfby3oZqWvvGnT3vnUWCXUkdEUxv6ydz7o/PRSt9z0zV6UEmledSM66dY3f
/6NH3CqqCnu1wjFhiKtMeIzrp28QsuFM8N+2gr3upBOkpTcuoRUvXvHa/bN9cMG5
+Il7U4zKLRt5g9Uv
=LsTQ
-----END PGP SIGNATURE-----

C
C
Chris Marusich wrote on 14 Apr 2021 05:51
Re: bug#47615: [PATCH 1/9] gnu: bootstrap: Add support for powerpc-linux.
(name . Efraim Flashner)(address . efraim@flashner.co.il)
87pmyx1q36.fsf@gmail.com
Efraim Flashner <efraim@flashner.co.il> writes:

Toggle quote (14 lines)
> On 923bb70a1bff657125c3008f119a477e5cb57c2b
> gnu:glibc-for-bootstrap: Fix patch.
>
> Run
> ./pre-inst-env guix build --target=powerpc-linux-gnu bootstrap-tarballs
>
> Producing
>
> /gnu/store/dyj1wvayyp1ihaknkxniz1xamcf4yrhl-bootstrap-tarballs-0
>
> With guix hash -rx /gnu/store/dyj1wvayyp1ihaknkxniz1xamcf4yrhl-bootstrap-tarballs-0
>
> 02xx2ydj28pwv3vflqffinpq1icj09gzi9icm8j4bwc4lca9irxn

Generally speaking, this patch looks fine to me. Just curious, what
sort of machines does one use for 32-bit powerpc?

I want to build the bootstrap binaries, see if they're reproducible (in
particular GCC, which I suspect won't be), and verify the hashes.

It might take a few days to do that, but I'll update this thread once
I've done it.

Toggle quote (7 lines)
> @@ -139,6 +148,7 @@
> ;; This is where the bootstrap executables come from.
> '("https://git.savannah.gnu.org/cgit/guix.git/plain/gnu/packages/bootstrap/"
> "https://alpha.gnu.org/gnu/guix/bootstrap/"
> + "http://flashner.co.il/guix/bootstrap/"
> "http://lilypond.org/janneke/guix/"))

Once you're reasonably sure the bootstrap binaries won't change, we
should consider uploading them to alpha.gnu.org. Ludo did it for me for
powerpc64le-linux but I don't know who has access (I don't).

Toggle quote (9 lines)
> (define %hurd-systems
> ;; The GNU/Hurd systems for which support is being developed.
> @@ -361,7 +361,7 @@ name of its URI."
> ;;
> ;; XXX: MIPS is unavailable in CI:
> ;; <https://lists.gnu.org/archive/html/guix-devel/2017-03/msg00790.html>.
> - (fold delete %supported-systems '("mips64el-linux")))
> + (fold delete %supported-systems '("mips64el-linux" "powerpc-linux")))

Any ideas for how we can get a machine for powerpc CI? Maybe VMs, I
guess? Can a POWER9 machine be a powerpc-linux machine...?


--
Chris
-----BEGIN PGP SIGNATURE-----

iQJJBAEBCAAzFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAmB2Zq0VHGNtbWFydXNp
Y2hAZ21haWwuY29tAAoJEN1AmhXYIkad78QQAKLL4LGDXxq1snkymU3yEQ6JRkJ9
VOpEPVjyNPiihFMcjs+ZN6OC7VlQCxjNCcTf6LQoY3AsqHmCVX+y79jqEWX/Nx96
VDiy5g8VaVYsK8eQ2mWbgRw8iua3W/mXNTNnC2RcBDdb2s8T2+2RLKJdK0TOeJhV
FYvnVCKdIoEmUJEV6IsiHxQ4cORYoHSiqIYYF2ld3FvFtmUgioHx8TlnHaGRk1dB
pgkl6J/EFkMBeF51ahpeU8jf6oLWd0Q0gc0EQhdxTloJlem6X8A/WYAIiGg2vOei
epE8MaOHsxRDt8GfzGq2SPQ8rxAXKGdHoNjyQRoloIZVYx4vloAfW58FhgIi+hhR
e+6KTcjcQNFR+Okqse5OPER6yJY4yn/ZURjct3BTXkg0fuoLK2JA02aT1B6AldTC
OiE51boHjTvW3savlaqissn7nYddJ+fz8KQVbS2xrGkcNdFSqh/GAe7+EN5vmgMi
IygX3SEXpiUoj10oNV8hGo3D2oopzn/92xTwZwHOmCJqMH2DwKxzIs9t45B7BQTd
OEURe3jdIVWaTyevh6l+WjHJuJ32nHexoUaB3/PgnL7280gDnVB7qh9O8ESY0E8/
EY0SfFNBHB0+sC3oA3XyUlODCPCm7Waaqyjv5A3nxpTEtvLJUAttJ6aZc0fbU3pY
oediMh2pSrpJGIEr
=2GFG
-----END PGP SIGNATURE-----

C
C
Chris Marusich wrote on 14 Apr 2021 06:00
Re: bug#47615: [PATCH 2/9] gnu: guile-3.0: Fix building on powerpc-linux.
(name . Efraim Flashner)(address . efraim@flashner.co.il)
87h7k91pn8.fsf_-_@gmail.com
Efraim Flashner <efraim@flashner.co.il> writes:

Toggle quote (39 lines)
> * gnu/packages/guile.scm (guile-3.0)[arguments]: On powerpc add two
> phases to adjust for 32-bit big-endian systems.
> ---
> gnu/packages/guile.scm | 21 ++++++++++++++++++++-
> 1 file changed, 20 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm
> index f63322794d..dca1b1c16f 100644
> --- a/gnu/packages/guile.scm
> +++ b/gnu/packages/guile.scm
> @@ -305,7 +305,26 @@ without requiring the source code to be rewritten.")
> (substitute-keyword-arguments (package-arguments guile-2.2)
> ((#:configure-flags flags ''())
> `(cons "--disable-jit" ,flags)))
> - (package-arguments guile-2.2)))
> + (if (string-prefix? "powerpc-" (%current-system))
> + (substitute-keyword-arguments (package-arguments guile-2.2)
> + ((#:phases phases)
> + `(modify-phases ,phases
> + (add-after 'unpack 'adjust-bootstrap-flags
> + (lambda _
> + ;; Upstream not yet notified about suggested solution.
> + ;; See existing bug reports:
> + ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=45214
> + ;; https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=977223
> + (substitute* "bootstrap/Makefile.in"
> + (("^GUILE_OPTIMIZATIONS.*")
> + "GUILE_OPTIMIZATIONS = -O1 -Oresolve-primitives -Ocps\n"))
> + #t))
> + (add-after 'unpack 'remove-failing-tests
> + (lambda _
> + ;; TODO: Discover why this test fails on powerpc-linux
> + (delete-file "test-suite/standalone/test-out-of-memory")
> + #t)))))
> + (package-arguments guile-2.2))))
> (native-search-paths
> (list (search-path-specification
> (variable "GUILE_LOAD_PATH")

Generally this looks reasonable. I understand 3 weeks is a long
iteration time! I think it's OK to proceed if it works for
bootstrapping other software on this platform. Especially since the
change is isolated to just powerpc-linux.

Has the Guile test failure been reported upstream?

--
Chris
-----BEGIN PGP SIGNATURE-----

iQJJBAEBCAAzFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAmB2aOsVHGNtbWFydXNp
Y2hAZ21haWwuY29tAAoJEN1AmhXYIkadyJoP/1V+MT08z3SWPt06mleDHsQWRq/N
JilsNkm32YfIVtHwiJ0SCwai9RqeErNf4wINfd4CxydxxEn1OBa5Wq9i/sd9vcdL
dOE/k414UhxB8edKJVXH8pMsEyaXf/4D+tdWhdL/8As9x1Brr+FX/KH94oSE0cNh
K5mnnu/eU/WIxIajqtsvGbuxLHx/ZsOzfTagb/8c/BUaL8CC8a8kp5Oh++eIioz6
+cU7Bp76rW2NH2TGdAhWuFvapMd1GApN7RJsFvPtKkF2gVvF1QeCJDYOxCZq9awG
3RCVGoGQoyZpJsLh2NruspO5NqoNIfLYGoh7FQraS/+/aoFoNkqW9BPNe8VgQI1h
28N3OrFZ0vxJ7pQGGQ5A5+ZzSxCY0E49s5JXARBWV7h55WvY8RyX+ASbKdHmnMzr
FVdktwIYEjZUw2yr8djXm6s3vJMkognT+fshhofJfJiTVsZ6Vj9C3EocDtMXM/aE
Ndwe9B/+imID0Vpa4glLzfLBzEQJ60z8CFI+0LMpMALT1rgb5/n9FUUC6zBnMi8+
71A5X9F7y3uuDW48RRVyF9IgC5z0CQAwWsrbMJiQkw+Wm8Vn55Ufd7j5LnW8hxxs
HbBYNmoMdk+e8+ZmAZtKZG8RNh+YKs9OWHBbi4aB8aMYgLk83II00fVD2usCukLt
an2gChCUOFj/yPpk
=qvAg
-----END PGP SIGNATURE-----

V
V
Vincent Legoll wrote on 14 Apr 2021 09:36
Re: bug#47615: [PATCH 1/9] gnu: bootstrap: Add support for powerpc-linux.
(name . Chris Marusich)(address . cmmarusich@gmail.com)
CAEwRq=oDfHMMhMijVUb6LF_UXeG_9Pmi_jZU7nzqAz8eYD_NxA@mail.gmail.com
Hello,

On Wed, Apr 14, 2021 at 5:51 AM Chris Marusich <cmmarusich@gmail.com> wrote:
Toggle quote (3 lines)
> Generally speaking, this patch looks fine to me. Just curious, what
> sort of machines does one use for 32-bit powerpc?

Old apple hardware based on powerpc G4 (powermacs, mini, imac, etc.),
maybe even G3.

Toggle quote (3 lines)
> Any ideas for how we can get a machine for powerpc CI? Maybe VMs, I
> guess? Can a POWER9 machine be a powerpc-linux machine...?

A VM on power9 may be able to run BE ppc32.

Regards

--
Vincent Legoll
E
E
Efraim Flashner wrote on 14 Apr 2021 15:56
(name . Vincent Legoll)(address . vincent.legoll@gmail.com)
YHb0mKELvIhQvDr9@3900XT
On Wed, Apr 14, 2021 at 09:36:24AM +0200, Vincent Legoll wrote:
Toggle quote (9 lines)
> Hello,
>
> On Wed, Apr 14, 2021 at 5:51 AM Chris Marusich <cmmarusich@gmail.com> wrote:
> > Generally speaking, this patch looks fine to me. Just curious, what
> > sort of machines does one use for 32-bit powerpc?
>
> Old apple hardware based on powerpc G4 (powermacs, mini, imac, etc.),
> maybe even G3.

There are a couple families of 32-bit powerpc machines out there with
(IIRC) macppc being the most prevalent for desktops.

Toggle quote (7 lines)
>
> > Any ideas for how we can get a machine for powerpc CI? Maybe VMs, I
> > guess? Can a POWER9 machine be a powerpc-linux machine...?
>
> A VM on power9 may be able to run BE ppc32.
>

Can it do it "directly" or does it need to be inside of a VM/chroot? I
never looked too much into it, never quite seemed like something that
I'd be able to take advantage of.

--
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
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmB29JUACgkQQarn3Mo9
g1H/PQ//Vc6gYMssGoR0gv4vP+IAfpnlghdyV+FuoDpyNc3WlFEzEkaRzIlyfuDj
DRxCCeQsSvvCyf9f/Ci54Ktwi6bAm6oG478LNjgLHtK0Pju1Z5Y6caH6q9k11R4n
dgjpllLnYeCHQFH8C/RA9WzN7r7g+D6Dt39rYTuBPug8vWmvy5enaMXDr0lLwhBb
e8r0B/qnozj4ObZSAQiHxN3oPr/6spwDxdOQqAAyIBJ2QNmnzyxI3SXaIZ5YWIJb
QavUdtHUnJTHDQJUUPXexoZ8tqoroD2TpJdrriKFVpnOr81O0aLYZ9Eythh4nYQa
6HMpKRUwoetG1MYNw1S11zxi9XyubNKRGdjznlSSszgcxrMYbANYQKOkaBIgHBan
S31YFjcT0efFU0nNIDi1X8TFPKlCtMeE9BuqO0A3EPdZ3bnMpVy7tbO5GTYrlgFI
vtk2wR3hZN68eHeOegXRS8m9NuKqQnuZJnhNI4K21ji/Q0w9X7mkEkR+637Da8Op
VCKb/dsJ8T8tj2reK5i1vLD/oaK7LeBADP2lapIvFePfC/weEpUayi5GSOl4O+0f
hbZmZydL79dwvOw8+MgEzdj/7YCrCpIJOLmTBDAN53qctC61Yj9TVLFZ9gJeouad
tuP6UmYhIEDBUyzYCIBuJWA0IGWVrGSht+zkFt1BBd7p3RrUGHs=
=1BbV
-----END PGP SIGNATURE-----


E
E
Efraim Flashner wrote on 14 Apr 2021 16:00
Re: bug#47615: [PATCH 2/9] gnu: guile-3.0: Fix building on powerpc-linux.
(name . Chris Marusich)(address . cmmarusich@gmail.com)
YHb1bXB+88vl21o6@3900XT
On Tue, Apr 13, 2021 at 09:00:43PM -0700, Chris Marusich wrote:
Toggle quote (35 lines)
> Efraim Flashner <efraim@flashner.co.il> writes:
>
> > * gnu/packages/guile.scm (guile-3.0)[arguments]: On powerpc add two
> > phases to adjust for 32-bit big-endian systems.
> > ---
> > gnu/packages/guile.scm | 21 ++++++++++++++++++++-
> > 1 file changed, 20 insertions(+), 1 deletion(-)
> >
> > diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm
> > index f63322794d..dca1b1c16f 100644
> > --- a/gnu/packages/guile.scm
> > +++ b/gnu/packages/guile.scm
> > @@ -305,7 +305,26 @@ without requiring the source code to be rewritten.")
> > (substitute-keyword-arguments (package-arguments guile-2.2)
> > ((#:configure-flags flags ''())
> > `(cons "--disable-jit" ,flags)))
> > - (package-arguments guile-2.2)))
> > + (if (string-prefix? "powerpc-" (%current-system))
> > + (substitute-keyword-arguments (package-arguments guile-2.2)
> > + ((#:phases phases)
> > + `(modify-phases ,phases
> > + (add-after 'unpack 'adjust-bootstrap-flags
> > + (lambda _
> > + ;; Upstream not yet notified about suggested solution.
> > + ;; See existing bug reports:
> > + ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=45214
> > + ;; https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=977223
> > + (substitute* "bootstrap/Makefile.in"
> > + (("^GUILE_OPTIMIZATIONS.*")
> > + "GUILE_OPTIMIZATIONS = -O1 -Oresolve-primitives -Ocps\n"))
> > + #t))
> > + (add-after 'unpack 'remove-failing-tests
> > + (lambda _
> > + ;; TODO: Discover why this test fails on powerpc-linux

Needs a period at the end of the sentence.

Toggle quote (15 lines)
> > + (delete-file "test-suite/standalone/test-out-of-memory")
> > + #t)))))
> > + (package-arguments guile-2.2))))
> > (native-search-paths
> > (list (search-path-specification
> > (variable "GUILE_LOAD_PATH")
>
> Generally this looks reasonable. I understand 3 weeks is a long
> iteration time! I think it's OK to proceed if it works for
> bootstrapping other software on this platform. Especially since the
> change is isolated to just powerpc-linux.
>
> Has the Guile test failure been reported upstream?
>

The two bugs mentioned are known to upstream and there are some other
reports of failures on other niche architectures like hppa.
Unfortunately I haven't gotten around to writing the email letting them
know what works for me but I'll do that soon. I haven't signed the CLA
for GNU projects so I want to make sure I don't send them a poisoned
patch.


--
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
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmB29W0ACgkQQarn3Mo9
g1H/bA//T5ReM+nQHG5OvrAWxJHHbBt1wexsBSSnbcvEC6J03xnOww5VW3jP8h0n
OktNpYArX7Yvj639kxFbDd7kcuYNdxj3pWlQ8DQeLAh5zr1D4fzE7cEDjU/92a66
z5dWEFkCbpCr1zFFI8aXLH1H4ROPSjJtsEiO2A7IIPxKz9GYsDgOjdE6pzoeY7Ot
sk44l1qFxGBSuf35AXRnKzDZu7N2Y/S0XiG6KBAcTRYlZ2Ng7kbHwg5UaNS8HEsZ
ijF8yKwVw1Vi/SoPjbhgXGpRgBhYFTxBgyqGO+AVEcKooLIysh9cBKXKxb/ZzZvi
2BW4nZy6MWWF3e94eWDzAIoWKXG4WGzwvzyEiidlsgMnvuoosl2QIWpfExJ+2PXm
FTn3TCImExBXnDHj+SWtXqZOkfWq/HT0olpQ8uJWjShjPVEe61z3GdbQs84QSBe8
HAIaX6Moxl9GcIi7lSnoAIJ8+cMW6TETBtUcTaSeNqUGUpyWuY7+ixPX3xZdYlBh
NyH3ataj4n9YXCpAsotPDbPOPjgWOP7oan0UaZDehMGUQ2ZWimZCsQ0hOZ+TBsRc
CdJlRZd9NipSMrafq5x0zCKB+X9GIS+wUJFmMiJJC6gtqEtaRl46yPPaKNC9JSMN
mctho4RH4CAdC5pHXvrfYqCNift6bgYui0TkQfG5SCsxv/E0Isk=
=fm9d
-----END PGP SIGNATURE-----


L
L
Ludovic Courtès wrote on 17 Apr 2021 18:04
Re: [PATCH 0/9] Add 32-bit powerpc support
(name . Efraim Flashner)(address . efraim@flashner.co.il)
87zgxwsxsd.fsf@gnu.org
Hi!

Efraim Flashner <efraim@flashner.co.il> skribis:

Toggle quote (10 lines)
>
> The wip-ppc branch on Savannah is currently in a good state. With the
> recent rapid churn on core-updates I haven't been very quick about
> rebasing on core-updates but I can confirm that building out to mesa
> works. Building is slow, it took 6 days to build from guile-final to
> mesa without stopping.
>
> The patches start with adding the bootstrap binaries for powerpc.

Woohoo!

Toggle quote (19 lines)
> gnu/build/vm.scm | 1 +
> gnu/local.mk | 2 +
> gnu/packages/base.scm | 11 +-
> gnu/packages/bootstrap.scm | 37 +-
> gnu/packages/commencement.scm | 21 +-
> gnu/packages/debug.scm | 2 +
> gnu/packages/disk.scm | 44 +
> gnu/packages/gl.scm | 18 +-
> gnu/packages/guile.scm | 21 +-
> gnu/packages/nss.scm | 7 +-
> .../patches/mac-fdisk-gentoo-patchset.patch | 866 +++++++
> gnu/packages/patches/mac-fdisk-p18.patch | 2070 +++++++++++++++++
> gnu/packages/version-control.scm | 6 +-
> guix/packages.scm | 4 +-
> m4/guix.m4 | 4 +-
> 15 files changed, 3096 insertions(+), 18 deletions(-)
> create mode 100644 gnu/packages/patches/mac-fdisk-gentoo-patchset.patch
> create mode 100644 gnu/packages/patches/mac-fdisk-p18.patch

I haven’t looked into details so I’ll just share thoughts from a
maintenance viewpoint:

1. Those fdisk patch file names will make ‘guix lint’ unhappy. :-)

2. Apart from mac-fdisk-p18.patch, which looks relatively big, the
changes seem to be rather non-intrusive, so it’s tempting to merge
them (on ‘core-updates’ I guess?).

3. OTOH, what will be the status of this architecture? I don’t think
new 32-bit PPC hardware is being made (right?), so I guess we
probably won’t have substitutes for that architecture. That means
it won’t be supported at the same level as other architectures and
may quickly suffer from bitrot.

I’m torn between #2 and #3.

What do people think?

Thanks,
Ludo’.
V
V
Vincent Legoll wrote on 17 Apr 2021 18:51
(name . Ludovic Courtès)(address . ludo@gnu.org)
CAEwRq=ouqsCRv9=w2ZVj7JkJ05WSoEYkbRwA4idKdybjnWWP7A@mail.gmail.com
Hi,

On Sat, Apr 17, 2021 at 6:04 PM Ludovic Courtès <ludo@gnu.org> wrote:
Toggle quote (8 lines)
> 3. OTOH, what will be the status of this architecture? I don’t think
> new 32-bit PPC hardware is being made (right?), so I guess we
> probably won’t have substitutes for that architecture. That means
> it won’t be supported at the same level as other architectures and
> may quickly suffer from bitrot.
>
> I’m torn between #2 and #3.

I don't think we have checked that ppc64 is unable to build this in a
similar way that x86_64 is able to build 32 bit x86 without virtualization.

But that may be possible, so all hope is not lost.

--
Vincent Legoll
E
E
Efraim Flashner wrote on 17 Apr 2021 21:42
(name . Ludovic Courtès)(address . ludo@gnu.org)
YHs6JzP7vH60iO+2@3900XT
On Sat, Apr 17, 2021 at 06:04:02PM +0200, Ludovic Courtès wrote:
Toggle quote (7 lines)
> Hi!
>
> I haven’t looked into details so I’ll just share thoughts from a
> maintenance viewpoint:
>
> 1. Those fdisk patch file names will make ‘guix lint’ unhappy. :-)

I'll make sure to touch them up. I was also not happy about the
supported-architectures field of the package, I took that from Debain
(or was it Gentoo?) but I'm not sure of a technical reason why it can't
be built from other architectures.

Toggle quote (4 lines)
> 2. Apart from mac-fdisk-p18.patch, which looks relatively big, the
> changes seem to be rather non-intrusive, so it’s tempting to merge
> them (on ‘core-updates’ I guess?).

Before I found some of the patches I played around with fixing the
package. Without looking at the patches too closely some of them fix
warnings and some of them actually make it compile correctly.

Toggle quote (6 lines)
> 3. OTOH, what will be the status of this architecture? I don’t think
> new 32-bit PPC hardware is being made (right?), so I guess we
> probably won’t have substitutes for that architecture. That means
> it won’t be supported at the same level as other architectures and
> may quickly suffer from bitrot.

I don't know about new 32-bit powerpc hardware, I think it's only being
newly created for the embedded and networking space. As far as operating
systems with support¹ Adélie Linux is the only one I know that's
actually targeting the machines.

I found that emulation on my desktop (Ryzen 3900XT, 24 threads) is
faster than building on native hardware (1 core, 1.5GB of RAM, original
4200 RPM disk), edging it out on single threaded compiling and doing
great when it comes to using multiple cores and parallel builds.
Ignoring how to create an OS image if we just targeted, say, mesa and
maybe one or two other packages, we could have a core set which doesn't
change regularly and won't take up too much emulated build time but will
save days of compile time.

Toggle quote (4 lines)
> I’m torn between #2 and #3.
>
> What do people think?

The fear of bit-rot is real and I think we should mention in the manual
(when I actually write the section) that support is best-effort with
minimal substitutes.

Toggle quote (3 lines)
> Thanks,
> Ludo’.


--
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
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmB7OiUACgkQQarn3Mo9
g1F4lhAAlsgpco1wctZoEQEnO6ouEHc7Pn56EfJNO6KIkvYZ9jwiK4TYnxk4+wwC
VTc1YXfC03jFVFYMvc9tqfGsimvsInk3wHAKfLo60UylzQRe3eCAZ56+AB6bfSbI
TzwT/cuufezi65oeW+/AzfFZNuneXjWDopRmOqg88cEoh7GRdI4XE8OQgNIBR7aQ
d/4dqyUGEdJLicWZqhE0wAFnODTKicbGp//g2Dm5M0TxAeMEH6bDUrpnuSDTy4xD
PMfGziiqmNqQO0kPLqxCyEPYUBTIiwY3OrwHjytThriekS+3v4dRKU33iU2cUoaj
53uIBZ+FbmEnc4Hjn5RMwXDtTDd18o38b9UwJFWVBld69pBqH0REkh/HtmIKRw3B
vWmPSHVCk6wR6LubSr354to3/VrVHGRyO9c2wsF0cyM5sSUTSZyiGUCgiP8ZHEZl
0p76qy/jUcer230ZKNaZ5tK21iQkalWr6Bl8D+GvghLcQfurjOV9eKhfvYHky01Y
hM3RK4v1mPqM2G9xGWj/Mu9uJnUhWYGfxqrdWEXg1sUiD0Fg7Iu3lUeDr43e5u3c
HO1eK/JsFBLOta2+ktk8F8U8yumO45Sefy0y2Z0/g4F/vcJpzIEnwbPEC9bA/RWV
lOYrn5qRVcSRuBek/s0YOItMPBJnJTa9cww3umvGEWpC04Qnj5U=
=YGCq
-----END PGP SIGNATURE-----


C
C
Chris Marusich wrote on 17 Apr 2021 21:51
Re: bug#47615: [PATCH 0/9] Add 32-bit powerpc support
(name . Efraim Flashner)(address . efraim@flashner.co.il)
8735vo1yhm.fsf_-_@gmail.com
Efraim Flashner <efraim@flashner.co.il> writes:

Toggle quote (6 lines)
> * gnu/packages/base.scm (binutils)[arguments]: Add phase on
> powerpc-linux to adjust the test suite.
> * gnu/packages/commencement.scm (binutils-boot0)[arguments]: Move custom
> phases after inherited arguments. Add phase on powerpc-linux to adjust
> the test suite.

Nits: adjust the test suite to do what? The message would be clearer if
it explained the purpose of the adjustment. You could also name the
phases you added/moved, for extra clarity, if you want to.

Toggle quote (20 lines)
> diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
> index dbb7c619fe..b9fc0a6e29 100644
> --- a/gnu/packages/base.scm
> +++ b/gnu/packages/base.scm
> @@ -531,7 +531,16 @@ change. GNU make offers many powerful extensions over the standard utility.")
>
> ;; Make sure 'ar' and 'ranlib' produce archives in a
> ;; deterministic fashion.
> - "--enable-deterministic-archives")))
> + "--enable-deterministic-archives")
> + ,@(if (string=? (%current-system) "powerpc-linux")
> + `(#:phases
> + (modify-phases %standard-phases
> + (add-after 'unpack 'disable-rust-libiberty-test
> + (lambda _
> + (substitute* "libiberty/testsuite/Makefile.in"
> + ((" check-rust-demangle ") ""))
> + #t))))
> + '())))

What's the problem? Presumably the test fails; a comment here could
clarify that.

If it's a test failure, has the issue been reported upstream?

Toggle quote (44 lines)
> (synopsis "Binary utilities: bfd gas gprof ld")
> (description
> diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
> index 7c39a84008..f707a01d30 100644
> --- a/gnu/packages/commencement.scm
> +++ b/gnu/packages/commencement.scm
> @@ -2653,7 +2653,22 @@ exec " gcc "/bin/" program
> #:modules ((guix build gnu-build-system)
> (guix build utils)
> (ice-9 ftw)) ; for 'scandir'
> +
> + ;; #:phases gets modified for powerpc-linux in binutils,
> + ;; so #:phases here needs to be after the inherited one.
> + ,@(substitute-keyword-arguments (package-arguments binutils)
> + ((#:configure-flags cf)
> + `(cons ,(string-append "--target=" (boot-triplet))
> + ,cf)))
> +
> #:phases (modify-phases %standard-phases
> + ,@(if (string=? (%current-system) "powerpc-linux")
> + '((add-after 'unpack 'disable-rust-libiberty-test
> + (lambda _
> + (substitute* "libiberty/testsuite/Makefile.in"
> + ((" check-rust-demangle ") ""))
> + #t)))
> + '())
> (add-after 'install 'add-symlinks
> (lambda* (#:key outputs #:allow-other-keys)
> ;; The cross-gcc invokes 'as', 'ld', etc, without the
> @@ -2667,12 +2682,8 @@ exec " gcc "/bin/" program
> (with-directory-excursion (string-append out "/bin")
> (for-each (lambda (name)
> (symlink name (remove-triplet-prefix name)))
> - (scandir "." has-triplet-prefix?)))))))
> + (scandir "." has-triplet-prefix?)))))))))
>
> - ,@(substitute-keyword-arguments (package-arguments binutils)
> - ((#:configure-flags cf)
> - `(cons ,(string-append "--target=" (boot-triplet))
> - ,cf)))))
> (inputs (%boot0-inputs))))
>
> (define libstdc++-boot0

I think you can put all of this in the substitute-keyword-arguments
form, which would (1) eliminate the need for a comment, (2) eliminate
the need to worry about the order of the keyword arguments, and (3)
eliminate the need to duplicate the new phase in two package
definitions:

(define binutils-boot0
(package
(inherit binutils)
(source (bootstrap-origin (package-source binutils)))
(name "binutils-cross-boot0")
(arguments
`(#:guile ,%bootstrap-guile
#:implicit-inputs? #f

#:modules ((guix build gnu-build-system)
(guix build utils)
(ice-9 ftw)) ; for 'scandir'

,@(substitute-keyword-arguments (package-arguments binutils)
((#:configure-flags cf)
`(cons ,(string-append "--target=" (boot-triplet))
,cf))
;; The presence of '%standard-phases as the default value here is
;; important. It ensures that even when (package-argument
;; binutils) does not already contain the #:phases keyword
;; argument, the substitution will occur. If you omit a default
;; value and (package-arguments binutils) does not contain the
;; #:phases keyword argument (e.g., on an x86_64-linux system),
;; then the substitution will not occur, and no phases at all will
;; be added.
((#:phases phases '%standard-phases)
`(modify-phases ,phases
,@(if (string=? (%current-system) "powerpc-linux")
'((add-after 'unpack 'disable-rust-libiberty-test
(lambda _
(substitute* "libiberty/testsuite/Makefile.in"
((" check-rust-demangle ") ""))
#t)))
'())
(add-after 'install 'add-symlinks
(lambda* (#:key outputs #:allow-other-keys)
;; The cross-gcc invokes 'as', 'ld', etc, without the
;; triplet prefix, so add symlinks.
(let ((out (assoc-ref outputs "out"))
(triplet-prefix (string-append ,(boot-triplet) "-")))
(define (has-triplet-prefix? name)
(string-prefix? triplet-prefix name))
(define (remove-triplet-prefix name)
(substring name (string-length triplet-prefix)))
(with-directory-excursion (string-append out "/bin")
(for-each
(lambda (name)
(symlink name (remove-triplet-prefix name)))
(scandir "." has-triplet-prefix?)))))))))))

(inputs (%boot0-inputs))))

I played with this in the REPL, and it seems to produce the desired
result (e.g., inspect by running ,pp (package-arguments binutils-boot0)
or similar at the REPL). However, I didn't actually try building
anything with it.

What do you think?

--
Chris
-----BEGIN PGP SIGNATURE-----

iQJJBAEBCAAzFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAmB7PCUVHGNtbWFydXNp
Y2hAZ21haWwuY29tAAoJEN1AmhXYIkadzd8QAMTP+xnDz8TkkR2c/inoWE+SpqOI
VKV+Ox8TMlLaxqe53M5eHiiS78/Po3on/R9EMGW5PiMCwElDJ4K4sEXK89sGVp2P
wmdNNk6Em31vbPhjxX5m2aXx9HkxXavQ75mjoJXDvauHLGn+1trUrK+sXXZa/W2Q
dW+TptVwBsFUnss+PE/vafnXQm9Y3RA5YT1hrQ7qvr7VyRREcI1qtIomnHsgs0LO
BRYQWevv+UPR9PAZXm30VkmSbLfBswlHWjVDiAMS22wXb2ut3BYuEpw5kGnvd9bI
GypZ/6qrCAe6xXUcm8c2AVHgIHJcnm89Yym/2Gq4m2EcU1vLwk68XsjqHIN4ZlHy
jdmUjNqUJ6lEy9r3siTBqL7rHYqimIKcYn8Dif5BDwqCfS4aXH2nQK8iNiqKKcpS
lhfx0Dw3OKqHDE8w55S1TxEHGyKyfp4Yxmgu+yZDILMUqKHztoPsxzEOq3Ay8EF3
m4P0uOIEkeN3U/i6DQnnUsb2q1lr454PNoECc/Mf1o78EUJQA6eDB0Mf1TZMsNVW
lmsRnkQFfV5r6dqifT4YUQztEC2JGyHJoqVqnwXEHUDgIDLS4xXVWiq43RZTDfTi
CxU7EZ1G5DS3qITASCWN8/+pxhn4NPT9cvPEBx3YchJife8ndSOr+2Ks6eGKZo37
z+lspupMIoyewouS
=b8AE
-----END PGP SIGNATURE-----

C
C
Chris Marusich wrote on 17 Apr 2021 22:02
Re: bug#47615: [PATCH 3/9] gnu: binutils: Adjust test suite on powerpc-linux.
(name . Efraim Flashner)(address . efraim@flashner.co.il)
87y2dgznl1.fsf_-_@gmail.com
Chris Marusich <cmmarusich@gmail.com> writes:

Toggle quote (52 lines)
> (define binutils-boot0
> (package
> (inherit binutils)
> (source (bootstrap-origin (package-source binutils)))
> (name "binutils-cross-boot0")
> (arguments
> `(#:guile ,%bootstrap-guile
> #:implicit-inputs? #f
>
> #:modules ((guix build gnu-build-system)
> (guix build utils)
> (ice-9 ftw)) ; for 'scandir'
>
> ,@(substitute-keyword-arguments (package-arguments binutils)
> ((#:configure-flags cf)
> `(cons ,(string-append "--target=" (boot-triplet))
> ,cf))
> ;; The presence of '%standard-phases as the default value here is
> ;; important. It ensures that even when (package-argument
> ;; binutils) does not already contain the #:phases keyword
> ;; argument, the substitution will occur. If you omit a default
> ;; value and (package-arguments binutils) does not contain the
> ;; #:phases keyword argument (e.g., on an x86_64-linux system),
> ;; then the substitution will not occur, and no phases at all will
> ;; be added.
> ((#:phases phases '%standard-phases)
> `(modify-phases ,phases
> ,@(if (string=? (%current-system) "powerpc-linux")
> '((add-after 'unpack 'disable-rust-libiberty-test
> (lambda _
> (substitute* "libiberty/testsuite/Makefile.in"
> ((" check-rust-demangle ") ""))
> #t)))
> '())
> (add-after 'install 'add-symlinks
> (lambda* (#:key outputs #:allow-other-keys)
> ;; The cross-gcc invokes 'as', 'ld', etc, without the
> ;; triplet prefix, so add symlinks.
> (let ((out (assoc-ref outputs "out"))
> (triplet-prefix (string-append ,(boot-triplet) "-")))
> (define (has-triplet-prefix? name)
> (string-prefix? triplet-prefix name))
> (define (remove-triplet-prefix name)
> (substring name (string-length triplet-prefix)))
> (with-directory-excursion (string-append out "/bin")
> (for-each
> (lambda (name)
> (symlink name (remove-triplet-prefix name)))
> (scandir "." has-triplet-prefix?)))))))))))
>
> (inputs (%boot0-inputs))))

Sorry, I meant to write this instead:

(define binutils-boot0
(package
(inherit binutils)
(source (bootstrap-origin (package-source binutils)))
(name "binutils-cross-boot0")
(arguments
`(#:guile ,%bootstrap-guile
#:implicit-inputs? #f

#:modules ((guix build gnu-build-system)
(guix build utils)
(ice-9 ftw)) ; for 'scandir'

,@(substitute-keyword-arguments (package-arguments binutils)
((#:configure-flags cf)
`(cons ,(string-append "--target=" (boot-triplet))
,cf))
;; The presence of '%standard-phases as the default value here is
;; important. It ensures that even when (package-argument
;; binutils) does not already contain the #:phases keyword
;; argument, the substitution will occur. If you omit a default
;; value and (package-arguments binutils) does not contain the
;; #:phases keyword argument (e.g., on an x86_64-linux system),
;; then the substitution will not occur, and no phases at all will
;; be added.
((#:phases phases '%standard-phases)
`(modify-phases ,phases
(add-after 'install 'add-symlinks
(lambda* (#:key outputs #:allow-other-keys)
;; The cross-gcc invokes 'as', 'ld', etc, without the
;; triplet prefix, so add symlinks.
(let ((out (assoc-ref outputs "out"))
(triplet-prefix (string-append ,(boot-triplet) "-")))
(define (has-triplet-prefix? name)
(string-prefix? triplet-prefix name))
(define (remove-triplet-prefix name)
(substring name (string-length triplet-prefix)))
(with-directory-excursion (string-append out "/bin")
(for-each
(lambda (name)
(symlink name (remove-triplet-prefix name)))
(scandir "." has-triplet-prefix?)))))))))))

(inputs (%boot0-inputs))))

The point is that we can probably "inherit" the phases, so we wouldn't
have to repeat ourselves.

--
Chris
-----BEGIN PGP SIGNATURE-----

iQJJBAEBCAAzFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAmB7PtoVHGNtbWFydXNp
Y2hAZ21haWwuY29tAAoJEN1AmhXYIkaddeEP/0AoZhuymDesDWRQy3vnqqFwqSBh
/XkNnAflReWBptGC3a1BZ+xpTLDlWxSbrXu5ae2FHMHpjAc2V+8q95ITTobAQopf
ihJ0nUIOs2lBhsOS9NDpUNOj1QDO87QlXcC0xpQelx9Grm8eYyiWmEClXOFzjqjW
HRYoQgBsacBiM7QVgpsE2DPxJx5kKgsRECtRhj6wqslr+Hyth2uLqvsUQ8dlphkp
TWKlQmHrz+bizCW2zuS9NazfZLmDS5r9F9v7xsBAYrf5W4YHvVpvcAFJBpPdhKFN
/5eS+Cp4mGHitLOKafDbQ28P0Gdvh4Rg29vsNQw6yOG+yZTuZ5V++eZhTNuz9tgC
AKSQ5RwNE6u972vVqDfVVdkoDkBIq5vqAuh9SWREIuP5YoejQJ0IGkzY/z30PATQ
TPvTXaJ379nL0hoEgZ/TIaKm/YTgqmUcwIzPVhcNZDP6kz6/pgp1q7ZCA/ei9WUT
5CC/URA0l95FGgZayJSHO9+8pJBUVU/799zlBrk+QCCaXclPoxqMFqOZSheJArmD
MUFq16UFVBwdtaUD6zfLSg/Uv9tLccmWpOyuSkQNyOmlVK4K637O/JDZbH2+f9OM
IprnV/MNJDqtR3JXfyqQVCdsodPNdyemN01sgwqHjzKOULcJKobVFqK6fhKq/w2A
TXeqpngDN0ipk/4+
=h4kS
-----END PGP SIGNATURE-----

V
V
Vincent Legoll wrote on 17 Apr 2021 22:07
Re: [PATCH 0/9] Add 32-bit powerpc support
CAEwRq=oax_4JykX3940+RhSOP3hB5w8Nq3v=nRC=iYFxe18JWw@mail.gmail.com
Hi,

On Sat, Apr 17, 2021 at 9:44 PM Efraim Flashner <efraim@flashner.co.il> wrote:
Toggle quote (3 lines)
> As far as operating systems with support¹ Adélie Linux is the only
> one I know that's actually targeting the machines.

There's also a void port being worked on, but not
upstreamed yet (https://voidlinux-ppc.org)

gentoo, openbsd & netbsd also still have support too.

--
Vincent Legoll
E
E
Efraim Flashner wrote on 18 Apr 2021 11:23
Re: bug#47615: [PATCH 0/9] Add 32-bit powerpc support
(name . Chris Marusich)(address . cmmarusich@gmail.com)
YHv6jDimnNGP3c2o@3900XT
Attachment: file
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmB7+okACgkQQarn3Mo9
g1EQkg/9GRxYnGSA5LQF07oguQ4z9DX5FygpdR6gK0YiAcE5cBioqcLhRTd/DTxS
TtILEp6L8Or7fEBj3tGqLtAQ+f36UBlR8vCUSgV5GBrnGH1/X0ciZwRaCS0oHI4n
TC06OIYqRw/rP4/OLthlycK/iFsjvuMOtNupnwv/jYOtD9NdGiGtJfLMbDlmnXtC
DTCcoLI/3gSH7FGDb/9sPDT5j4UBsL09FTSHD0VJukomyw4lkHbR+QGHXpOw5P8d
bXNpZjLWfqQPkMpHkxDzSNjjyEWhkWbX+h6t+EU4GA2OmAAswe/3Vtj0oQ+BXX9D
Qt1I9o4WxOpfZ1OlViZ0/ZiwpbWvq3UT0MTwjUEQxaA9riu7FZl0/k5bSYG0s5Tp
N29jS4uSf5n9hvGJIetY3Us/KfTCqIObh2rBtTrA8A2ilOCXsZFP0F6XxAsfyi+I
/qU5Ai/atGhb21WxpRbDLJk470Z7iK53BJjp88UyPS4LnkaNnVANoEZVD/vVipFz
600GnC68Rl7lPGoPytm7b+MX8J/OIWyaii4I48lXjX7sDYB302LlYOEd6gBvm23X
Eh606bpGJUMQwV0BjylobDS8dZ+QaGSK2Vctk72TTovlcst4vkxsqplulGo6Ejjn
N2JIdhnHwLGatDuqzAqILlHEF0hXO97rdSFYfvYs6F8zfS3G5KE=
=bk7N
-----END PGP SIGNATURE-----


C
C
Chris Marusich wrote on 22 Apr 2021 07:11
Re: bug#47615: [PATCH 3/9] gnu: binutils: Adjust test suite on powerpc-linux.
(address . 47615@debbugs.gnu.org)(address . guix-devel@gnu.org)
87sg3izywb.fsf_-_@gmail.com
Efraim Flashner <efraim@flashner.co.il> writes:

Toggle quote (6 lines)
>> If it's a test failure, has the issue been reported upstream?
>
> I'll check to see if I can find something upstream. If not I'll report
> it. FWIW Debian disables the test suite for powerpc.
> https://sources.debian.org/src/binutils/2.36.1-6/debian/rules/#L537

How significant is the failure, anyway? Are we likely to encounter
trouble down the line on powerpc if we don't resolve this? I have no
idea, honestly, so I'm asking because I just don't know.

I looked at the rules file you linked. Are you sure it disables the
test for powerpc? It reads:

with_check := yes
ifneq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
# override buildd admins to run the testsuite anyway ...
ifeq (,$(filter $(DEB_HOST_ARCH), m68k powerpc sh4 sparc64))
with_check := disabled through DEB_BUILD_OPTIONS
endif
endif
#with_check := disabled for this upload

I'm not sure what the values for DEB_HOST_ARCH or DEB_BUILD_OPTIONS
would be here. However, it seems to be setting with_check to disabled
if and only if (1) nocheck shows up in DEB_BUILD_OPTIONS and (2)
DEB_HOST_ARCH is not one of m68k, powerpc, sh4, or sparc64. In other
words, it seems to enable the tests unless nocheck is in
DEB_BUILD_OPTIONS, in which case it STILL enables the tests provided
that DEB_HOST_ARCH is one of m68k, powerpc, sh4, or sparc64.

I'm not very familiar with Debian rules files, so perhaps I'm mistaken.
However, I think this means that when DEB_BUILD_OPTIONS doesn't contain
"nocheck" (presumably it doesn't usually?), the tests will be run for
every platform.

In any case, reporting this upstream seems like the right thing to do.

Toggle quote (5 lines)
> I like the way you've done it (and the comment). The fewer places with
> copy/pasted code the better. I'm building it again now to see about the
> tests. With your changes I only need to add the phase in (gnu packages
> base).

I think the comment is honestly more than necessary, but if you find it
helpful, perhaps someone in the future might, too. It describes a
possibly surprising behavior of substitute-keyword-arguments that can
happen any time you invoke it. I just wanted to call it out
specifically for the purpose of this patch review.

--
Chris
-----BEGIN PGP SIGNATURE-----

iQJJBAEBCAAzFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAmCBBZUVHGNtbWFydXNp
Y2hAZ21haWwuY29tAAoJEN1AmhXYIkadyccQAI8McLVRtY3Jbo6X58i9neSLPGCB
frCpelrfalEVKn5OeetDDAMQWLfMi7ZtdxMkVU1nRNM9uvnxGw94rWreehVzuQ0s
H8Zw7A/TpiRjHTU5n7SvQ010EhhLcRvfYfz4xvpw8lnK/njYBf23U3XLKNI6eWua
tgI9hy4lwmhYCCh9+tRkaivqnC0ZO0q6mvDS7gpXPXhq/RPosh0zNSxHYXNKFFcu
K6JZGsE/919k03xLl3KdiLP0vS06QIlwYv5XdjQFDBHCXo+H3hR0mmE7sNdn4iTy
VrJrKDaVwpyv7Y6BYaLorpEhVQiUWlOijqQun3OgXpjq4l3IDFpBe+wvk93enA8s
YA7/TclxUKa6zm29j/eiJEIux9idSLij95d2hG1r71q/yVbMvDt0UZA0PyhJPw5j
PUMyD/yFRmq7HX6/YxN3GAOnzNJJiyYhEz3kr6fQatWabL98oCdHiuDUJIILbuIN
F558gxzDmJZEC3U49gb/xfiCoktQFl31f/2vZj1PduuXbJQZVaTeBxAYeO3yhi8M
12EVNRS0wvDG4dtMWZZXBRWGRiMFVs3jNFPeKmtx2AC/bTDWDyFQxIX9JXbpAKGu
/bWBc5bEIKbm1X89E5MasM1WcPCA5+zi7ViW0bx5B+FA0pj08zgpwA6vDFHEgNYN
/2EYuVlCs9j9y/n5
=XvLO
-----END PGP SIGNATURE-----

E
E
Efraim Flashner wrote on 22 Apr 2021 09:59
[PATCH v2 00/12] Add 32-bit powerpc support
(name . Efraim Flashner)(address . efraim@flashner.co.il)
cover.1619076704.git.efraim@flashner.co.il
This looks to be about 2 weeks worth of time since the last email, with
about 10 days of continuous building and is based on commit
76fc36d0a7215979bb74c05840f5a4de4ab5ea93 which changes the default gcc
to 8. I'll inline my comments in the top of each of the patches.

Some of the patches are going straight to core-updates but I've included
them anyway since the patchset is available in the official repo in the
wip-ppc branch and that's where I developed them.

Efraim Flashner (12):
gnu: bootstrap: Add support for powerpc-linux.
gnu: guile-3.0: Fix building on powerpc-linux.
gnu: gcc-boot0: Use 128-bit long-double on powerpc-linux.
gnu: binutils: Fix bug in test suite in libiberty.
gnu: mesa: Add support for powerpc-linux.
gnu: Add mac-fdisk.
gnu: american-fuzzy-lop: Add support for powerpc-linux.
build: qemu-command: Add support for powerpc.
gnu: mercurial: Skip tests on powerpc-linux.
gnu: nss: Skip tests on powerpc-linux.
gnu: zstd: Adjust test suite for 32-bit architectures.
gnu: glib: Disable failing test.

gnu/build/vm.scm | 1 +
gnu/local.mk | 4 +
gnu/packages/base.scm | 3 +-
gnu/packages/bootstrap.scm | 37 +-
gnu/packages/commencement.scm | 12 +-
gnu/packages/compression.scm | 4 +-
gnu/packages/debug.scm | 2 +
gnu/packages/disk.scm | 43 +
gnu/packages/gl.scm | 33 +-
gnu/packages/glib.scm | 16 +-
gnu/packages/guile.scm | 17 +-
gnu/packages/nss.scm | 7 +-
.../binutils-libiberty-endianness-bug.patch | 36 +
.../patches/glib-skip-failing-test.patch | 27 +
.../patches/mac-fdisk-gentoo-patchset.patch | 866 +++++++
gnu/packages/patches/mac-fdisk-p18.patch | 2070 +++++++++++++++++
gnu/packages/version-control.scm | 6 +-
guix/packages.scm | 4 +-
m4/guix.m4 | 4 +-
19 files changed, 3157 insertions(+), 35 deletions(-)
create mode 100644 gnu/packages/patches/binutils-libiberty-endianness-bug.patch
create mode 100644 gnu/packages/patches/glib-skip-failing-test.patch
create mode 100644 gnu/packages/patches/mac-fdisk-gentoo-patchset.patch
create mode 100644 gnu/packages/patches/mac-fdisk-p18.patch


base-commit: f08b070019a3c1697bb0b4a783dcd4f31243715a
prerequisite-patch-id: b98fc3a62ea8cceddca93361a4621026cebdb8e9
prerequisite-patch-id: 349889c70ebae8711909e6dfc0329235fee1a319
prerequisite-patch-id: dd3b6fe2e61b8588333468e597efec90314e482e
prerequisite-patch-id: 9ffff5964df281b3feb46795c5875c1091136fb9
prerequisite-patch-id: c150ac2fb2988685f28d788f4924b74a6264dce7
prerequisite-patch-id: a08c6f0dd727f598ef1258bb4233cfcec78913ee
prerequisite-patch-id: e36e1a27ce5055e53d5638f7139b4cf8c1ee68bf
prerequisite-patch-id: e59cdf3bd91cdba9e39d79d32c650eefea1749fd
prerequisite-patch-id: 2a1b37ff2e9b6f6787f4f3262d71cc26a005ccab
prerequisite-patch-id: 5cf027408739a4b2661cdf2709abdb8f1f06ce81
prerequisite-patch-id: 6deb5fd40689a243b1cce2c2fa5cca298bce253b
prerequisite-patch-id: 4c113e2088ef2674d35d985024c2a41daa8c679c
prerequisite-patch-id: edd89720757f9d3cedab3f3832abb4a8ec8bd83f
prerequisite-patch-id: 01258be2f32995622720bbc2eac1874282033604
prerequisite-patch-id: ed2fbb545f52e3ae813dc1b27e91e7ce2c84bce7
prerequisite-patch-id: 3523cc33853e2ff01d7b2916f5c481b052a674b5
prerequisite-patch-id: 92482c9dff576aa675e96a15bd02bd7471be517b
prerequisite-patch-id: f51d60f4622d9badefacdbb419d26c92a9387286
prerequisite-patch-id: dd2f7be90323949247ee684840ceea90ab2aed30
prerequisite-patch-id: f5f2f3cad462eb3c42df531f4b7fb0b2dc11959d
prerequisite-patch-id: ca605868541fdc9d2521c9bad0135a7a6e0b25b0
prerequisite-patch-id: 5ea5961816f5e60b38dbbacc6986860585d5b5c4
prerequisite-patch-id: 6d1cf903247a8ba700eb7b160b58d9b30b012a85
prerequisite-patch-id: 9d2c5115e7e6d19a06019cce74b58d036bc8f0d8
prerequisite-patch-id: b3699959ce306c85c4ed4756746e5273044f175a
prerequisite-patch-id: c587c3ca1d6bc31b1ff7f242066a8dd1603d3268
prerequisite-patch-id: 8fb15f1844dfe713c745b8095750912e03449d64
prerequisite-patch-id: fa64eb7a3a6312c0351e3452ad0300014a1cb2a0
prerequisite-patch-id: 84d9c39b89b986e096677904a5328b34e0072d30
prerequisite-patch-id: 0a0b1370f74ade7fcb989bd7e35520e9adac625e
prerequisite-patch-id: db9f94813d400e6734a1c80e40ad90aa7c1dd195
prerequisite-patch-id: db6b99cbc6e931613643690b3f72b41d73acf1b7
prerequisite-patch-id: 8441973a4f8c0f1713939fcd489274b7d30f44e4
prerequisite-patch-id: 9dd81d9a919ec6ca7f4bf07affdb7606f216cf44
prerequisite-patch-id: 88e793b3c2f41f4736b0867aaa5359a1a2f5df8f
prerequisite-patch-id: 7182f001b5ebaa7aafccf5d4c7e02e086ac6d25a
prerequisite-patch-id: fc8ca96ac1c7eb95a9326b2c2489f767c3f3184d
prerequisite-patch-id: 317a9f00e31e3a5a85542139bb70bfdadb9d7839
prerequisite-patch-id: 99da8e1149653fa8c9ebd12195940648a47ca239
prerequisite-patch-id: 9b7227eb2f7dea6df29ed65052b5ae5f1c27d3d6
prerequisite-patch-id: f6c62975dd823d0197d0448b321d9c86ffc84b34
prerequisite-patch-id: d4b83cb1b38074aa3d2387e11da261903e2cf367
prerequisite-patch-id: ccd7ad8358c6ad36f674fe0e428e39685c78273a
prerequisite-patch-id: 1a75e1a0ecb0704ee733d5a0c101439ffb2cf2f8
prerequisite-patch-id: c92f71717b9ac1f3cc0d3e3ef98cc3b215053fa0
prerequisite-patch-id: 96ef523637cc7c065baf5934ea97c3f9d9cc4fbd
prerequisite-patch-id: 4afe0a36b064e1cf3f2186aa82dd830ec0c4075d
prerequisite-patch-id: 04bb17b224108c967be9bf425e444166d60ae0d1
prerequisite-patch-id: 5989f8f80ebf89425e30335706fae8e6571d7704
prerequisite-patch-id: 287cec50edcb5977b5f089d261745aaaf25b4e23
prerequisite-patch-id: 74f085d5031248badc83d12703eb8840d6fe8c75
prerequisite-patch-id: 3a6fcb618b2aa5d0548d98c4694446f4c1f9c45e
prerequisite-patch-id: 60bcfce7e808bef835d33c2b03a57b97a8c4f5e4
prerequisite-patch-id: 5cab60c438ece58b487aabbb0020bed2f0aa9837
prerequisite-patch-id: 5ba37e25c99ee90f827559545a5de7b14b740fdb
prerequisite-patch-id: 08781a4ce6406ff3e6e77314a7f38cda224e53fd
prerequisite-patch-id: 97811dc54e939ad5f05e2674efa27b3d9e13ebe4
prerequisite-patch-id: 5767c6bcff0882bdb91173876267ad1e02e075c2
prerequisite-patch-id: 34eead0bbcfe35ab963dbca72fcf12d487bb10ed
prerequisite-patch-id: bdf335e34ad2f7bd0632948a80fc444d0ab87f95
prerequisite-patch-id: 122ea8bf2231509cd21b00b76e6ed29e81f60d05
prerequisite-patch-id: 39a9eb29306335aa9b21c91e1f1b949befc195bc
prerequisite-patch-id: 2a68b5c031515eb80c79ab164afcfcad4e4db686
prerequisite-patch-id: e2480a38e8ae1141e0c5ee6a6cbfcdb60869ebfd
prerequisite-patch-id: 670ea22337ed7b3e1dc0dbb9d558c3fbeee5c393
prerequisite-patch-id: 5bc422641d1fa42ae961c18759b98e42d0e87411
prerequisite-patch-id: 5f9d23b2160e9c4730b97eac9d83585d137a6340
prerequisite-patch-id: 32ac81500f66e943b897aacc38c9b694193e0cbd
prerequisite-patch-id: c01a7ebb021d3d5339dae34c53334469b4eb0ea8
prerequisite-patch-id: 979bf86e2b60977f775d1de3d5b348e41c14c9f8
prerequisite-patch-id: 207abe4eb96b2f9cebbd2a4ebb3911b77a13ca74
prerequisite-patch-id: 07949fcfa28749a8b73f9033511cc42698e36c47
prerequisite-patch-id: 6e115911af90f407f17a94bde1d3265cfd8b0767
prerequisite-patch-id: 3c9f7b47f6bb95233325276b6ff77a9beaa72903
prerequisite-patch-id: 754b43b96c795e89a2da0fd89b5d28d84d044244
prerequisite-patch-id: c9a4a6e8fe9844ec392a995aa34aae60c71062d7
prerequisite-patch-id: 9c625e3f1ec42a564d5b3a8bb51b9b75205305d1
prerequisite-patch-id: 5ce446eedeb1238a0a685a58a4474261d519668b
prerequisite-patch-id: 09823d52c7eef498be46c4a599ba94f3d31831de
prerequisite-patch-id: 702437fe76379b414be5b77ba9859b197cab0ecb
prerequisite-patch-id: 4b6518a6b25710d148b5bed0cb931007d6e704dc
prerequisite-patch-id: 1300550f8e26d5416f84746b8cce3ea0220d2221
prerequisite-patch-id: fafdf724b78452dd891bc67131c7f3c16617215c
prerequisite-patch-id: 320e5c513ba2e06cee78a41cced5c45a3cb9e888
prerequisite-patch-id: b5d9198ff528164c3d2567cd9b85eb57daad6892
prerequisite-patch-id: 6e49ae2ca0f012d6ff9f8cb61034fc16f4eb2933
prerequisite-patch-id: 29da52f6598e814c4f4ef232f84c9893ef564164
prerequisite-patch-id: cbb895a8131195e7da3022e96bd8aab2d95a24b4
prerequisite-patch-id: c58b9927e1f99256fbb200bba682cc31067c3ead
prerequisite-patch-id: b73af976df008d3787c11690c3745f37f00a8c8f
prerequisite-patch-id: 4452dd5bedc65bd8c4d473856bb2d3cdd6776b4e
prerequisite-patch-id: cf282c8a789324b29db1645ae5b245edd617fe94
prerequisite-patch-id: 5c7f5118a348c01d77e58c0a59a5ba30d827e53f
prerequisite-patch-id: 2bd603257c52572635e3e829d7901608ce8acb5c
prerequisite-patch-id: 4e3c07341eba2c84f9cb8d2e33623b8541046e70
prerequisite-patch-id: efdfe2c2e632c4bcd78f271343027c9d4b112480
prerequisite-patch-id: b2c8771587903b70e23436e5fa7ce015c13fd70c
prerequisite-patch-id: 15865b3b51be96caa18b557e3de15470961ebc27
prerequisite-patch-id: 3b52098277d9dd6ed04cc7baf7d1089de2de6e9c
prerequisite-patch-id: 51d806708cc8466c641b24a530f3e7ceaea2e927
prerequisite-patch-id: 31ad01ee26a4dd175ebb7e064314a73bfadb382f
prerequisite-patch-id: f698bb634c291314a7c3db1c0d9b2210573931f1
prerequisite-patch-id: ed709433df1d77faa1f9edd025b389eaa2a5dee8
prerequisite-patch-id: c5b73bb4adf652d4b580449ff636c336e8bc1862
prerequisite-patch-id: 7c06d72c9f66556536d01761cd29326cf3edee0f
prerequisite-patch-id: c8e0302276a04975a2ebf6ea150464361c570c8b
prerequisite-patch-id: 546afe29c7bfba304dddf7bf6b094b25022ac4b1
prerequisite-patch-id: 08956d855b447a63392241943e1d29770607f6b1
prerequisite-patch-id: 15d22d6f99d331cc637067d4957057cc6c30a693
prerequisite-patch-id: 8c5bd9499822e81fe3a066ca0a7992881a4d7978
prerequisite-patch-id: eefc1514601ea7b3c3bfeaf1347a0d05f4a12069
prerequisite-patch-id: d47ca0800f62044ad605e2879206b8870278d0b8
prerequisite-patch-id: aa2c489dab9d8e76273c9c98000325d1f0e90b07
prerequisite-patch-id: f8c1392070d1660d542d61fa9e79c5fed4dfa10c
prerequisite-patch-id: b8f87e738f1573ed0311b3620a0bec4940e09774
prerequisite-patch-id: d5c432d1de511ab2039006c69803e1ddafd767e6
prerequisite-patch-id: 449bcf88e0ae6452a70f1191d586b31c17a0e1eb
prerequisite-patch-id: 11df912cbf3ac10b67b8f0cecbceca22ac9acf92
prerequisite-patch-id: 3871ffac0263cfb3135fd27f5cf996a981bece38
prerequisite-patch-id: 3f39044038be4c5e621a912678dc931eabc4b4a5
prerequisite-patch-id: fc027117b2a51947b71000ac20727d43b5f90aed
prerequisite-patch-id: 01aeadeccd40b410c48c8fada9ba16ff4ab43889
prerequisite-patch-id: 49021465ac74420d6836b57cf87c816a4bdd336f
prerequisite-patch-id: 6c9b73c9af737071c8b8f74f578dd39bda46bda1
prerequisite-patch-id: cb1ab1be4c1883354a8d83fa6ecd9d525322703f
prerequisite-patch-id: a9f2b81a5b02d3011481ba63c78bd4a7c3ba50ea
prerequisite-patch-id: 1d2ac40285d3452f93a1ac8107e36619a4558f71
prerequisite-patch-id: c728d1f8a1f11dfed4d4790f0982adb06882c8db
prerequisite-patch-id: 225539dd6e6acc851839c6894f33cb84d532056e
prerequisite-patch-id: 001c2f22271d77565119cfe81398c24e4f7ee3d2
prerequisite-patch-id: 6f224a1aae34b74e4c6e8a0c457e5a1741ad5444
prerequisite-patch-id: 0b2f2bd1ed1175b339f39dbbd0ca70514892984f
--
2.31.1
E
E
Efraim Flashner wrote on 22 Apr 2021 09:59
[PATCH v2 01/12] gnu: bootstrap: Add support for powerpc-linux.
(name . Efraim Flashner)(address . efraim@flashner.co.il)
1615eb1d6f30ab3a8a53def5a9fc83a20793e40f.1619076704.git.efraim@flashner.co.il
On 923bb70a1bff657125c3008f119a477e5cb57c2b
gnu:glibc-for-bootstrap: Fix patch.

Run
./pre-inst-env guix build --target=powerpc-linux-gnu bootstrap-tarballs

Producing

/gnu/store/dyj1wvayyp1ihaknkxniz1xamcf4yrhl-bootstrap-tarballs-0

With guix hash -rx /gnu/store/dyj1wvayyp1ihaknkxniz1xamcf4yrhl-bootstrap-tarballs-0

02xx2ydj28pwv3vflqffinpq1icj09gzi9icm8j4bwc4lca9irxn

* gnu/packages/bootstrap.scm (%bootstrap-executables): Add entries for
powerpc-linux.
(%bootstrap-guile-hash, %bootstrap-coreutils&co, %bootstrap-binutils,
%bootstrap-glibc, %bootstrap-gcc): Add entry for powerpc-linux.
* gnu/packages.scm (%supported-systems): Add powerpc-linux.
(%hydra-supported-systems): Remove powerpc-linux.
* m4/guix.m4: Add powerpc-linux as a supported system.
---
gnu/packages/bootstrap.scm | 37 ++++++++++++++++++++++++++++++++++++-
guix/packages.scm | 4 ++--
m4/guix.m4 | 4 ++--
3 files changed, 40 insertions(+), 5 deletions(-)

This patch is unchanged.

Toggle diff (178 lines)
diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index c8844a40a8..5a8028a465 100644
--- a/gnu/packages/bootstrap.scm
+++ b/gnu/packages/bootstrap.scm
@@ -91,6 +91,15 @@
,(base32 "1j51gv08sfg277yxj73xd564wjq3f8xwd6s9rbcg8v9gms47m4cx"))
("xz"
,(base32 "1d779rwsrasphg5g3r37qppcqy3p7ay1jb1y83w7x4i3qsc7zjy2")))
+ ("powerpc-linux"
+ ("bash"
+ ,(base32 "0hwlw5lcyjzadprf5fm0cv4zb6jw667g9amnmhq0lbixasy7j72j"))
+ ("mkdir"
+ ,(base32 "12lfwh5p8pp06250wgi9mdvjv1jdfpd5xpmvfc0616aj0xqh09hp"))
+ ("tar"
+ ,(base32 "00sbmwl8qh6alxv9mw4hvj1j4yipwmw5mrw6qad8bi2pr7ya5386"))
+ ("xz"
+ ,(base32 "0hi47y6zh5zz137i59l5ibw92x6g54zn7ris1b1ym9rvavsasg7b")))
("armhf-linux"
("bash"
,(base32 "0s6f1s26g4dsrrkl39zblvwpxmbzi6n9mgqf6vxsqz42gik6bgyn"))
@@ -141,6 +150,7 @@
;; This is where the bootstrap executables come from.
'("https://git.savannah.gnu.org/cgit/guix.git/plain/gnu/packages/bootstrap/"
"https://alpha.gnu.org/gnu/guix/bootstrap/"
+ "http://flashner.co.il/guix/bootstrap/"
"http://lilypond.org/janneke/guix/"))
(define (bootstrap-executable-file-name system program)
@@ -148,6 +158,7 @@
(match system
("powerpc64le-linux" (string-append system "/20210106/" program))
("i586-gnu" (string-append system "/20200326/" program))
+ ("powerpc-linux" (string-append system "/20200923/bin/" program))
(_ (string-append system "/" program
"?id=44f07d1dc6806e97c4e9ee3e6be883cc59dc666e"))))
@@ -343,6 +354,8 @@ or false to signal an error."
(match system
("aarch64-linux"
"/20170217/guile-2.0.14.tar.xz")
+ ("powerpc-linux"
+ "/20200923/guile-2.0.14.tar.xz")
("armhf-linux"
"/20150101/guile-2.0.11.tar.xz")
("i586-gnu"
@@ -368,7 +381,9 @@ or false to signal an error."
("aarch64-linux"
(base32 "1giy2aprjmn5fp9c4s9r125fljw4wv6ixy5739i5bffw4jgr0f9r"))
("i586-gnu"
- (base32 "0wgqpsmvg25rnqn49ap7kwd2qxccd8dr4lllzp7i3rjvgav27vac"))))
+ (base32 "0wgqpsmvg25rnqn49ap7kwd2qxccd8dr4lllzp7i3rjvgav27vac"))
+ ("powerpc-linux"
+ (base32 "1by2p7s27fbyjzfkcw8h65h4kkqh7d23kv4sgg5jppjn2qx7swq4"))))
(define (bootstrap-guile-origin system)
"Return an <origin> object for the Guile tarball of SYSTEM."
@@ -501,6 +516,8 @@ $out/bin/guile --version~%"
"/20210106/static-binaries-0-powerpc64le-linux-gnu.tar.xz")
("i586-gnu"
"/20200326/static-binaries-0-i586-pc-gnu.tar.xz")
+ ("powerpc-linux"
+ "/20200923/static-binaries.tar.xz")
(_
"/20131110/static-binaries.tar.xz")))
%bootstrap-base-urls))
@@ -524,6 +541,9 @@ $out/bin/guile --version~%"
("i586-gnu"
(base32
"17kllqnf3fg79gzy9ansgi801c46yh9c23h4d923plvb0nfm1cfn"))
+ ("powerpc-linux"
+ (base32
+ "0kspxy0yczan2vlih6aa9hailr2inz000fqa0gn5x9d1fxxa5y8m"))
("mips64el-linux"
(base32
"072y4wyfsj1bs80r6vbybbafy8ya4vfy7qj25dklwk97m6g71753"))))))
@@ -574,6 +594,8 @@ $out/bin/guile --version~%"
"/20210106/binutils-static-stripped-2.34-powerpc64le-linux-gnu.tar.xz")
("i586-gnu"
"/20200326/binutils-static-stripped-2.34-i586-pc-gnu.tar.xz")
+ ("powerpc-linux"
+ "/20200923/binutils-2.35.1.tar.xz")
(_
"/20131110/binutils-2.23.2.tar.xz")))
%bootstrap-base-urls))
@@ -597,6 +619,9 @@ $out/bin/guile --version~%"
("i586-gnu"
(base32
"11kykv1kmqc5wln57rs4klaqa13hm952smkc57qcsyss21kfjprs"))
+ ("powerpc-linux"
+ (base32
+ "0asbg1c4avkrvh057mx0942xwddd136jni382zqsxzn79ls42yq8"))
("mips64el-linux"
(base32
"1x8kkhcxmfyzg1ddpz2pxs6fbdl6412r7x0nzbmi5n7mj8zw2gy7"))))))
@@ -654,6 +679,8 @@ $out/bin/guile --version~%"
"/20210106/glibc-stripped-2.31-powerpc64le-linux-gnu.tar.xz")
("i586-gnu"
"/20200326/glibc-stripped-2.31-i586-pc-gnu.tar.xz")
+ ("powerpc-linux"
+ "/20200923/glibc-2.32.tar.xz")
(_
"/20131110/glibc-2.18.tar.xz")))
%bootstrap-base-urls))
@@ -677,6 +704,9 @@ $out/bin/guile --version~%"
("i586-gnu"
(base32
"14ddm10lpbas8bankmn5bcrlqvz1v5dnn1qjzxb19r57vd2w5952"))
+ ("powerpc-linux"
+ (base32
+ "0smmssyjrlk5cvx49586smmk81gkwff0i6r91n4rir4jm6ba25sb"))
("mips64el-linux"
(base32
"0k97a3whzx3apsi9n2cbsrr79ad6lh00klxph9hw4fqyp1abkdsg")))))))))
@@ -750,6 +780,8 @@ exec ~a/bin/.gcc-wrapped -B~a/lib \
"/20210106/gcc-stripped-5.5.0-powerpc64le-linux-gnu.tar.xz")
("i586-gnu"
"/20200326/gcc-stripped-5.5.0-i586-pc-gnu.tar.xz")
+ ("powerpc-linux"
+ "/20200923/gcc-5.5.0.tar.xz")
(_
"/20131110/gcc-4.8.2.tar.xz")))
%bootstrap-base-urls))
@@ -773,6 +805,9 @@ exec ~a/bin/.gcc-wrapped -B~a/lib \
("i586-gnu"
(base32
"1j2zc58wzil71a34h7c70sd68dmqvcscrw3rmn2whq79vd70zvv5"))
+ ("powerpc-linux"
+ (base32
+ "1p7df3yixhm87dw5sccc6yn1i9db1r9hnmsg87wq5xi4rfmirq7w"))
("mips64el-linux"
(base32
"1m5miqkyng45l745n0sfafdpjkqv9225xf44jqkygwsipj2cv9ks")))))))))
diff --git a/guix/packages.scm b/guix/packages.scm
index 61238a8118..e1ddabac53 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -353,7 +353,7 @@ name of its URI."
;; 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"
- "powerpc64le-linux"))
+ "powerpc64le-linux" "powerpc-linux"))
(define %hurd-systems
;; The GNU/Hurd systems for which support is being developed.
@@ -364,7 +364,7 @@ name of its URI."
;;
;; XXX: MIPS is unavailable in CI:
;; <https://lists.gnu.org/archive/html/guix-devel/2017-03/msg00790.html>.
- (fold delete %supported-systems '("mips64el-linux")))
+ (fold delete %supported-systems '("mips64el-linux" "powerpc-linux")))
;; A package.
diff --git a/m4/guix.m4 b/m4/guix.m4
index 05d409a674..e778a56004 100644
--- a/m4/guix.m4
+++ b/m4/guix.m4
@@ -1,7 +1,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 © 2017, 2020 Efraim Flashner <efraim@flashner.co.il>
dnl Copyright © 2021 Chris Marusich <cmmarusich@gmail.com>
dnl
dnl This file is part of GNU Guix.
@@ -89,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|powerpc64le-linux)
+ x86_64-linux|i686-linux|armhf-linux|aarch64-linux|powerpc64le-linux|powerpc-linux)
;;
*)
if test "x$guix_courageous" = "xyes"; then
--
2.31.1
E
E
Efraim Flashner wrote on 22 Apr 2021 09:59
[PATCH v2 02/12] gnu: guile-3.0: Fix building on powerpc-linux.
(name . Efraim Flashner)(address . efraim@flashner.co.il)
007143fda1cfa0d5e6625158a94ea4e48b79a790.1619076704.git.efraim@flashner.co.il
* gnu/packages/guile.scm (guile-3.0)[arguments]: On powerpc add two
phases to adjust for 32-bit big-endian systems.
---
gnu/packages/guile.scm | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)

This patch has the comments updated. I reported my findings to the guile
debbugs email and Other People™ are testing the changes on the other
architectures. Otherwise patch unchanged.

Toggle diff (30 lines)
diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm
index f63322794d..08ad50f7b0 100644
--- a/gnu/packages/guile.scm
+++ b/gnu/packages/guile.scm
@@ -305,7 +305,22 @@ without requiring the source code to be rewritten.")
(substitute-keyword-arguments (package-arguments guile-2.2)
((#:configure-flags flags ''())
`(cons "--disable-jit" ,flags)))
- (package-arguments guile-2.2)))
+ (if (string-prefix? "powerpc-" (%current-system))
+ (substitute-keyword-arguments (package-arguments guile-2.2)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'unpack 'adjust-bootstrap-flags
+ (lambda _
+ ;; Upstream knows about suggested solution.
+ ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=45214
+ (substitute* "bootstrap/Makefile.in"
+ (("^GUILE_OPTIMIZATIONS.*")
+ "GUILE_OPTIMIZATIONS = -O1 -Oresolve-primitives -Ocps\n"))))
+ (add-after 'unpack 'remove-failing-tests
+ (lambda _
+ ;; TODO: Discover why this test fails on powerpc-linux
+ (delete-file "test-suite/standalone/test-out-of-memory"))))))
+ (package-arguments guile-2.2))))
(native-search-paths
(list (search-path-specification
(variable "GUILE_LOAD_PATH")
--
2.31.1
E
E
Efraim Flashner wrote on 22 Apr 2021 09:59
[PATCH v2 03/12] gnu: gcc-boot0: Use 128-bit long-double on powerpc-linux.
(name . Efraim Flashner)(address . efraim@flashner.co.il)
0f7980ce5048d058aabc7ef63d876c43824196cf.1619076704.git.efraim@flashner.co.il
* gnu/packages/commencement.scm (gcc-boot0)[arguments]: Adjust
configure-flag to also use '--with-long-double-128' on powerpc-linux.
---
gnu/packages/commencement.scm | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

I ran into build troubles without this patch. It only affects gcc-boot0
on powerpc, everything else I built out to mesa was unaffected by a
64-bit/128-bit mismatch.

Toggle diff (25 lines)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 36ebcee163..93caaac709 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -2733,12 +2733,12 @@ exec " gcc "/bin/" program
"--disable-shared"
"--enable-languages=c,c++"
- ;; 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")
- '())
+ ;; On POWER9 (little endian) glibc needs the 128-bit
+ ;; long double type. 32-bit PPC is affected by the
+ ;; changes applied for powerpc64le.
+ ,@(if (string-prefix? "powerpc" (boot-triplet))
+ '("--with-long-double-128")
+ '())
;; libstdc++ cannot be built at this stage
;; ("Link tests are not allowed after
--
2.31.1
E
E
Efraim Flashner wrote on 22 Apr 2021 09:59
[PATCH v2 04/12] gnu: binutils: Fix bug in test suite in libiberty.
(name . Efraim Flashner)(address . efraim@flashner.co.il)
a8909225203d17a2244756f1a4602d4b66c68c96.1619076704.git.efraim@flashner.co.il
* gnu/packages/base.scm (binutils)[source]: Add patch.
* gnu/packages/patches/binutils-libiberty-endianness-bug.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
---
gnu/local.mk | 1 +
gnu/packages/base.scm | 3 +-
.../binutils-libiberty-endianness-bug.patch | 36 +++++++++++++++++++
3 files changed, 39 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/binutils-libiberty-endianness-bug.patch

Completely rewritten. I reported the bug upstream to binutils and after
some testing it was determined to be an actual bug in libiberty's test
suite affecting big-endian systems. I've tested this on x86_64 and saw
no issues with it.

Toggle diff (70 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index f9996e6fa1..23b768871c 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -865,6 +865,7 @@ dist_patch_DATA = \
%D%/packages/patches/biber-sortinithash.patch \
%D%/packages/patches/bidiv-update-fribidi.patch \
%D%/packages/patches/binutils-boot-2.20.1a.patch \
+ %D%/packages/patches/binutils-libiberty-endianness-bug.patch \
%D%/packages/patches/binutils-loongson-workaround.patch \
%D%/packages/patches/binutils-mingw-w64-timestamp.patch \
%D%/packages/patches/binutils-mingw-w64-deterministic.patch \
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index ee1ab1bcad..3dd4f2d0be 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -507,7 +507,8 @@ change. GNU make offers many powerful extensions over the standard utility.")
(sha256
(base32
"18ypqr5y48vxqg9mkz1c47798jp1xb1d4vfpmfq8vkihkvkx4jsv"))
- (patches (search-patches "binutils-loongson-workaround.patch"))))
+ (patches (search-patches "binutils-libiberty-endianness-bug.patch"
+ "binutils-loongson-workaround.patch"))))
(build-system gnu-build-system)
;; TODO: Add dependency on zlib + those for Gold.
diff --git a/gnu/packages/patches/binutils-libiberty-endianness-bug.patch b/gnu/packages/patches/binutils-libiberty-endianness-bug.patch
new file mode 100644
index 0000000000..e6c82f704e
--- /dev/null
+++ b/gnu/packages/patches/binutils-libiberty-endianness-bug.patch
@@ -0,0 +1,36 @@
+This patch fixes a bug exposed when running the libiberty test suite on
+big-endian machines.
+
+Original bug report:
+https://sourceware.org/bugzilla/show_bug.cgi?id=27751
+Follow-ups:
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100177
+https://gcc.gnu.org/pipermail/gcc-patches/2021-April/568314.html
+
+---
+ libiberty/rust-demangle.c | 9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/libiberty/rust-demangle.c b/libiberty/rust-demangle.c
+index 6fd8f6a4db0..848563fa3c3 100644
+--- a/libiberty/rust-demangle.c
++++ b/libiberty/rust-demangle.c
+@@ -1253,9 +1253,12 @@ demangle_const_char (struct rust_demangler *rdm)
+ else if (value == '\n')
+ PRINT ("\\n");
+ else if (value > ' ' && value < '~')
+- /* Rust also considers many non-ASCII codepoints to be printable, but
+- that logic is not easily ported to C. */
+- print_str (rdm, (char *) &value, 1);
++ {
++ /* Rust also considers many non-ASCII codepoints to be printable, but
++ that logic is not easily ported to C. */
++ char c = value;
++ print_str (rdm, &c, 1);
++ }
+ else
+ {
+ PRINT ("\\u{");
+--
+2.31.1
+
--
2.31.1
E
E
Efraim Flashner wrote on 22 Apr 2021 09:59
[PATCH v2 05/12] gnu: mesa: Add support for powerpc-linux.
(name . Efraim Flashner)(address . efraim@flashner.co.il)
938df4b3ea20c9624ad83129d372812a1b003a87.1619076704.git.efraim@flashner.co.il
* gnu/packages/gl.scm (mesa)[inputs]: Add llvm, glslang for powerpc.
[arguments]: Customize the configure flags for powerpc. Add powerpc
specific phase to skip failing tests.
---
gnu/packages/gl.scm | 33 +++++++++++++++++++++++++++++----
1 file changed, 29 insertions(+), 4 deletions(-)

Blanket skipping of the test suite removed, instead we have a phase to
skip certain tests. When rebased on core-updates there will be 3 such
phases and adjustments to the packaging already for powerpc64le and
aarch64. I'll make adjustments to that when I rebase next.

Toggle diff (93 lines)
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index c194d269f8..ec76029cf9 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -271,7 +271,7 @@ also known as DXTn or DXTC) for Mesa.")
("libxrandr" ,libxrandr)
("libxvmc" ,libxvmc)
,@(match (%current-system)
- ((or "x86_64-linux" "i686-linux")
+ ((or "x86_64-linux" "i686-linux" "powerpc-linux")
;; Note: update the 'clang' input of mesa-opencl when bumping this.
`(("llvm" ,llvm-11)))
(_
@@ -283,7 +283,7 @@ also known as DXTn or DXTC) for Mesa.")
("flex" ,flex)
("gettext" ,gettext-minimal)
,@(match (%current-system)
- ((or "x86_64-linux" "i686-linux")
+ ((or "x86_64-linux" "i686-linux" "powerpc-linux")
`(("glslang" ,glslang)))
(_
`()))
@@ -298,6 +298,8 @@ also known as DXTn or DXTC) for Mesa.")
((or "armhf-linux" "aarch64-linux")
;; TODO: Fix svga driver for aarch64 and armhf.
'("-Dgallium-drivers=etnaviv,freedreno,kmsro,lima,nouveau,panfrost,r300,r600,swrast,tegra,v3d,vc4,virgl"))
+ ("powerpc-linux"
+ '("-Dgallium-drivers=nouveau,r300,r600,radeonsi,swrast,virgl"))
(_
'("-Dgallium-drivers=iris,nouveau,r300,r600,radeonsi,svga,swrast,virgl")))
;; Enable various optional features. TODO: opencl requires libclc,
@@ -318,12 +320,14 @@ also known as DXTn or DXTC) for Mesa.")
,@(match (%current-system)
((or "i686-linux" "x86_64-linux")
'("-Dvulkan-drivers=intel,amd"))
+ ("powerpc-linux" ; No default on this platform.
+ '("-Dvulkan-drivers=amd"))
(_
'("-Dvulkan-drivers=auto")))
;; Enable the Vulkan overlay layer on i686-linux and x86-64-linux.
,@(match (%current-system)
- ((or "x86_64-linux" "i686-linux")
+ ((or "x86_64-linux" "i686-linux" "powerpc-linux")
'("-Dvulkan-overlay-layer=true"))
(_
'()))
@@ -337,6 +341,9 @@ also known as DXTn or DXTC) for Mesa.")
((or "x86_64-linux" "i686-linux")
'("-Ddri-drivers=i915,i965,nouveau,r200,r100"
"-Dllvm=enabled")) ; default is x86/x86_64 only
+ ("powerpc-linux"
+ '("-Ddri-drivers=nouveau,r200,r100"
+ "-Dllvm=enabled"))
(_
'("-Ddri-drivers=nouveau,r200,r100"))))
@@ -350,6 +357,24 @@ also known as DXTn or DXTC) for Mesa.")
(guix build meson-build-system))
#:phases
(modify-phases %standard-phases
+ ,@(if (string-prefix? "powerpc-" (or (%current-target-system)
+ (%current-system)))
+ ;; There are some tests which fail specifically on powerpc.
+ `((add-after 'unpack 'disable-failing-test
+ (lambda _
+ (substitute* '(;; LLVM ERROR: Relocation type not implemented yet!
+ "src/gallium/drivers/llvmpipe/meson.build"
+ ;; This is probably a big-endian test failure.
+ "src/gallium/targets/osmesa/meson.build")
+ (("if with_tests") "if not with_tests"))
+ (substitute* "src/util/tests/format/meson.build"
+ ;; This is definately an endian-ness test failure.
+ (("'u_format_test', ") ""))
+ ;; It is only this portion of the test which fails.
+ (substitute* "src/mesa/main/tests/meson.build"
+ ((".*mesa_formats.*") ""))
+ #t)))
+ '())
,@(if (string-prefix? "i686" (or (%current-target-system)
(%current-system)))
;; Disable new test from Mesa 19 that fails on i686. Upstream
@@ -390,7 +415,7 @@ also known as DXTn or DXTC) for Mesa.")
(let ((out (assoc-ref outputs "out"))
(bin (assoc-ref outputs "bin")))
,@(match (%current-system)
- ((or "i686-linux" "x86_64-linux")
+ ((or "i686-linux" "x86_64-linux" "powerpc-linux")
;; Install the Vulkan overlay control script to a separate
;; output to prevent a reference on Python, saving ~70 MiB
;; on the closure size.
--
2.31.1
E
E
Efraim Flashner wrote on 22 Apr 2021 09:59
[PATCH v2 06/12] gnu: Add mac-fdisk.
(name . Efraim Flashner)(address . efraim@flashner.co.il)
297ae28469f64eef14d8a1e8fd0e9375d8f8b1ae.1619076704.git.efraim@flashner.co.il
* gnu/packages/disk.scm (mac-fdisk): New variable.
* gnu/packages/patches/mac-fdisk-gentoo-patchset.patch,
gnu/packages/patches/mac-fdisk-p18.patch: New files.
* gnu/local.mk (dist_patch_DATA): Register them.
---
gnu/local.mk | 2 +
gnu/packages/disk.scm | 43 +
.../patches/mac-fdisk-gentoo-patchset.patch | 866 +++++++
gnu/packages/patches/mac-fdisk-p18.patch | 2070 +++++++++++++++++
4 files changed, 2981 insertions(+)
create mode 100644 gnu/packages/patches/mac-fdisk-gentoo-patchset.patch
create mode 100644 gnu/packages/patches/mac-fdisk-p18.patch

I'm fairly certain there's just the cc-for-target change to make-flags.
This package is still untested on actual hardware.

Toggle diff (578 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 23b768871c..7aba045e4b 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1351,6 +1351,8 @@ dist_patch_DATA = \
%D%/packages/patches/luit-posix.patch \
%D%/packages/patches/lvm2-static-link.patch \
%D%/packages/patches/mailutils-fix-uninitialized-variable.patch \
+ %D%/packages/patches/mac-fdisk-gentoo-patchset.patch \
+ %D%/packages/patches/mac-fdisk-p18.patch \
%D%/packages/patches/make-impure-dirs.patch \
%D%/packages/patches/mars-install.patch \
%D%/packages/patches/mars-sfml-2.3.patch \
diff --git a/gnu/packages/disk.scm b/gnu/packages/disk.scm
index ed112f2ec2..5f24d555f0 100644
--- a/gnu/packages/disk.scm
+++ b/gnu/packages/disk.scm
@@ -302,6 +302,49 @@ fdisk. fdisk is used for the creation and manipulation of disk partition
tables, and it understands a variety of different formats.")
(license license:gpl3+)))
+(define-public mac-fdisk
+ (package
+ (name "mac-fdisk")
+ (version "0.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "mirror://debian/pool/main/m/mac-fdisk/"
+ "mac-fdisk_" version ".orig.tar.gz"))
+ (sha256
+ (base32 "0rkaqp82l47pg0ymqys07mljf3widv2yk4hhgs2yz8hwli5zqnbh"))
+ (patches (search-patches "mac-fdisk-p18.patch"
+ "mac-fdisk-gentoo-patchset.patch"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (delete 'configure) ; no configure script.
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (sbin (string-append out "/sbin"))
+ (man8 (string-append out "/share/man/man8")))
+ (mkdir-p sbin)
+ (mkdir-p man8)
+ (copy-file "fdisk" (string-append sbin "/mac-fdisk"))
+ (copy-file "pdisk" (string-append sbin "/pmac-fdisk"))
+ (copy-file "mac-fdisk.8.in" (string-append man8 "/mac-fdisk.8"))
+ (copy-file "pmac-fdisk.8.in" (string-append man8 "/pmac-fdisk.8"))))))
+ #:make-flags (list (string-append "CC=" ,(cc-for-target)))
+ #:tests? #f)) ; no tests
+ (home-page "https://tracker.debian.org/pkg/mac-fdisk")
+ (synopsis "Apple disk partition manipulation tool")
+ (description "The @code{fdisk} utilities from the MkLinux project, adopted
+for Linux/m68k. @code{mac-fdisk} allows you to create and edit the partition
+table of a disk. It supports only the Apple partition format used on Macintosh
+and PowerMac, use @code{pmac-fdisk} for PC partition format disks as used on
+PowerPC machines. @code{mac-fdisk} is an interactive tool with a menu similar
+to PC @code{fdisk}, supported options are somewhat different from PC
+@code{fdisk} due to the differences in partition format.")
+ (supported-systems '("powerpc-linux" "i686-linux" "x86_64-linux"))
+ (license license:gpl2)))
+
(define-public gptfdisk
(package
(name "gptfdisk")
diff --git a/gnu/packages/patches/mac-fdisk-gentoo-patchset.patch b/gnu/packages/patches/mac-fdisk-gentoo-patchset.patch
new file mode 100644
index 0000000000..b1bd38f671
--- /dev/null
+++ b/gnu/packages/patches/mac-fdisk-gentoo-patchset.patch
@@ -0,0 +1,866 @@
+https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-fs/mac-fdisk/files
+
+---
+ bitfield.c | 16 +++++-----
+ bitfield.h | 4 +--
+ dump.c | 42 ++++++++++++--------------
+ errors.c | 11 ++++---
+ fdisk.c | 68 ++++++++++++++++++++++++++++++++++++++----
+ fdisk.h | 5 ++++
+ fdisklabel.c | 79 +++++++++++++++++++++++++++----------------------
+ fdisklabel.h | 2 +-
+ io.c | 8 +++--
+ kernel-defs.h | 6 ++++
+ partition_map.c | 43 ++++++++++++++++-----------
+ pdisk.c | 7 ++---
+ 12 files changed, 186 insertions(+), 105 deletions(-)
+
+diff --git a/bitfield.c b/bitfield.c
+index 687e8bd..02e7f68 100644
+--- a/bitfield.c
++++ b/bitfield.c
+@@ -67,13 +67,12 @@ const unsigned long masks[] = {
+ //
+ // Routines
+ //
+-unsigned long
+-bitfield_set(unsigned long *bf, int base, int length, unsigned long value)
++unsigned int
++bitfield_set(unsigned int *bf, int base, int length, unsigned int value)
+ {
+- unsigned long t;
+- unsigned long m;
++ unsigned int t;
++ unsigned int m;
+ int s;
+- int i;
+
+ // compute shift & mask, coerce value to correct number of bits,
+ // zap the old bits and stuff the new value
+@@ -86,12 +85,11 @@ bitfield_set(unsigned long *bf, int base, int length, unsigned long value)
+ }
+
+
+-unsigned long
+-bitfield_get(unsigned long bf, int base, int length)
++unsigned int
++bitfield_get(unsigned int bf, int base, int length)
+ {
+- unsigned long m;
++ unsigned int m;
+ int s;
+- int i;
+
+ // compute shift & mask
+ // return the correct number of bits (shifted to low end)
+diff --git a/bitfield.h b/bitfield.h
+index ff56759..abfdf05 100644
+--- a/bitfield.h
++++ b/bitfield.h
+@@ -63,5 +63,5 @@
+ //
+ // Forward declarations
+ //
+-unsigned long bitfield_set(unsigned long *bf, int base, int length, unsigned long value);
+-unsigned long bitfield_get(unsigned long bf, int base, int length);
++unsigned int bitfield_set(unsigned int *bf, int base, int length, unsigned int value);
++unsigned int bitfield_get(unsigned int bf, int base, int length);
+diff --git a/dump.c b/dump.c
+index 4153dc5..edeeb31 100644
+--- a/dump.c
++++ b/dump.c
+@@ -30,10 +30,8 @@
+ */
+
+ #include <stdio.h>
+-#ifndef __linux__
+ #include <stdlib.h>
+ #include <unistd.h>
+-#endif
+ #include <string.h>
+ #include <errno.h>
+ #include <fcntl.h>
+@@ -63,16 +61,16 @@ typedef struct names {
+ // Global Constants
+ //
+ NAMES plist[] = {
+- "Drvr", "Apple_Driver",
+- "Dr43", "Apple_Driver43",
+- "Free", "Apple_Free",
+- " HFS", "Apple_HFS",
+- " MFS", "Apple_MFS",
+- "PDOS", "Apple_PRODOS",
+- "junk", "Apple_Scratch",
+- "unix", "Apple_UNIX_SVR2",
+- " map", "Apple_partition_map",
+- 0, 0
++ {"Drvr"}, {"Apple_Driver"},
++ {"Dr43"}, {"Apple_Driver43"},
++ {"Free"}, {"Apple_Free"},
++ {" HFS"}, {"Apple_HFS"},
++ {" MFS"}, {"Apple_MFS"},
++ {"PDOS"}, {"Apple_PRODOS"},
++ {"junk"}, {"Apple_Scratch"},
++ {"unix"}, {"Apple_UNIX_SVR2"},
++ {" map"}, {"Apple_partition_map"},
++ {0}, {0}
+ };
+
+ const char * kStringEmpty = "";
+@@ -164,10 +162,10 @@ dump_partition_map(partition_map_header *map, int disk_order)
+ }
+ #ifdef __mc68000__
+ printf("%*s type name "
+- "%*s %-*s ( size ) system\n", strlen(map->name)+1, "#", j, "length", j, "base");
++ "%*s %-*s ( size ) system\n", (int)strlen(map->name)+1, "#", j, "length", j, "base");
+ #else
+ printf("%*s type name "
+- "%*s %-*s ( size ) system\n", strlen(map->name)+1, "#", j, "length", j, "base");
++ "%*s %-*s ( size ) system\n", (int)strlen(map->name)+1, "#", j, "length", j, "base");
+ #endif
+
+ /* Grok devfs names. (courtesy Colin Walters)*/
+@@ -201,7 +199,6 @@ dump_partition_entry(partition_map *entry, int digits, char *dev)
+ partition_map_header *map;
+ int j;
+ DPME *p;
+- BZB *bp;
+ char *s;
+ #ifdef __mc68000__
+ int aflag = 1;
+@@ -224,13 +221,13 @@ dump_partition_entry(partition_map *entry, int digits, char *dev)
+ }
+ }
+ #ifdef __mc68000__
+- printf("%s%-2d %.4s %-12.12s ", dev, entry->disk_address, s, p->dpme_name);
++ printf("%s%-2d %.4s %-12.12s ", dev, (int)entry->disk_address, s, p->dpme_name);
+ #else
+- printf("%s%-4d %.4s %-18.32s ", dev, entry->disk_address, s, p->dpme_name);
++ printf("%s%-4d %.4s %-18.32s ", dev, (int)entry->disk_address, s, p->dpme_name);
+ #endif
+ } else {
+ printf("%s%-4d %20.32s %-18.32s ", dev,
+- entry->disk_address, p->dpme_type, p->dpme_name);
++ (int)entry->disk_address, p->dpme_type, p->dpme_name);
+ }
+
+ if (pflag) {
+@@ -314,7 +311,6 @@ list_all_disks()
+ int i;
+ int fd;
+ DPME * data;
+- long t;
+
+ data = (DPME *) malloc(PBLOCK_SIZE);
+ if (data == NULL) {
+@@ -382,7 +378,7 @@ show_data_structures(partition_map_header *map)
+ printf("Header:\n");
+ printf("fd=%d (%s)\n", map->fd, (map->regular_file)?"file":"device");
+ printf("map %d blocks out of %d, media %u blocks\n",
+- map->blocks_in_map, map->maximum_in_map, map->media_size);
++ map->blocks_in_map, map->maximum_in_map, (unsigned int)map->media_size);
+ printf("Map is%s writeable", (map->writeable)?kStringEmpty:kStringNot);
+ printf(", but%s changed\n", (map->changed)?kStringEmpty:kStringNot);
+ printf("\n");
+@@ -426,7 +422,7 @@ u32 dpme_reserved_3[62] ;
+ for (entry = map->disk_order; entry != NULL; entry = entry->next_on_disk) {
+ p = entry->data;
+ printf("%2d: %20.32s ",
+- entry->disk_address, p->dpme_type);
++ (int)entry->disk_address, p->dpme_type);
+ printf("%7u @ %-7u ", p->dpme_pblocks, p->dpme_pblock_start);
+ printf("%c%c%c%c%c%c%c%c%c%c ",
+ (dpme_valid_get(p))?'V':'v',
+@@ -449,7 +445,7 @@ u32 dpme_reserved_3[62] ;
+ "goto_address checksum processor\n");
+ for (entry = map->disk_order; entry != NULL; entry = entry->next_on_disk) {
+ p = entry->data;
+- printf("%2d: ", entry->disk_address);
++ printf("%2d: ", (int)entry->disk_address);
+ printf("%7u ", p->dpme_boot_block);
+ printf("%7u ", p->dpme_boot_bytes);
+ printf("%8x ", p->dpme_load_addr);
+@@ -466,7 +462,7 @@ xx: cccc RU *dd s...
+ */
+ for (entry = map->disk_order; entry != NULL; entry = entry->next_on_disk) {
+ p = entry->data;
+- printf("%2d: ", entry->disk_address);
++ printf("%2d: ", (int)entry->disk_address);
+
+ bp = (BZB *) (p->dpme_bzb);
+ j = -1;
+diff --git a/errors.c b/errors.c
+index 47c9c30..4e9e486 100644
+--- a/errors.c
++++ b/errors.c
+@@ -26,12 +26,11 @@
+ */
+
+ #include <stdio.h>
+-#ifndef __linux__
+ #include <stdlib.h>
+-#endif
+ #include <string.h>
+ #include <stdarg.h>
+
++#include <errno.h>
+ #include "errors.h"
+ #include "pdisk.h"
+
+@@ -115,8 +114,8 @@ fatal(int value, char *fmt, ...)
+ va_end(ap);
+
+ #ifdef __linux__
+- if (value > 0 && value < sys_nerr) {
+- fprintf(stderr, " (%s)\n", sys_errlist[value]);
++ if (value > 0 && value < errno) {
++ fprintf(stderr, " (%s)\n", strerror(value));
+ } else {
+ fprintf(stderr, "\n");
+ }
+@@ -144,8 +143,8 @@ error(int value, char *fmt, ...)
+ va_end(ap);
+
+ #ifdef __linux__
+- if (value > 0 && value < sys_nerr) {
+- fprintf(stderr, " (%s)\n", sys_errlist[value]);
++ if (value > 0 && value < errno) {
++ fprintf(stderr, " (%s)\n", strerror(value));
+ } else {
+ fprintf(stderr, "\n");
+ }
+diff --git a/fdisk.c b/fdisk.c
+index d77619b..dec19ae 100644
+--- a/fdisk.c
++++ b/fdisk.c
+@@ -59,9 +59,14 @@
+ */
+
+
++#ifndef _LARGEFILE64_SOURCE
++#define _LARGEFILE64_SOURCE
++#endif
++#include <sys/types.h>
+ #include <unistd.h>
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
+ #include <fcntl.h>
+ #include <ctype.h>
+ #include <setjmp.h>
+@@ -70,12 +75,65 @@
+
+ #include <sys/ioctl.h>
+
+-typedef unsigned short kdev_t; /* BAD hack; kdev_t is not exported */
+-
+ #include "kernel-defs.h"
+
+ #include "fdisk.h"
+
++/* ----------- */
++#define _PPC64_TYPES_H
++#define BITS_PER_LONG 64
++
++typedef __signed__ char __s8;
++typedef signed char s8;
++typedef unsigned char u8;
++typedef unsigned char __u8;
++
++typedef __signed__ short __s16;
++typedef signed short s16;
++/*typedef unsigned short __u16;*/
++typedef unsigned short u16;
++
++typedef __signed__ int __s32;
++typedef signed int s32;
++/*typedef unsigned int __u32;*/
++typedef unsigned int u32;
++
++typedef __signed__ long __s64;
++typedef signed long s64;
++typedef unsigned long __u64;
++typedef unsigned long u64;
++
++typedef struct {
++ __u32 u[4];
++} __attribute((aligned(16))) __vector128;
++
++typedef __vector128 vector128;
++
++typedef u32 dma_addr_t;
++typedef u64 dma64_addr_t;
++
++typedef struct {
++ unsigned long entry;
++ unsigned long toc;
++ unsigned long env;
++} func_descr_t;
++
++typedef unsigned int umode_t;
++
++#define BITS_TO_LONGS(bits) \
++ (((bits)+BITS_PER_LONG-1)/BITS_PER_LONG)
++#define DECLARE_BITMAP(name,bits) \
++ unsigned long name[BITS_TO_LONGS(bits)]
++#define CLEAR_BITMAP(name,bits) \
++ memset(name, 0, BITS_TO_LONGS(bits)*sizeof(unsigned long))
++
++/* hd/ide ctl's that pass (arg) ptrs to user space are numbered 0x030n/0x031n */
++#define HDIO_GETGEO 0x0301 /* get device geometry */
++
++#define BLKRRPART _IO(0x12,95) /* re-read partition table */
++
++/* ---------- */
++
+ #define hex_val(c) ({ \
+ char _c = (c); \
+ isdigit(_c) ? _c - '0' : \
+@@ -192,10 +250,10 @@ char read_char(char *mesg);
+
+ jmp_buf listingbuf;
+
+-inline unsigned short __swap16(unsigned short x) {
++static inline unsigned short __swap16(unsigned short x) {
+ return (((__u16)(x) & 0xFF) << 8) | (((__u16)(x) & 0xFF00) >> 8);
+ }
+-inline __u32 __swap32(__u32 x) {
++static inline __u32 __swap32(__u32 x) {
+ return (((__u32)(x) & 0xFF) << 24) | (((__u32)(x) & 0xFF00) << 8) | (((__u32)(x) & 0xFF0000) >> 8) | (((__u32)(x) & 0xFF000000) >> 24);
+ }
+
+@@ -1415,7 +1473,7 @@ void try(char *device)
+ }
+ }
+
+-void main(int argc, char **argv)
++int main(int argc, char **argv)
+ {
+ if (argc > 3)
+ fatal(usage);
+diff --git a/fdisk.h b/fdisk.h
+index 2b6ddc8..0a0566d 100644
+--- a/fdisk.h
++++ b/fdisk.h
+@@ -2,6 +2,11 @@
+ fdisk.h
+ */
+
++#ifdef __linux__
++#define _FILE_OFFSET_BITS 64
++#define _LARGE_FILES
++#endif
++
+ #define SECTOR_SIZE 512
+ #define NETBSD_PARTITION 0xa5
+ #define cround(n) (((n) + display_factor * unit_flag) / display_factor)
+diff --git a/fdisklabel.c b/fdisklabel.c
+index 70c3cfa..7622bc2 100644
+--- a/fdisklabel.c
++++ b/fdisklabel.c
+@@ -35,9 +35,14 @@
+ SUCH DAMAGE.
+ */
+
++#ifndef _LARGEFILE64_SOURCE
++#define _LARGEFILE64_SOURCE
++#endif
++#include <sys/types.h>
+ #include <unistd.h>
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
+ #include <fcntl.h>
+ #include <ctype.h>
+ #include <setjmp.h>
+@@ -46,6 +51,8 @@
+ #include <sys/ioctl.h>
+ #include <sys/param.h>
+
++#include <asm/types.h>
++
+ #include "kernel-defs.h"
+
+ #include "fdisk.h"
+@@ -68,7 +75,7 @@ static int bsd_initlabel (struct partition *p, struct disklabel *d, int pindex)
+ static int bsd_readlabel (struct partition *p, struct disklabel *d);
+ static int bsd_writelabel (struct partition *p, struct disklabel *d);
+ static void sync_disks (void);
+-#if defined (i386)
++#if defined (i386) || defined (__amd64)
+ static int bsd_translate_fstype (int linux_type);
+ static void bsd_link_part (void);
+ #endif
+@@ -78,7 +85,7 @@ void alpha_bootblock_checksum (char *boot);
+
+ static struct disklabel bsd_dlabel;
+ static char buffer[BSD_BBSIZE];
+-#if defined (i386)
++#if defined (i386) || defined (__amd64)
+ static struct partition *bsd_part;
+ static int bsd_part_index;
+ #endif
+@@ -95,13 +102,13 @@ bmenu (void)
+ " n add a new BSD partition\n"
+ " p print BSD partition table\n"
+ " q quit without saving changes\n"
+-#if defined (i386)
++#if defined (i386) || defined (__amd64)
+ " r return to main menu\n"
+ #endif
+ " s show complete disklabel\n"
+ " t change a partition's filesystem id\n"
+ " w write disklabel to disk\n"
+-#if defined (i386)
++#if defined (i386) || defined (__amd64)
+ " x link BSD partition to non-BSD partition"
+ #endif
+ );
+@@ -110,7 +117,7 @@ bmenu (void)
+ void
+ bselect (void)
+ {
+-#if defined (i386)
++#if defined (i386) || defined (__amd64)
+ int t;
+
+ for (t=0; t<4; t++)
+@@ -181,7 +188,7 @@ bselect (void)
+ case 'w':
+ bsd_write_disklabel ();
+ break;
+-#if defined (i386)
++#if defined (i386) || defined (__amd64)
+ case 'r':
+ return;
+ case 'x':
+@@ -219,7 +226,7 @@ bsd_new_part (void)
+ if (!bsd_check_new_partition (&i))
+ return;
+
+-#if defined (i386)
++#if defined (i386) || defined (__amd64)
+ begin = bsd_part -> start_sect;
+ end = begin + bsd_part -> nr_sects - 1;
+ #elif defined (__alpha__) || defined (__powerpc__)
+@@ -253,7 +260,7 @@ bsd_print_disklabel (int show_all)
+
+ if (show_all)
+ {
+-#if defined (i386)
++#if defined (i386) || defined (__amd64)
+ fprintf(f, "# %s%d:\n", disk_device, bsd_part_index+1);
+ #elif defined (__alpha__) || defined (__powerpc__)
+ fprintf(f, "# %s:\n", disk_device);
+@@ -262,8 +269,8 @@ bsd_print_disklabel (int show_all)
+ fprintf(f, "type: %s\n", bsd_dktypenames[lp->d_type]);
+ else
+ fprintf(f, "type: %d\n", lp->d_type);
+- fprintf(f, "disk: %.*s\n", sizeof(lp->d_typename), lp->d_typename);
+- fprintf(f, "label: %.*s\n", sizeof(lp->d_packname), lp->d_packname);
++ fprintf(f, "disk: %.*s\n", (int)sizeof(lp->d_typename), lp->d_typename);
++ fprintf(f, "label: %.*s\n", (int)sizeof(lp->d_packname), lp->d_packname);
+ fprintf(f, "flags:");
+ if (lp->d_flags & BSD_D_REMOVABLE)
+ fprintf(f, " removable");
+@@ -272,17 +279,17 @@ bsd_print_disklabel (int show_all)
+ if (lp->d_flags & BSD_D_BADSECT)
+ fprintf(f, " badsect");
+ fprintf(f, "\n");
+- fprintf(f, "bytes/sector: %d\n", lp->d_secsize);
+- fprintf(f, "sectors/track: %d\n", lp->d_nsectors);
+- fprintf(f, "tracks/cylinder: %d\n", lp->d_ntracks);
+- fprintf(f, "sectors/cylinder: %d\n", lp->d_secpercyl);
+- fprintf(f, "cylinders: %d\n", lp->d_ncylinders);
++ fprintf(f, "bytes/sector: %d\n", (int)lp->d_secsize);
++ fprintf(f, "sectors/track: %d\n", (int)lp->d_nsectors);
++ fprintf(f, "tracks/cylinder: %d\n", (int)lp->d_ntracks);
++ fprintf(f, "sectors/cylinder: %d\n", (int)lp->d_secpercyl);
++ fprintf(f, "cylinders: %d\n", (int)lp->d_ncylinders);
+ fprintf(f, "rpm: %d\n", lp->d_rpm);
+ fprintf(f, "interleave: %d\n", lp->d_interleave);
+ fprintf(f, "trackskew: %d\n", lp->d_trackskew);
+ fprintf(f, "cylinderskew: %d\n", lp->d_cylskew);
+- fprintf(f, "headswitch: %d\t\t# milliseconds\n", lp->d_headswitch);
+- fprintf(f, "track-to-track seek: %d\t# milliseconds\n", lp->d_trkseek);
++ fprintf(f, "headswitch: %d\t\t# milliseconds\n", (int)lp->d_headswitch);
++ fprintf(f, "track-to-track seek: %d\t# milliseconds\n", (int)lp->d_trkseek);
+ fprintf(f, "drivedata: ");
+ for (i = NDDATA - 1; i >= 0; i--)
+ if (lp->d_drivedata[i])
+@@ -290,7 +297,7 @@ bsd_print_disklabel (int show_all)
+ if (i < 0)
+ i = 0;
+ for (j = 0; j <= i; j++)
+- fprintf(f, "%d ", lp->d_drivedata[j]);
++ fprintf(f, "%d ", (int)lp->d_drivedata[j]);
+ }
+ fprintf (f, "\n%d partitions:\n", lp->d_npartitions);
+ fprintf (f, "# size offset fstype [fsize bsize cpg]\n");
+@@ -298,7 +305,7 @@ bsd_print_disklabel (int show_all)
+ for (i = 0; i < lp->d_npartitions; i++, pp++) {
+ if (pp->p_size) {
+ fprintf(f, " %c: %8d %8d ", 'a' + i,
+- pp->p_size, pp->p_offset);
++ (int)pp->
This message was truncated. Download the full message here.
E
E
Efraim Flashner wrote on 22 Apr 2021 09:59
[PATCH v2 07/12] gnu: american-fuzzy-lop: Add support for powerpc-linux.
(name . Efraim Flashner)(address . efraim@flashner.co.il)
510e3b7b78c09b57e307ef624e685a8eac31d8a8.1619076704.git.efraim@flashner.co.il
* gnu/packages/debug.scm (american-fuzzy-lop): Add case for
powerpc-linux.
(qemu-for-american-fuzzy-lop): Same.
---
gnu/packages/debug.scm | 2 ++
1 file changed, 2 insertions(+)

This patch is already in master and already merged into core-updates.

Toggle diff (22 lines)
diff --git a/gnu/packages/debug.scm b/gnu/packages/debug.scm
index 2913c348f3..1326ce6e16 100644
--- a/gnu/packages/debug.scm
+++ b/gnu/packages/debug.scm
@@ -179,6 +179,7 @@ tools that process C/C++ code.")
("aarch64-linux" "aarch64")
("armhf-linux" "arm")
("mips64el-linux" "mips64el")
+ ("powerpc-linux" "ppc")
;; Prevent errors when querying this package on unsupported
;; platforms, e.g. when running "guix package --search="
(_ "UNSUPPORTED"))))
@@ -254,6 +255,7 @@ down the road.")
("aarch64-linux" "aarch64")
("armhf-linux" "arm")
("mips64el-linux" "mips64el")
+ ("powerpc-linux" "ppc")
;; Prevent errors when querying this package on unsupported
;; platforms, e.g. when running "guix package --search="
(_ "UNSUPPORTED"))))
--
2.31.1
E
E
Efraim Flashner wrote on 22 Apr 2021 09:59
[PATCH v2 08/12] build: qemu-command: Add support for powerpc.
(name . Efraim Flashner)(address . efraim@flashner.co.il)
88664dc28c05df5ac830d0e76321c1a3051dbb50.1619076704.git.efraim@flashner.co.il
* gnu/build/vm.scm (qemu-command): Add missing case for powerpc.
---
gnu/build/vm.scm | 1 +
1 file changed, 1 insertion(+)

Adjusted at the suggestion of Vincent Legoll to strongly match just
powerpc-linux and not powerpc64le.

Toggle diff (14 lines)
diff --git a/gnu/build/vm.scm b/gnu/build/vm.scm
index 253d9bcd31..88b27adb4f 100644
--- a/gnu/build/vm.scm
+++ b/gnu/build/vm.scm
@@ -75,6 +75,7 @@
(cond
((string-match "^i[3456]86$" cpu) "i386")
((string-match "armhf" cpu) "arm")
+ ((string-match "^powerpc$" cpu) "ppc")
(else cpu)))))
(define* (load-in-linux-vm builder
--
2.31.1
E
E
Efraim Flashner wrote on 22 Apr 2021 09:59
[PATCH v2 09/12] gnu: mercurial: Skip tests on powerpc-linux.
(name . Efraim Flashner)(address . efraim@flashner.co.il)
d16f5020e8e0d80af7e5b0618b4d1ee0628e3ca0.1619076704.git.efraim@flashner.co.il
* gnu/packages/version-control.scm (mercurial)[arguments]: Skip tests on
powerpc-linux.
---
gnu/packages/version-control.scm | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

Unchanged since last patchset, IMO not ready for upstreaming.

Toggle diff (19 lines)
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 4d4b276a10..13e2ccd400 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -1688,7 +1688,11 @@ execution of any hook written in any language before every commit.")
"--slowtimeout" "86400"
;; The test suite takes a long time and produces little
;; output by default. Prevent timeouts due to silence.
- "-v"))))))))
+ "-v"))))))
+ ;; Tests on powerpc-linux take more than 10 hours.
+ #:tests? ,(if (string=? "powerpc-linux" (or (%current-system)
+ (%current-target-system)))
+ '#f '#t)))
;; The following inputs are only needed to run the tests.
(native-inputs
`(("python-nose" ,python-nose)
--
2.31.1
E
E
Efraim Flashner wrote on 22 Apr 2021 09:59
[PATCH v2 10/12] gnu: nss: Skip tests on powerpc-linux.
(name . Efraim Flashner)(address . efraim@flashner.co.il)
182006b22860965075737d4fcc23ea5c6fd863aa.1619076704.git.efraim@flashner.co.il
* gnu/packages/nss.scm (nss)[arguments]: Skip tests on powerpc-linux.
---
gnu/packages/nss.scm | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)

Unchanged since last patchset, IMO not ready for upstreaming.

Toggle diff (27 lines)
diff --git a/gnu/packages/nss.scm b/gnu/packages/nss.scm
index e054363e9f..954a1d3b80 100644
--- a/gnu/packages/nss.scm
+++ b/gnu/packages/nss.scm
@@ -1,7 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2020 Jonathan Brielmaier <jonathan.brielmaier@web.de>
@@ -109,7 +109,10 @@ in the Mozilla clients.")
;; Parallel builds are not supported (see:
;; https://bugzilla.mozilla.org/show_bug.cgi?id=1640328).
`(#:parallel-build? #f
- #:tests? #t ;requires at least one hour to run
+ ;; Tests on powerpc-linux take forever and fail sporatically.
+ #:tests? ,(if (string=? "powerpc-linux" (or (%current-system)
+ (%current-target-system)))
+ '#f '#t)
#:make-flags
(let* ((out (assoc-ref %outputs "out"))
(nspr (string-append (assoc-ref %build-inputs "nspr")))
--
2.31.1
E
E
Efraim Flashner wrote on 22 Apr 2021 09:59
[PATCH v2 11/12] gnu: zstd: Adjust test suite for 32-bit architectures.
(name . Efraim Flashner)(address . efraim@flashner.co.il)
72e63a8ee4f3b9ef3e152009a6e134b8ac51da0e.1619076704.git.efraim@flashner.co.il
* gnu/packages/compression.scm (zstd)[arguments]: Adjust
'fix-tests-32bit phase to work better on low RAM machines.
---
gnu/packages/compression.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Discussed on IRC, ready to go straight to core-updates.

Toggle diff (24 lines)
diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index e28b78a3fa..1941ddd43f 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -7,7 +7,7 @@
;;; Copyright © 2015, 2016, 2017, 2018, 2020 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2015, 2017, 2018 Leo Famulari <leo@famulari.name>
;;; Copyright © 2015 Jeff Mickey <j@codemac.net>
-;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com>
;;; Copyright © 2016 Danny Milosavljevic <dannym@scratchpost.org>
;;; Copyright © 2016–2021 Tobias Geerinckx-Rice <me@tobias.gr>
@@ -1422,7 +1422,7 @@ or junctions, and always follows hard links.")
(lambda _
(substitute* "tests/playTests.sh"
(("roundTripTest -g8M \"19 -T0 --long\"")
- "roundTripTest -g8M \"22 -T0 --long\""))))
+ "roundTripTest -g8M \"16 -T0 --long\""))))
(add-after 'unpack 'remove-bogus-check
(lambda _
;; lib/Makefile falsely claims that no .pc file can be created.
--
2.31.1
E
E
Efraim Flashner wrote on 22 Apr 2021 09:59
[PATCH v2 12/12] gnu: glib: Disable failing test.
(name . Efraim Flashner)(address . efraim@flashner.co.il)
93d85718da0640eacf2e89567105ed42ba893d3c.1619076704.git.efraim@flashner.co.il
* gnu/packages/glib.scm (glib)[source]: Add patch.
[arguments]: Remove custom 'increase-test-timeout phase.
* gnu/packages/patches/glib-skip-failing-test.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
---
gnu/local.mk | 1 +
gnu/packages/glib.scm | 16 +++--------
.../patches/glib-skip-failing-test.patch | 27 +++++++++++++++++++
3 files changed, 31 insertions(+), 13 deletions(-)
create mode 100644 gnu/packages/patches/glib-skip-failing-test.patch

I don't have a way to test this on native armhf or i686 but I tried
changing the test timeout to 30 minutes (from the new default of 180
seconds) and it still timed out / hung forever. This is the minimal
patch to skip that test.

Toggle diff (88 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 7aba045e4b..18fa325503 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1080,6 +1080,7 @@ dist_patch_DATA = \
%D%/packages/patches/ghostscript-no-header-uuid.patch \
%D%/packages/patches/ghostscript-no-header-creationdate.patch \
%D%/packages/patches/glib-appinfo-watch.patch \
+ %D%/packages/patches/glib-skip-failing-test.patch \
%D%/packages/patches/glibc-CVE-2018-11236.patch \
%D%/packages/patches/glibc-CVE-2018-11237.patch \
%D%/packages/patches/glibc-CVE-2019-7309.patch \
diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index 34d2ba4cf4..ede4a06a08 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -3,7 +3,7 @@
;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2021 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2016, 2020 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
;;; Copyright © 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2017 Petter <petter@mykolab.ch>
@@ -187,7 +187,8 @@ shared NFS home directories.")
(sha256
(base32 "1sh3h6b734cxhdd1qlzvhxq6rc7k73dsisap5y3s419s9xc4ywv7"))
(patches
- (search-patches "glib-appinfo-watch.patch"))
+ (search-patches "glib-appinfo-watch.patch"
+ "glib-skip-failing-test.patch"))
(modules '((guix build utils)))
(snippet
'(begin
@@ -203,17 +204,6 @@ shared NFS home directories.")
#:configure-flags '("-Dman=true")
#:phases
(modify-phases %standard-phases
- ;; TODO: Remove the conditional in the next core-updates cycle.
- ;; Needed to build glib on slower ARM nodes.
- ,@(if (string-prefix? "arm" (%current-system))
- `((add-after 'unpack 'increase-test-timeout
- (lambda _
- (substitute* "meson.build"
- (("test_timeout = 60")
- "test_timeout = 90")
- (("test_timeout_slow = 120")
- "test_timeout_slow = 180")))))
- '())
(add-after 'unpack 'disable-failing-tests
(lambda _
(with-directory-excursion "glib/tests"
diff --git a/gnu/packages/patches/glib-skip-failing-test.patch b/gnu/packages/patches/glib-skip-failing-test.patch
new file mode 100644
index 0000000000..c7706aaa74
--- /dev/null
+++ b/gnu/packages/patches/glib-skip-failing-test.patch
@@ -0,0 +1,27 @@
+This test timed out on powerpc-linux even after extending the
+test_timeout_slow to 1800 seconds. Previously we tried to work around
+this test by extending test_timeout_slow by 1.5 its previous value.
+
+---
+ gio/tests/meson.build | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/gio/tests/meson.build b/gio/tests/meson.build
+index a926ae0..4fdbe7a 100644
+--- a/gio/tests/meson.build
++++ b/gio/tests/meson.build
+@@ -317,10 +317,6 @@ if host_machine.system() != 'windows'
+ 'extra_sources' : [extra_sources, gdbus_test_codegen_generated, gdbus_test_codegen_generated_interface_info],
+ 'c_args' : ['-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_32'],
+ },
+- 'gdbus-threading' : {
+- 'extra_sources' : extra_sources,
+- 'suite' : ['slow'],
+- },
+ 'gmenumodel' : {
+ 'extra_sources' : extra_sources,
+ 'suite' : ['slow'],
+
+--
+2.31.1
+
--
2.31.1
M
M
Maxime Devos wrote on 22 Apr 2021 18:41
Re: [bug#47615] [PATCH v2 09/12] gnu: mercurial: Skip tests on powerpc-linux.
5191616abad3114735ab49cc450299ee7603234b.camel@telenet.be
Efraim Flashner schreef op do 22-04-2021 om 10:59 [+0300]:
Toggle quote (23 lines)
> * gnu/packages/version-control.scm (mercurial)[arguments]: Skip tests on
> powerpc-linux.
> ---
> gnu/packages/version-control.scm | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> Unchanged since last patchset, IMO not ready for upstreaming.
>
> diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
> index 4d4b276a10..13e2ccd400 100644
> --- a/gnu/packages/version-control.scm
> +++ b/gnu/packages/version-control.scm
> @@ -1688,7 +1688,11 @@ execution of any hook written in any language before every commit.")
> "--slowtimeout" "86400"
> ;; The test suite takes a long time and produces little
> ;; output by default. Prevent timeouts due to silence.
> - "-v"))))))))
> + "-v"))))))
> + ;; Tests on powerpc-linux take more than 10 hours.
> + #:tests? ,(if (string=? "powerpc-linux" (or (%current-system)
> + (%current-target-system)))
> + '#f '#t)))

You can remove ' in '#f and '#t here.
That shouldn't cause a derivation change.
Keeping ' is harmless though, it's just superfluous.
Likewise for some other commits.

I'm not really familiar with powerpc and the packages you modified,
so I'm just looking at style, and cross-compilation issues (which you seem
to have covered).

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYIGnNRccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7kzYAPwO0oVLatupc7GLouz0M5vbcZcO
6JeLKRu0eAINpZUsWQD9Eqw49oxr5oCjVVKI2918GHTXFdh5sO4fkHvZPkIFUw8=
=gA75
-----END PGP SIGNATURE-----


E
E
Efraim Flashner wrote on 27 Apr 2021 09:01
Re: [bug#47615] [PATCH 3/9] gnu: binutils: Adjust test suite on powerpc-linux.
(name . Chris Marusich)(address . cmmarusich@gmail.com)
YIe2tP+H5uevZT+4@3900XT
On Wed, Apr 21, 2021 at 10:11:48PM -0700, Chris Marusich wrote:
Toggle quote (12 lines)
> Efraim Flashner <efraim@flashner.co.il> writes:
>
> >> If it's a test failure, has the issue been reported upstream?
> >
> > I'll check to see if I can find something upstream. If not I'll report
> > it. FWIW Debian disables the test suite for powerpc.
> > https://sources.debian.org/src/binutils/2.36.1-6/debian/rules/#L537
>
> How significant is the failure, anyway? Are we likely to encounter
> trouble down the line on powerpc if we don't resolve this? I have no
> idea, honestly, so I'm asking because I just don't know.

I submitted the bug upstream. It turns out it was a bug in the test
suite which only showed up on big-endian systems. They've fixed it in
libiberty (in GCC) and I added the patch to binutils on core-updates.
Tests pass on powerpc-linux and x86_64-linux.

It also made this commit much much smaller :)


--
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
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmCHtrMACgkQQarn3Mo9
g1F4Zg//aB/5ygltnhht7rLRmpC6s2/naNNcqTlq/q4B5my9xPcHQTg4atZjc6yt
znRTW9h10hlsZWStrz85AouRU6NFeRUz78KBrl5Hsr1lCSbmPrWsOmFX/fZAIinG
Zx0yLdTHLKA7kT5vOvqDLWoryZY3iv9y9bsxjivg7wgr+UwsXLD4mKtu//LjzUhr
zgFcAnJlHuQ9kXxU/AK7w90G1/DKGsik3025m3JrZKt87xmkBp5sOygy757z94Zf
rbZ9Qm9WM3kmYiTRSOu4tuL+TZ+fxbuF0BpwVZrJ444l64BxmPGuG9MncAobISYQ
DZk9Uke47aSx5jaxszqDLgzjNXLRzBBLHlca1hudJH290aJtpJv0ZF9wsBQXCKpB
hfqTi1LkTAGWQNFNj2B9Pj657WDo5OFCXXqF3OOVAR9hccu45uB/h+mH4chnxaXJ
6FVyeV9bcIvUT/JJPeRSQrfLOKGwG1ds4uVWBu/WLfl4iYXfrkLnjTOH96zLdeVj
smiOZA+fNiyJWqMsAQkJV6ZhURBXdRjlXuSe+UO9c6RJCokZU9yXNbnr6Sz5sfnw
UG0JQGMFh1BMKLR5o6v1/rWApc+3C1Ic2NElCUJbZ9EAYhsS+Cq9yUA3pQvvj4fq
3F+YPzqVSkus/CrIyeEhbgwfarzehxFwxGjerpSbrzUDTNIbz2U=
=RMXu
-----END PGP SIGNATURE-----


E
E
Efraim Flashner wrote on 4 May 2021 17:50
Re: [PATCH v2 00/12] Add 32-bit powerpc support
YJFtWPep391LlU/l@3900XT
I'm going to bump this email again. I feel like it's ready for merging
but I wanted to give everyone another chance to chime in.

--
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
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmCRbVUACgkQQarn3Mo9
g1GiJxAAjz9um6uXCb+YDJaGUV1c0GEpnMsZwl1wmffzXwGY5F6HuqPEKVbTSle7
u5/wagv/v3HXQgFwqm6HrKfeEVPsRu/Xh5xILMZvcd4dNr9zL3up07Rsl+CnqIWk
IpESJaZJl1DZfovtBUyEhNq4cQ9pMTkMHkuXKTJu385ybwMJzMaILA1JCZIQQXbQ
VUhvuD+hbgvq7gKb4QyVrYC3xx+IspX2DZ8VnNpugFllGkb5NP/nFg35gsngtQkb
8de5s2f9rDp9NWZEvyUsEnOCYWinpSqwURl1rlSGcmqoCZkRLMyB+4DuQod8kHku
jBb+M0FeKA7AI/lijAkyoMThgtxed5wbcSK32KrrT8mbAHG+pYsLCgcCLBUEA1k6
MUqg0FVjijAQnCDlC2mrW/sTKHSr/WVGNKhgBG1xtn/X8s+8Hk9A26SD2Jnvjsza
1Boa89YCsRKnd/5b8vC1kdfY5+xrfYDMBfLqC0if/7dGhOoJTRztbIOouy7D8ZcC
Mgj+SlbLgA2cLCPKyxBF0ejcapbLPdyQWNO5Lg6onsi+1r2AXVxYICY8A8TBny0t
zF7BeXDoSOXkeYZvI02m7dHQstBFnc592sDi1641WyxkWCw6kNjDPVy0PhajJ3qC
WS3syxb52HT/NEW+OtscfMQO5fXm34bKzIfRCHPZGHy31WGO1Gs=
=z6XP
-----END PGP SIGNATURE-----


C
C
Chris Marusich wrote on 5 May 2021 03:52
Re: bug#47615: [PATCH 1/9] gnu: bootstrap: Add support for powerpc-linux.
(name . Efraim Flashner)(address . efraim@flashner.co.il)
87wnse0www.fsf@gmail.com
Chris Marusich <cmmarusich@gmail.com> writes:

Toggle quote (7 lines)
> Efraim Flashner <efraim@flashner.co.il> writes:
>
>> On 923bb70a1bff657125c3008f119a477e5cb57c2b
>> gnu:glibc-for-bootstrap: Fix patch.
>>
>> Run
>> ./pre-inst-env guix build --target=powerpc-linux-gnu bootstrap-tarballs
g>>
Toggle quote (17 lines)
>> Producing
>>
>> /gnu/store/dyj1wvayyp1ihaknkxniz1xamcf4yrhl-bootstrap-tarballs-0
>>
>> With guix hash -rx /gnu/store/dyj1wvayyp1ihaknkxniz1xamcf4yrhl-bootstrap-tarballs-0
>>
>> 02xx2ydj28pwv3vflqffinpq1icj09gzi9icm8j4bwc4lca9irxn
>
> Generally speaking, this patch looks fine to me. Just curious, what
> sort of machines does one use for 32-bit powerpc?
>
> I want to build the bootstrap binaries, see if they're reproducible (in
> particular GCC, which I suspect won't be), and verify the hashes.
>
> It might take a few days to do that, but I'll update this thread once
> I've done it.

I repeated Efraim's steps on two different x86_64-linux Guix System
machines. In both cases, it produced exactly the same hash. Therefore,
it would seem these bootstrap binaries are actually reproducible. I was
surprised by this because of my experience with bug 41669. I expected
GCC to not be reproducible, but in this case it seems reproducible.

I wonder what's different? The powerpc64 architecture is 64-bit, and
powerpc is 32-bit, but I wonder what else might be different that could
cause the non-reproducibility to occur only in the powerpc64-linux
case.

Anyway, this is good news for the powerpc-linux port. It is also an
interesting clue for the investigation of bug 41669, but further
discussion about that should go there, not here.

--
Chris
-----BEGIN PGP SIGNATURE-----

iQJJBAEBCAAzFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAmCR+l8VHGNtbWFydXNp
Y2hAZ21haWwuY29tAAoJEN1AmhXYIkad8U0QAMA4tVNoFMQEEUIpQlEQKO+AnKd1
p3Vc8MIqVLMMlu6+81A1UpEXBDXlUoIVEB9WiXnbchhWKlftiOG7pA2xgyPP2OfI
VSA4hlizbc62iGD/cg0qqhrR/pQC8YBdvdfChOGX/LJcmPpNVd8/3Eo1AlDp6Azy
Hhu0UemgYyxGEnYzMpN/PGpoAiHhPdFO7Yt4WIH3gOX5ZuIfmMupCcISxjNfCMZ/
nGM8fvsm0i3+UN7wiVFD0lLFHPxuK/3wmquSKE50/Urii2ULczIVDIJOAI4Wep5y
z+k3RpCUGQ4yNS8NpTjh5/82ck+m0ulqKFD2pJ71661aHrvuLWrVzOWSO7ZkK9hb
cbN5AYsX2qrh+u9s1p36WBTwqaQDMeibdp5jQ6KztmZiGBrScSm5tBqxbbRxMW0O
mvp6ucvukaLq/fWMxSIhI+3V0irj4UmVdC+ipLzCuEa4YiVMyImyXTAUZHHtetpO
pE7AJ/ZYTmLjnAQzRYwmLmBhDuyaxaPh6K6cBWP/dtpbxzX3mxvTznqX1w3T2U1T
tXLR/vrLyNezJu/iiXdLI2fr7nC1xVoh4b04t1FTB6BO78s/1jpLQT6e0cXnvGiE
BenQk42et0pq4g1Dvru0VX7g7ZsODkWmemzneVxixzosrZjzpsRrKe0AhiPM+3rK
hjFP7uNDMvTqChW+
=lRlf
-----END PGP SIGNATURE-----

E
E
Efraim Flashner wrote on 5 May 2021 10:51
(name . Chris Marusich)(address . cmmarusich@gmail.com)
YJJchSOdjdSMluNF@3900XT
On Tue, May 04, 2021 at 06:52:31PM -0700, Chris Marusich wrote:
Toggle quote (43 lines)
> Chris Marusich <cmmarusich@gmail.com> writes:
>
> > Efraim Flashner <efraim@flashner.co.il> writes:
> >
> >> On 923bb70a1bff657125c3008f119a477e5cb57c2b
> >> gnu:glibc-for-bootstrap: Fix patch.
> >>
> >> Run
> >> ./pre-inst-env guix build --target=powerpc-linux-gnu bootstrap-tarballs
> g>>
> >> Producing
> >>
> >> /gnu/store/dyj1wvayyp1ihaknkxniz1xamcf4yrhl-bootstrap-tarballs-0
> >>
> >> With guix hash -rx /gnu/store/dyj1wvayyp1ihaknkxniz1xamcf4yrhl-bootstrap-tarballs-0
> >>
> >> 02xx2ydj28pwv3vflqffinpq1icj09gzi9icm8j4bwc4lca9irxn
> >
> > Generally speaking, this patch looks fine to me. Just curious, what
> > sort of machines does one use for 32-bit powerpc?
> >
> > I want to build the bootstrap binaries, see if they're reproducible (in
> > particular GCC, which I suspect won't be), and verify the hashes.
> >
> > It might take a few days to do that, but I'll update this thread once
> > I've done it.
>
> I repeated Efraim's steps on two different x86_64-linux Guix System
> machines. In both cases, it produced exactly the same hash. Therefore,
> it would seem these bootstrap binaries are actually reproducible. I was
> surprised by this because of my experience with bug 41669. I expected
> GCC to not be reproducible, but in this case it seems reproducible.
>
> I wonder what's different? The powerpc64 architecture is 64-bit, and
> powerpc is 32-bit, but I wonder what else might be different that could
> cause the non-reproducibility to occur only in the powerpc64-linux
> case.
>
> Anyway, this is good news for the powerpc-linux port. It is also an
> interesting clue for the investigation of bug 41669, but further
> discussion about that should go there, not here.
>

In terms of what is more relevant here, IIRC there is some CI code to
build cross toolchain stuff to powerpc-linux-gnu. Is it possible that
you reused some of that? I don't remember exactly from the other bug
report which bits suddenly made the difference. Otherwise I built mine
about 4 months earlier.



--
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
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmCSXIIACgkQQarn3Mo9
g1HWdQ/+IOTO7HyagRxjmniO4xZoMx6XWuIBDwMK8FuF7burcOmRYIGgx77YcZp6
YUIW9uqvXMxXtkKUpYt4fnWy9Rg0zNft+Ge7AxVsKGUxT7AVH9imV2JJjRhJzChR
QG41owIybuHy7A5B7EU8qoxT2XVGC0dZZLQV6/fHcYtHSZMQ8NrkFG8JVDzYfrrh
vywwYtx4eYP0OTjfKQW/TMIYL2MXDYPqNePQ/K04IP7YpZN9y+xVhTBmD0IOooKa
bOasr07VCEB+yXrGKeQCG7uaCS5txNiLt5vYfh1cs4ANaPNJvEnKE5/OsrmuuIuB
iorV6wZN6rztaElggITYlNBBENcI1ERALf8BmCLUCp/jw/W3M6HQ9aIAqoNn4nBs
iAOwjnpgGJ0hj6kpM4JVro9L4RAECIgWCz5M3y5X7o67gX2tlIf5XoQgwkDeeyuG
yJzf13iqdmByRc3Vpvl5DO27h1iNIox6cfOOF5TQPekZHANj4feeYWBVl90QzDIH
QgCqYCRoRWMfq1klNUIy54FMTC0TV48jcN9r7+GvJZjAwirvWUOZB+6fCfZ6qaDv
3n0NSoP+phJ31ihhENGYcIG9O/jbdHPunT/MrRT0uVf6Osry2SeidUJvjbdv9ahS
bfpeKf0+f2Y6kFI23fOuhiKfgldwNHv/Q0wSlzrot/k34cAtn/k=
=ex/J
-----END PGP SIGNATURE-----


L
L
Ludovic Courtès wrote on 6 May 2021 16:38
Re: bug#47615: [PATCH 0/9] Add 32-bit powerpc support
(address . 47615@debbugs.gnu.org)(address . guix-devel@gnu.org)
87wnscdj0x.fsf_-_@gnu.org
Hi Efraim,

Efraim Flashner <efraim@flashner.co.il> skribis:

Toggle quote (2 lines)
> On Sat, Apr 17, 2021 at 06:04:02PM +0200, Ludovic Courtès wrote:

[...]

Toggle quote (20 lines)
>> 3. OTOH, what will be the status of this architecture? I don’t think
>> new 32-bit PPC hardware is being made (right?), so I guess we
>> probably won’t have substitutes for that architecture. That means
>> it won’t be supported at the same level as other architectures and
>> may quickly suffer from bitrot.
>
> I don't know about new 32-bit powerpc hardware, I think it's only being
> newly created for the embedded and networking space. As far as operating
> systems with support¹ Adélie Linux is the only one I know that's
> actually targeting the machines.
>
> I found that emulation on my desktop (Ryzen 3900XT, 24 threads) is
> faster than building on native hardware (1 core, 1.5GB of RAM, original
> 4200 RPM disk), edging it out on single threaded compiling and doing
> great when it comes to using multiple cores and parallel builds.
> Ignoring how to create an OS image if we just targeted, say, mesa and
> maybe one or two other packages, we could have a core set which doesn't
> change regularly and won't take up too much emulated build time but will
> save days of compile time.

[...]

Toggle quote (4 lines)
> The fear of bit-rot is real and I think we should mention in the manual
> (when I actually write the section) that support is best-effort with
> minimal substitutes.

I feel like “best-effort with minimal substitutes” is already more than
I’d be willing to commit to as a maintainer.

We just added POWER9, for which we have actual hardware, and even
getting to this minimal state where we provide a binary tarball required
quite some effort.

Doing the same with 32-bit PowerPC would require us to set up emulation;
we wouldn’t even have real hardware.

All in all, my preference would be to take the patches but not mention
PowerPC 32-bit support anywhere, or at least, not provide substitutes
and binary installation tarball. IOW, few people would know whether it
actually works :-) but tinkerers could still play with it.

WDYT?

Ludo’.
L
L
Ludovic Courtès wrote on 6 May 2021 16:45
(name . Efraim Flashner)(address . efraim@flashner.co.il)
87pmy3ex9x.fsf_-_@gnu.org
Efraim Flashner <efraim@flashner.co.il> skribis:

Toggle quote (3 lines)
> * gnu/packages/guile.scm (guile-3.0)[arguments]: On powerpc add two
> phases to adjust for 32-bit big-endian systems.

[...]

Toggle quote (5 lines)
> + (add-after 'unpack 'adjust-bootstrap-flags
> + (lambda _
> + ;; Upstream knows about suggested solution.
> + ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=45214

The first comment line should preferably mention the problem, like:

;; Change optimization flags to work around crash on
;; 32-bit big-endian architectures: https://bugs.gnu.org/45214.

Toggle quote (8 lines)
> + (substitute* "bootstrap/Makefile.in"
> + (("^GUILE_OPTIMIZATIONS.*")
> + "GUILE_OPTIMIZATIONS = -O1 -Oresolve-primitives -Ocps\n"))))
> + (add-after 'unpack 'remove-failing-tests
> + (lambda _
> + ;; TODO: Discover why this test fails on powerpc-linux
> + (delete-file "test-suite/standalone/test-out-of-memory"))))))

I’m surprised removing the executable works. See
‘guile-2.2-skip-oom-test.patch’.

Ludo’.
L
L
Ludovic Courtès wrote on 6 May 2021 16:48
(name . Efraim Flashner)(address . efraim@flashner.co.il)
87lf8rex5i.fsf_-_@gnu.org
Efraim Flashner <efraim@flashner.co.il> skribis:

Toggle quote (5 lines)
> * gnu/packages/disk.scm (mac-fdisk): New variable.
> * gnu/packages/patches/mac-fdisk-gentoo-patchset.patch,
> gnu/packages/patches/mac-fdisk-p18.patch: New files.
> * gnu/local.mk (dist_patch_DATA): Register them.

[...]

Toggle quote (5 lines)
> +++ b/gnu/packages/patches/mac-fdisk-gentoo-patchset.patch
> @@ -0,0 +1,866 @@
> +https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-fs/mac-fdisk/files


[...]

Toggle quote (5 lines)
> +++ b/gnu/packages/patches/mac-fdisk-p18.patch
> @@ -0,0 +1,2070 @@
> +This is the result of unzipping the 0.1-18 diff.gz
> +https://cdn-aws.deb.debian.org/debian/pool/main/m/mac-fdisk/mac-fdisk_0.1-18.diff.gz

Given the size of these patches, please add a couple of sentences
explaining what they do.

It would be best if we could refer to a fork instead of carrying those
patches, though.

Ludo’.
L
L
Ludovic Courtès wrote on 6 May 2021 16:51
(name . Maxime Devos)(address . maximedevos@telenet.be)
87h7jfewzm.fsf_-_@gnu.org
Maxime Devos <maximedevos@telenet.be> skribis:

Toggle quote (26 lines)
> Efraim Flashner schreef op do 22-04-2021 om 10:59 [+0300]:
>> * gnu/packages/version-control.scm (mercurial)[arguments]: Skip tests on
>> powerpc-linux.
>> ---
>> gnu/packages/version-control.scm | 6 +++++-
>> 1 file changed, 5 insertions(+), 1 deletion(-)
>>
>> Unchanged since last patchset, IMO not ready for upstreaming.
>>
>> diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
>> index 4d4b276a10..13e2ccd400 100644
>> --- a/gnu/packages/version-control.scm
>> +++ b/gnu/packages/version-control.scm
>> @@ -1688,7 +1688,11 @@ execution of any hook written in any language before every commit.")
>> "--slowtimeout" "86400"
>> ;; The test suite takes a long time and produces little
>> ;; output by default. Prevent timeouts due to silence.
>> - "-v"))))))))
>> + "-v"))))))
>> + ;; Tests on powerpc-linux take more than 10 hours.
>> + #:tests? ,(if (string=? "powerpc-linux" (or (%current-system)
>> + (%current-target-system)))
>> + '#f '#t)))
>
> You can remove ' in '#f and '#t here.

You can even write:

#:tests? (not (string-prefix? "powerpc-" (or …)))

Note: use ‘string-prefix?’ because ‘%current-target-system’ returns a
triplet, not a “system type”.

Ludo’.
E
E
Efraim Flashner wrote on 6 May 2021 17:48
(name . Ludovic Courtès)(address . ludo@gnu.org)
YJQP0JFw0acXvZI+@3900XT
On Thu, May 06, 2021 at 04:48:09PM +0200, Ludovic Courtès wrote:
Toggle quote (29 lines)
> Efraim Flashner <efraim@flashner.co.il> skribis:
>
> > * gnu/packages/disk.scm (mac-fdisk): New variable.
> > * gnu/packages/patches/mac-fdisk-gentoo-patchset.patch,
> > gnu/packages/patches/mac-fdisk-p18.patch: New files.
> > * gnu/local.mk (dist_patch_DATA): Register them.
>
> [...]
>
> > +++ b/gnu/packages/patches/mac-fdisk-gentoo-patchset.patch
> > @@ -0,0 +1,866 @@
> > +https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-fs/mac-fdisk/files
>
>
> [...]
>
> > +++ b/gnu/packages/patches/mac-fdisk-p18.patch
> > @@ -0,0 +1,2070 @@
> > +This is the result of unzipping the 0.1-18 diff.gz
> > +https://cdn-aws.deb.debian.org/debian/pool/main/m/mac-fdisk/mac-fdisk_0.1-18.diff.gz
>
> Given the size of these patches, please add a couple of sentences
> explaining what they do.
>
> It would be best if we could refer to a fork instead of carrying those
> patches, though.
>
> Ludo’.

I think I'm going to sit on the mac-fdisk package for a while. It would
be good to cut down the patches a bit. And I have to actually test it at
some point.

--
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
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmCUD80ACgkQQarn3Mo9
g1G1IA/+PvXAPqUAsY+NKEnqLTWGTovDPE3dSnndqMpNs6aGt6exiu6i1hUap49t
AYV+I0Qsj90LzoYIdhqf3EyKfJlBukRSsuA9yo0aaioRYBBbnC5ozI7qtcnkYZIw
GCpm36WXNOkjWEgctVre7vkuOhc7IPRiOw8ijIwVP13kVjFst50PpPSo+bFwiOhr
1c9PjfFYhDAupKVdMP7fP/c2vzKIHVBNBMWWqYFlkjSnTotik96q3Ql7PhIIcR1P
RM1PmdeyKPVrkg74scx6bdB+1OlEcNZv4ZGgWbCYH0OwWQfrrp2bnEHflxkgBZDA
ryaeb9rY34trVLfvxn8nf7IW+1Dz/Qk8l8MVF84WMtfi1j1sv6GXneaH+PyTS6++
gTUc+tC7fyxh12yJGOTnvV9y0DUBfOkdxkjmSMBUdTHX89QaSK2uuOq23eggINSo
cnfJcpuv8k6qoCk/cHKCRd/1KD7D2rsgkRBxornWrQ2erET4q1nwpCdFr3vkflCI
peJqZVqesfwa6Cr+dIikScNUnWqy4jQ1ftMNpsiSURaAJ+hjzn3JB/lCz7y7bJTm
4TLK5J9Kj4nDAwAPdolUfbx10Xly2xReAFv81HO0djH0QqrQHN9MkrIPQOKFFiN2
BJChVYpYykvbUVaRO+tt/3FHFGVa+HOA6dfkW6R+FA+RVbirDe8=
=fqJ7
-----END PGP SIGNATURE-----


L
L
Ludovic Courtès wrote on 6 May 2021 18:35
Re: bug#47615: [PATCH 1/9] gnu: bootstrap: Add support for powerpc-linux.
(name . Chris Marusich)(address . cmmarusich@gmail.com)
87y2crddmr.fsf@gnu.org
Hi Chris,

Chris Marusich <cmmarusich@gmail.com> skribis:

Toggle quote (31 lines)
> Chris Marusich <cmmarusich@gmail.com> writes:
>
>> Efraim Flashner <efraim@flashner.co.il> writes:
>>
>>> On 923bb70a1bff657125c3008f119a477e5cb57c2b
>>> gnu:glibc-for-bootstrap: Fix patch.
>>>
>>> Run
>>> ./pre-inst-env guix build --target=powerpc-linux-gnu bootstrap-tarballs
> g>>
>>> Producing
>>>
>>> /gnu/store/dyj1wvayyp1ihaknkxniz1xamcf4yrhl-bootstrap-tarballs-0
>>>
>>> With guix hash -rx /gnu/store/dyj1wvayyp1ihaknkxniz1xamcf4yrhl-bootstrap-tarballs-0
>>>
>>> 02xx2ydj28pwv3vflqffinpq1icj09gzi9icm8j4bwc4lca9irxn
>>
>> Generally speaking, this patch looks fine to me. Just curious, what
>> sort of machines does one use for 32-bit powerpc?
>>
>> I want to build the bootstrap binaries, see if they're reproducible (in
>> particular GCC, which I suspect won't be), and verify the hashes.
>>
>> It might take a few days to do that, but I'll update this thread once
>> I've done it.
>
> I repeated Efraim's steps on two different x86_64-linux Guix System
> machines. In both cases, it produced exactly the same hash. Therefore,
> it would seem these bootstrap binaries are actually reproducible.

This is great news, thanks for checking!

With this, we can be more confident uploading the binary seeds to
ftp.gnu.org.

Toggle quote (4 lines)
> I was surprised by this because of my experience with bug 41669. I
> expected GCC to not be reproducible, but in this case it seems
> reproducible.

Yes, that’s weird, but it’s better this way. :-)

Thanks,
Ludo’.
E
E
Efraim Flashner wrote on 10 May 2021 10:01
Re: bug#47615: [PATCH 0/9] Add 32-bit powerpc support
(name . Ludovic Courtès)(address . ludo@gnu.org)
YJjoRwDO8Wk31T/g@3900XT
On Thu, May 06, 2021 at 04:45:30PM +0200, Ludovic Courtès wrote:
Toggle quote (28 lines)
> Efraim Flashner <efraim@flashner.co.il> skribis:
>
> > * gnu/packages/guile.scm (guile-3.0)[arguments]: On powerpc add two
> > phases to adjust for 32-bit big-endian systems.
>
> [...]
>
> > + (add-after 'unpack 'adjust-bootstrap-flags
> > + (lambda _
> > + ;; Upstream knows about suggested solution.
> > + ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=45214
>
> The first comment line should preferably mention the problem, like:
>
> ;; Change optimization flags to work around crash on
> ;; 32-bit big-endian architectures: <https://bugs.gnu.org/45214>.
>
> > + (substitute* "bootstrap/Makefile.in"
> > + (("^GUILE_OPTIMIZATIONS.*")
> > + "GUILE_OPTIMIZATIONS = -O1 -Oresolve-primitives -Ocps\n"))))
> > + (add-after 'unpack 'remove-failing-tests
> > + (lambda _
> > + ;; TODO: Discover why this test fails on powerpc-linux
> > + (delete-file "test-suite/standalone/test-out-of-memory"))))))
>
> I’m surprised removing the executable works. See
> ‘guile-2.2-skip-oom-test.patch’.

I took another look at it and I'm building 3.0.5 again but with
the 'remove-failing-tests phase removed. We'll find out in about 42
hours if it's needed or not.

--
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
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmCY6EcACgkQQarn3Mo9
g1Ep0xAAkD0x8q9tAoY5Ag7na/DUM8NmmJf7b1Tpo3/FV1Vhbdvq5jrjUfZM5vab
WIV2ce46QvCl4vBuejOosNlXiId0CJ3Ffyr1EVt6k7XCPfLhOTRXNKAKnfppO8+T
jBLDkwfnNO39NUggVM3hjnYsG53XdZ6wosfahrkIizZZZGHphhzjsJVCD21k7O7O
exII5FzbvnMvKa2mwLO3owwd7iF33vqDR6A25AtDSjVrYpmEOU4CwSlT28jKeoi4
/y8rOGT0G7W5I/99BUpchs0O0sSUbK1daoBaPio1C3L1QRPkuklwyDoq6LT0xKcD
Npy9VqEBj1DnBqYr33RpBQ6uIQyYM6qB+EBK51VJqKFrQj/B4P0GKDcvbt31490y
woFRB5odgnf06tuXuciyKRWoW4R1+ljf1B8LiUE1c4kAnOQp5gmVE/gYHQuHk16z
MCt59xKLQ71gkjm+b8+/890zV+YtdPeujXZ08AmAmWTGxIGCqeAZAZQqoaAlpXSh
2Rwa+ThcoeTN2dupN39Vn3ossGgxW9vjGQCER1pW7V4/ujHmBvlhR33pS6RuM+IW
CK/fGJOo5pT9H4RiTAg/aG/unEPQenIpXPmf3BCH8HaFKdo7XQhdvas8k+IrKDDN
GIq9iCVtweQOER2bhWPhSq/1suuFhphwt0pH5qQZfCbISBdaYng=
=p5M+
-----END PGP SIGNATURE-----


E
E
Efraim Flashner wrote on 10 May 2021 10:20
(name . Ludovic Courtès)(address . ludo@gnu.org)
YJjsukej0MunMOe2@3900XT
On Thu, May 06, 2021 at 04:38:38PM +0200, Ludovic Courtès wrote:
Toggle quote (37 lines)
> Hi Efraim,
>
> Efraim Flashner <efraim@flashner.co.il> skribis:
>
> > On Sat, Apr 17, 2021 at 06:04:02PM +0200, Ludovic Courtès wrote:
>
> [...]
>
> >> 3. OTOH, what will be the status of this architecture? I don’t think
> >> new 32-bit PPC hardware is being made (right?), so I guess we
> >> probably won’t have substitutes for that architecture. That means
> >> it won’t be supported at the same level as other architectures and
> >> may quickly suffer from bitrot.
> >
> > I don't know about new 32-bit powerpc hardware, I think it's only being
> > newly created for the embedded and networking space. As far as operating
> > systems with support¹ Adélie Linux is the only one I know that's
> > actually targeting the machines.
> >
> > I found that emulation on my desktop (Ryzen 3900XT, 24 threads) is
> > faster than building on native hardware (1 core, 1.5GB of RAM, original
> > 4200 RPM disk), edging it out on single threaded compiling and doing
> > great when it comes to using multiple cores and parallel builds.
> > Ignoring how to create an OS image if we just targeted, say, mesa and
> > maybe one or two other packages, we could have a core set which doesn't
> > change regularly and won't take up too much emulated build time but will
> > save days of compile time.
>
> [...]
>
> > The fear of bit-rot is real and I think we should mention in the manual
> > (when I actually write the section) that support is best-effort with
> > minimal substitutes.
>
> I feel like “best-effort with minimal substitutes” is already more than
> I’d be willing to commit to as a maintainer.

I have also learned that 'best effort' is a grey area in other circles;
does it mean you'll move mountains and spare no expense (The Best
Effort!™) or that you'll give it a shot but make no promises. I
definitely meant the second.

Toggle quote (16 lines)
> We just added POWER9, for which we have actual hardware, and even
> getting to this minimal state where we provide a binary tarball required
> quite some effort.
>
> Doing the same with 32-bit PowerPC would require us to set up emulation;
> we wouldn’t even have real hardware.
>
> All in all, my preference would be to take the patches but not mention
> PowerPC 32-bit support anywhere, or at least, not provide substitutes
> and binary installation tarball. IOW, few people would know whether it
> actually works :-) but tinkerers could still play with it.
>
> WDYT?
>
> Ludo’.

How about changing the mips64el documentation to say that there is
minimal support for the two architectures, with no substitutes, and may
be fun for tinkerers with the hardware. Then we could also change the
check in the guix.m4 to add mips64el-linux as supported in case anyone
does actually want to play with it.

Current text:

@item mips64el-linux (deprecated)¬
little-endian 64-bit MIPS processors, specifically the Loongson series,
n32 ABI, and Linux-Libre kernel. This configuration is no longer fully
supported; in particular, there is no ongoing work to ensure that this
architecture still works. Should someone decide they wish to revive this
architecture then the code is still available.

Proposed text:

@item Alternative architectures
In addition to architectures which are actually supported there are a
few formally unsupported architectures which may be of interested to
tinkerers. Namely mips64el-linux, little-endian 64-bit MIPS processors,
specifically the Loongson series, n32 ABI, and powerpc-linux, big-endian
32-bit POWER processors, specifically the PowerPC 74xx series. There are
no installation tarballs, substitutes or promises that these
architectures are functional.

And then I'd move it lower than the powerpc64le-linux entry.


--
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
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmCY7LcACgkQQarn3Mo9
g1HkoQ//YjjzjmOACwMIhM8dnpsOogCvN5l7q93nUal3SiQmqdVX1EzjQedVbdOF
go8arQtauh8tPuhNCS0MeNN+khUalWsiiz4j8TfC/sDs4L6SwN8cfiqUZC42Ax8e
hsy1E8y+rjKhe26+zagaHrZeoGoNTft3vXwSjNusmn6x9aG8wVsvOsjEwYfauxdd
en5RKWsVuLL523RGKPFA20w/0W52yneYaBj6UeljTP3xBgoyV6kDMay+fCDHk2oj
GdmPI7p1Rrs8Pbxh+6h6xhH1v/8EBkHrOx6+RIPUyjqhuyKtNIFz0IJ5aIPdc9dG
ahxk8TfiPnfORu7qXlAKz1E8OJAb03S87qsVnwHww0TsKUqB4/XFY0SyMOIxqoJP
aycFoGCQWWPYVTNYxtJtsCn9cFRIdzD+uuoGEfDHlkIXOXIdMEBewWqmmV1Ncye8
5pEHPSeP59q6r+FUilwSBZpz+gNRL8QBRubdSyrSE6wHd8jqcv1ExzBmeTjXz9KR
2wL7/ezK+xTxeYMHFog97cGpxkpPymSXlT0Fv8wbM5XSQqg7QdO3cbyd0pvBtsYF
xBhkVo+fLFharWE5LrB6yYeTEqg21Nik3fOgsLCjgmZJtIeRhM6lFyK+pD7Sts5E
6lme8KifntMv2yuABikO85Joi7qJyzRWQpq21cvbBSQDmxOFFd0=
=jmpg
-----END PGP SIGNATURE-----


L
L
Ludovic Courtès wrote on 11 May 2021 22:24
(address . 47615@debbugs.gnu.org)(address . guix-devel@gnu.org)
87y2clvx24.fsf@gnu.org
Hi!

Efraim Flashner <efraim@flashner.co.il> skribis:

Toggle quote (6 lines)
> How about changing the mips64el documentation to say that there is
> minimal support for the two architectures, with no substitutes, and may
> be fun for tinkerers with the hardware. Then we could also change the
> check in the guix.m4 to add mips64el-linux as supported in case anyone
> does actually want to play with it.

No, not as “supported”, I surely don’t want to deal with mips64el-linux
bugs. :-)

Toggle quote (22 lines)
> Current text:
>
> @item mips64el-linux (deprecated)¬
> little-endian 64-bit MIPS processors, specifically the Loongson series,
> n32 ABI, and Linux-Libre kernel. This configuration is no longer fully
> supported; in particular, there is no ongoing work to ensure that this
> architecture still works. Should someone decide they wish to revive this
> architecture then the code is still available.
>
> Proposed text:
>
> @item Alternative architectures
> In addition to architectures which are actually supported there are a
> few formally unsupported architectures which may be of interested to
> tinkerers. Namely mips64el-linux, little-endian 64-bit MIPS processors,
> specifically the Loongson series, n32 ABI, and powerpc-linux, big-endian
> 32-bit POWER processors, specifically the PowerPC 74xx series. There are
> no installation tarballs, substitutes or promises that these
> architectures are functional.
>
> And then I'd move it lower than the powerpc64le-linux entry.

Maybe it’s more readable to keep it as a bullet list, like:

@item mips64el-linux (@emph{unsupported})

@item powerpc-linux (@emph{unsupported})

with a sentence explaining what “unsupported” means.

IMO guix.m4 should either require --with-courage or emit a prominent
warning for these.

WDYT?

Thanks,
Ludo’.
E
E
Efraim Flashner wrote on 24 May 2021 11:51
(name . Ludovic Courtès)(address . ludo@gnu.org)
YKt3CgbXVXUlKSZh@3900XT
On Tue, May 11, 2021 at 10:24:03PM +0200, Ludovic Courtès wrote:
Toggle quote (36 lines)
> Hi!
>
> Efraim Flashner <efraim@flashner.co.il> skribis:
>
> > How about changing the mips64el documentation to say that there is
> > minimal support for the two architectures, with no substitutes, and may
> > be fun for tinkerers with the hardware. Then we could also change the
> > check in the guix.m4 to add mips64el-linux as supported in case anyone
> > does actually want to play with it.
>
> No, not as “supported”, I surely don’t want to deal with mips64el-linux
> bugs. :-)
>
> > Current text:
> >
> > @item mips64el-linux (deprecated)¬
> > little-endian 64-bit MIPS processors, specifically the Loongson series,
> > n32 ABI, and Linux-Libre kernel. This configuration is no longer fully
> > supported; in particular, there is no ongoing work to ensure that this
> > architecture still works. Should someone decide they wish to revive this
> > architecture then the code is still available.
> >
> > Proposed text:
> >
> > @item Alternative architectures
> > In addition to architectures which are actually supported there are a
> > few formally unsupported architectures which may be of interested to
> > tinkerers. Namely mips64el-linux, little-endian 64-bit MIPS processors,
> > specifically the Loongson series, n32 ABI, and powerpc-linux, big-endian
> > 32-bit POWER processors, specifically the PowerPC 74xx series. There are
> > no installation tarballs, substitutes or promises that these
> > architectures are functional.
> >
> > And then I'd move it lower than the powerpc64le-linux entry.
>

Ah, I didn't see your email.

Toggle quote (10 lines)
> Maybe it’s more readable to keep it as a bullet list, like:
>
> @item mips64el-linux (@emph{unsupported})
> …
>
> @item powerpc-linux (@emph{unsupported})
> …
>
> with a sentence explaining what “unsupported” means.

That was kind-of my idea with grouping them together

Toggle quote (9 lines)
> IMO guix.m4 should either require --with-courage or emit a prominent
> warning for these.
>
> WDYT?
>
> Thanks,
> Ludo’.
>

The problem then becomes whoever tinkers with it will have to keep
either a custom guix.m4 for their guix package or a custom guix package
with "--with-courage" as a configure-flag.


--
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
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmCrdwcACgkQQarn3Mo9
g1EJCg//ULtWMQ/menADSK4L37jdKJK26at1CHgEH+hRyEeI675wYLM6JkQiCXBt
cNiE0D/eZKk+Yo+B/cbuAHQve8M2mxMwNuGxTFrKJnbQlAvT2DzzfiLAPgTSvD2a
PLXzPPA/rChPYK6oZyqHBIs47wRHVBj39PzfZpNJbYyIiXZbN6lHBlFOHbVAoQ31
jvS8CXpWJL2x47IkY77qfIWgpNGRJWRpOiyV2XXoWHnG03dsjNoCfzOgq9ryZCfy
UfIYnOBm3yvaKBYBHmXTSoi9fg/d+xpiQuLkJWyAFlixfhhefO+/zW5c1C+LU/6o
sOnxF4/USCCraPLspcVfY7hFf7rap2XfuK+SypKM8sFX8aNdvRjyPEjUNdoPewC3
NxydEvR6KvfKoCDwLR9HPQ5XAecWJK7PFuhpy2EW3KnGWw1aYzvLGu6fuDUe7Hrk
A6oXg0C2HprKlaI7O15F6SpneH0dYvaIrTPo35ynyvKTGn+H2NG5RmOPckaIzOj/
IH14pNrh2fTjW03+KUM59HiKz7U7ft+IwM7RlkOeLiiZUptkjoaG3MQmfv/AJQrY
X6X+OeXEadAKnuVKYmlCal4aJKswLC11/cC2EADg6oVB+PQ0bJsD0uI/TVrkSk/t
0JkC4oniB4GxDSWMEU9hfzCVzy6egjRV4lmc2H7hTWLNb9OXuEQ=
=oQIf
-----END PGP SIGNATURE-----


E
E
Efraim Flashner wrote on 24 May 2021 11:54
Re: [PATCH 0/9] Add 32-bit powerpc support
(address . 47615-done@debbugs.gnu.org)
YKt3vEtJ4W5LgGFJ@3900XT
First few patches pushed. I'm still working on getting guile-3.0.7 to
pass its test suite and then I'll push that patch too.

Thanks everyone for the support!

--
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
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmCrd7wACgkQQarn3Mo9
g1FMGg//R02KxyzcWlTZsae8qRYyU2/ccsxtsBA24FtvkHeEiPq93DgjJc/BKdhF
mpaDdUKRQmMhH8AgqbIZEZIAjWiwP7V1s9bWLndcmVuUgOfKFt+gfwSUAluMyy93
6Qjx06xGnYIxywzZFJ+JT+nZl1DaV1oIeNKThXWNiNwK+hcvTdhxrQoK7Qd3Nj7d
tW1IahVcBQ6rKLe94NvFPxit84h0+gw/kg9Q5mbjrj8QeRJ3V8G77Jy8iFb6kSFM
MzbZPCLZXxqRJFDb59E9aZji/s4XlbQP/3F1elnUkG8D8Be5MOTObBTyNNTYicM4
H+LWYCRKkscnV3+cC7ISoBUG46P6dtVRkKDWlgemtNEYDmDs8WtyTTOymjay6ZpO
UQdrraMeIbEa/YsVR6GQscJYMblFiyQ2RFruw0ORS1xVLoJw16wKczlpmm1jhwbI
cw5myp9ZqXUW4bbyk3ltZ8avJGscBSdEmrW4mcFOVioYE4c9D8lydR6D3vA4pBKk
YnaF9s1JDWFfT/wFuskQ/n+PRk91zY+VKXCypgWoxWnUz/0sIPsIZftFczvoH5Er
DKFNzOg84DBepFwEgLt3KUUUKLuOe98YLx46q64gnENjRLi8tXpKaCvJL4CdIR0l
4OXPZBogU5FfcHfBaaAkQUJEoDbthhfN2Ttq0LqYqyLK0vjpUi4=
=IFgt
-----END PGP SIGNATURE-----


Closed
L
L
Ludovic Courtès wrote on 26 May 2021 16:09
Re: bug#47615: [PATCH 0/9] Add 32-bit powerpc support
(address . 47615@debbugs.gnu.org)(address . guix-devel@gnu.org)
87im35twme.fsf@gnu.org
Hi,

Efraim Flashner <efraim@flashner.co.il> skribis:

Toggle quote (2 lines)
> On Tue, May 11, 2021 at 10:24:03PM +0200, Ludovic Courtès wrote:

[...]

Toggle quote (12 lines)
>> Maybe it’s more readable to keep it as a bullet list, like:
>>
>> @item mips64el-linux (@emph{unsupported})
>> …
>>
>> @item powerpc-linux (@emph{unsupported})
>> …
>>
>> with a sentence explaining what “unsupported” means.
>
> That was kind-of my idea with grouping them together

Yes, but people who just skim through that page may just see that
‘powerpc-linux’ is listed, without noticing that there’s a sentence ten
line above that says “The following arches are not supported”. Having
“unsupported” next to it should avoid that (yes, I’ve learned to be
super cautious. :-)).

Toggle quote (3 lines)
>> IMO guix.m4 should either require --with-courage or emit a prominent
>> warning for these.

[...]

Toggle quote (4 lines)
> The problem then becomes whoever tinkers with it will have to keep
> either a custom guix.m4 for their guix package or a custom guix package
> with "--with-courage" as a configure-flag.

True. In that case, let it go without ‘--with-courage’ but emit a
warning with AC_MSG_WARN that points to the relevant section of the
manual.

Deal?

Thanks!

Ludo’.
?