From: "Ludovic Courtès" <ludo@gnu.org>
To: Thiago Jung Bauermann <bauermann@kolabnow.com>
Cc: 49880@debbugs.gnu.org
Subject: [bug#49880] [PATCH 1/2] gnu: gmp-boot: Fix build on powerpc64le-linux
Date: Wed, 11 Aug 2021 23:29:26 +0200 [thread overview]
Message-ID: <878s17k6vd.fsf@gnu.org> (raw)
In-Reply-To: <20210804183454.153783-1-bauermann@kolabnow.com> (Thiago Jung Bauermann's message of "Wed, 4 Aug 2021 15:34:54 -0300")
Hi!
Thiago Jung Bauermann <bauermann@kolabnow.com> skribis:
> Linux on powerpc64 used to run in big-endian mode only. When support for
> little-endian mode was added around 2014, they took the opportunity to
> update the ELF ABI. The new ABI is known as ELF ABI v2, and the old one
> retroactively called ELF ABI v1.
>
> GMP 4.3.2 was released in 2010, so its hand-optimized assembly code for
> powerpc64 only support ELF ABI v1. This causes a build failure on
> powerpc64le-linux, which can be fixed by passing a host triplet with the
> “none” CPU type. This tells the configure script to use generic C code for
> the build.
>
> * gnu/packages/commencement.scm (gmp-boot)[arguments]{#:configure-flags}: Add
> “--host=none-unknown-linux-gnu” for powerpc64le targets.
[...]
> + (substitute-keyword-arguments (package-arguments gmp)
> + ((#:configure-flags gmp-configure-flags)
> + `(cons* ,@(if (string-prefix? "powerpc64le-" (or (%current-target-system)
> + (%current-system)))
> + ;; The powerpc64 assembly code in this version of GMP
> + ;; only supports the ELF ABI v1 but powerpc64le uses ELF
> + ;; ABI v2, so use the generic C code instead. This is
> + ;; done by specifying the CPU type as “none”.
> + ;;
> + ;; According to the manual, “this will run quite slowly,
> + ;; but it should be portable and should at least make it
> + ;; possible to get something running if all else fails.”
> + '("--host=none-unknown-linux-gnu")
> + '())
> + ,gmp-configure-flags))))))
The patch LGTM. However, could you tweak it so we can apply it on
‘core-updates-frozen’ while not triggering a rebuild on other arches?
Something like:
(if (string-prefix? …)
`(cons … ,gmp-configure-flags)
gmp-configure-flags)
TIA!
Ludo’.
prev parent reply other threads:[~2021-08-11 21:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-04 18:34 [bug#49880] [PATCH 1/2] gnu: gmp-boot: Fix build on powerpc64le-linux Thiago Jung Bauermann via Guix-patches via
2021-08-04 18:41 ` [bug#49880] [PATCH 2/2] gnu: gmp-boot: Fix t-scan test crash Thiago Jung Bauermann via Guix-patches via
2021-08-04 18:51 ` Thiago Jung Bauermann via Guix-patches via
2021-08-11 21:34 ` [bug#49880] [PATCH 1/2] gnu: gmp-boot: Fix build on powerpc64le-linux Ludovic Courtès
2021-08-11 21:29 ` Ludovic Courtès [this message]
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=878s17k6vd.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=49880@debbugs.gnu.org \
--cc=bauermann@kolabnow.com \
/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.