all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Christopher Baines <mail@cbaines.net>
To: Maxime Devos <maximedevos@telenet.be>
Cc: 54407@debbugs.gnu.org
Subject: bug#54407: Issues building grub for powerpc64le, could not force big-endian
Date: Mon, 04 Apr 2022 20:37:23 +0100	[thread overview]
Message-ID: <87h777q5s8.fsf@cbaines.net> (raw)
In-Reply-To: <7b43424a2ca7b3048fc2652cbee4f71390ce9151.camel@telenet.be>

[-- Attachment #1: Type: text/plain, Size: 2153 bytes --]


Maxime Devos <maximedevos@telenet.be> writes:

> Christopher Baines schreef op di 15-03-2022 om 21:11 [+0000]:
>> grub can't be built for powerpc64le, I believe the same failure
>> occurs
>> with native builds or cross compilation from x86_64. I think this
>> might
>> have always been the case.
>>
>> This is the error from the build log:
>>
>>   checking for options to get big-endian compilation... no
>>   configure: error: could not force big-endian
>>
>> Looking in the config.log file, it tries a bunch of options with
>> different errors, but this one stands out:
>>
>>   cc1: error: '-m32' not supported in this configuration
>>
>> I know very little about gcc, but I think this might relate to the
>> multilib thing, which I'm guessing is disabled for the gcc in use
>> here.
>>
>> Any ideas about this issue?
>
> Maybe you could add a gcc compiling for 32-bit ppc (maybe without a
> glibc since this is grub) and patch the configuration script to use the
> 32-bit ppc gcc instead of using the 64-bit ppc+-m32?

I've had a go at this, using something like what I've included below,
but I haven't stumbled upon the right options yet, or a way to work out
why gcc still thinks "-m32 not supported".

(define multilib-gcc
  (package
   (inherit gcc)
   (name "foo-gcc")
   (arguments
    (substitute-keyword-arguments (package-arguments gcc)
         ((#:phases phases)
          `(modify-phases ,phases
             (add-after 'unpack 'fix-genmultilib
               (lambda _
                 ;; patch-shebang doesn't work here because there are actually
                 ;; several scripts inside this script, each with a #!/bin/sh
                 ;; that needs patching.
                 (substitute* "gcc/genmultilib"
                   (("#!/bin/sh") (string-append "#!" (which "sh"))))))))
         ((#:configure-flags flags)
          `(append (list
                    "--with-endian=little,big"
                    "--enable-multilib"
                    "--with-multilib-list=mx32,m64,m32"
                    )
                   (delete "--disable-multilib" ,flags)))))))

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 987 bytes --]

  reply	other threads:[~2022-04-05  9:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-15 21:11 bug#54407: Issues building grub for powerpc64le, could not force big-endian Christopher Baines
2022-03-30 17:41 ` Danny Milosavljevic
2022-03-30 17:46 ` Maxime Devos
2022-04-04 19:37   ` Christopher Baines [this message]
2022-08-18  8:11     ` Maxime Devos
2022-08-18  8:14       ` Maxime Devos
2022-08-18  8:33         ` Maxime Devos

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=87h777q5s8.fsf@cbaines.net \
    --to=mail@cbaines.net \
    --cc=54407@debbugs.gnu.org \
    --cc=maximedevos@telenet.be \
    /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.