From: Chris Marusich <cmmarusich@gmail.com>
To: Efraim Flashner <efraim@flashner.co.il>
Cc: guix-devel@gnu.org, 47615@debbugs.gnu.org
Subject: Re: bug#47615: [PATCH 0/9] Add 32-bit powerpc support
Date: Sat, 17 Apr 2021 12:51:01 -0700 [thread overview]
Message-ID: <8735vo1yhm.fsf_-_@gmail.com> (raw)
In-Reply-To: <cff09d1a4d4201f5568bccfaad96fb624a1f4165.1617711307.git.efraim@flashner.co.il> (Efraim Flashner's message of "Tue, 6 Apr 2021 15:32:47 +0300")
[-- Attachment #1: Type: text/plain, Size: 6963 bytes --]
Efraim Flashner <efraim@flashner.co.il> writes:
> * 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.
> 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?
> (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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]
next prev parent reply other threads:[~2021-04-17 19:51 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-06 12:24 [bug#47615] [PATCH 0/9] Add 32-bit powerpc support Efraim Flashner
2021-04-06 12:32 ` [bug#47615] [PATCH 1/9] gnu: bootstrap: Add support for powerpc-linux Efraim Flashner
2021-04-14 3:51 ` bug#47615: " Chris Marusich
2021-04-14 7:36 ` Vincent Legoll
2021-04-14 13:56 ` [bug#47615] " Efraim Flashner
2021-05-05 1:52 ` bug#47615: " Chris Marusich
2021-05-05 8:51 ` Efraim Flashner
2021-05-06 16:35 ` Ludovic Courtès
2021-04-06 12:32 ` [bug#47615] [PATCH 2/9] gnu: guile-3.0: Fix building on powerpc-linux Efraim Flashner
2021-04-14 4:00 ` bug#47615: " Chris Marusich
2021-04-14 14:00 ` Efraim Flashner
2021-04-06 12:32 ` [bug#47615] [PATCH 3/9] gnu: binutils: Adjust test suite " Efraim Flashner
2021-04-17 19:51 ` Chris Marusich [this message]
2021-04-17 20:02 ` bug#47615: " Chris Marusich
2021-04-18 9:23 ` bug#47615: [PATCH 0/9] Add 32-bit powerpc support Efraim Flashner
2021-04-22 5:11 ` bug#47615: [PATCH 3/9] gnu: binutils: Adjust test suite on powerpc-linux Chris Marusich
2021-04-27 7:01 ` [bug#47615] " Efraim Flashner
2021-04-06 12:32 ` [bug#47615] [PATCH 4/9] gnu: mesa: Add support for powerpc-linux Efraim Flashner
2021-04-06 19:29 ` Efraim Flashner
2021-04-06 12:32 ` [PATCH 5/9] gnu: Add mac-fdisk Efraim Flashner
2021-04-06 12:32 ` [bug#47615] [PATCH 6/9] gnu: american-fuzzy-lop: Add support for powerpc-linux Efraim Flashner
2021-04-14 3:25 ` bug#47615: [PATCH 0/9] Add 32-bit powerpc support Chris Marusich
2021-04-06 12:32 ` [bug#47615] [PATCH 7/9] build: qemu-command: Add support for powerpc Efraim Flashner
2021-04-06 17:02 ` Vincent Legoll
2021-04-06 19:17 ` Efraim Flashner
2021-04-06 22:27 ` Vincent Legoll
2021-04-06 12:32 ` [PATCH 8/9] gnu: mercurial: Skip tests on powerpc-linux Efraim Flashner
2021-04-06 12:32 ` [bug#47615] [PATCH 9/9] gnu: nss: " Efraim Flashner
2021-04-06 17:00 ` Vincent Legoll
2021-04-06 19:18 ` Efraim Flashner
2021-04-06 22:31 ` Vincent Legoll
2021-04-07 20:33 ` [PATCH 0/9] Add 32-bit powerpc support Vincent Legoll
2021-04-08 7:00 ` Efraim Flashner
2021-04-17 16:04 ` Ludovic Courtès
2021-04-17 16:51 ` Vincent Legoll
2021-04-17 19:42 ` Efraim Flashner
2021-04-17 20:07 ` Vincent Legoll
2021-05-06 14:38 ` bug#47615: " Ludovic Courtès
2021-05-10 8:20 ` Efraim Flashner
2021-05-11 20:24 ` Ludovic Courtès
2021-05-24 9:51 ` Efraim Flashner
2021-05-26 14:09 ` Ludovic Courtès
2021-05-31 10:23 ` Tobias Platen
2021-04-22 7:59 ` [bug#47615] [PATCH v2 00/12] " Efraim Flashner
2021-04-22 7:59 ` [PATCH v2 01/12] gnu: bootstrap: Add support for powerpc-linux Efraim Flashner
2021-04-22 7:59 ` [PATCH v2 02/12] gnu: guile-3.0: Fix building on powerpc-linux Efraim Flashner
2021-05-06 14:45 ` bug#47615: [PATCH 0/9] Add 32-bit powerpc support Ludovic Courtès
2021-05-10 8:01 ` Efraim Flashner
2021-04-22 7:59 ` [PATCH v2 03/12] gnu: gcc-boot0: Use 128-bit long-double on powerpc-linux Efraim Flashner
2021-04-22 7:59 ` [PATCH v2 04/12] gnu: binutils: Fix bug in test suite in libiberty Efraim Flashner
2021-04-22 7:59 ` [PATCH v2 05/12] gnu: mesa: Add support for powerpc-linux Efraim Flashner
2021-04-22 7:59 ` [PATCH v2 06/12] gnu: Add mac-fdisk Efraim Flashner
2021-05-06 14:48 ` bug#47615: [PATCH 0/9] Add 32-bit powerpc support Ludovic Courtès
2021-05-06 15:48 ` [bug#47615] " Efraim Flashner
2021-04-22 7:59 ` [PATCH v2 07/12] gnu: american-fuzzy-lop: Add support for powerpc-linux Efraim Flashner
2021-04-22 7:59 ` [PATCH v2 08/12] build: qemu-command: Add support for powerpc Efraim Flashner
2021-04-22 7:59 ` [PATCH v2 09/12] gnu: mercurial: Skip tests on powerpc-linux Efraim Flashner
2021-04-22 16:41 ` [bug#47615] " Maxime Devos
2021-05-06 14:51 ` bug#47615: [PATCH 0/9] Add 32-bit powerpc support Ludovic Courtès
2021-04-22 7:59 ` [PATCH v2 10/12] gnu: nss: Skip tests on powerpc-linux Efraim Flashner
2021-04-22 7:59 ` [PATCH v2 11/12] gnu: zstd: Adjust test suite for 32-bit architectures Efraim Flashner
2021-04-22 7:59 ` [bug#47615] [PATCH v2 12/12] gnu: glib: Disable failing test Efraim Flashner
2021-05-04 15:50 ` [PATCH v2 00/12] Add 32-bit powerpc support Efraim Flashner
2021-05-24 9:54 ` bug#47615: [PATCH 0/9] " Efraim Flashner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8735vo1yhm.fsf_-_@gmail.com \
--to=cmmarusich@gmail.com \
--cc=47615@debbugs.gnu.org \
--cc=efraim@flashner.co.il \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.