public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Nick Alcock <nick.alcock@oracle.com>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: binutils@sourceware.org
Subject: Re: how should I configure my buuild for i386-*linux*
Date: Mon, 09 May 2022 13:01:37 +0100	[thread overview]
Message-ID: <87ilqevrry.fsf@esperi.org.uk> (raw)
In-Reply-To: <87y1zdh189.fsf@igel.home> (Andreas Schwab's message of "Sat, 07 May 2022 16:21:58 +0200")

On 7 May 2022, Andreas Schwab told this:

> On Mai 07 2022, Nick Alcock via Binutils wrote:
>
>> Thankfully the answer is pretty simple. Try configuring like this:
>>
>> configure CC="gcc -m32" ...
>
> That would would conflict with the value of the --host option.

Well, you'd use --host if you want to trigger a cross-compilation: but
most uses in this case are not cross-compilations at all but different
compiler configurations on a multiarch system capable of executing
x86-32 and x86-64 programs. Just flipping the CC flags is enough in this
case. Obviously before this can work you need a 32-bit libc etc etc
but almost everyone who's even thinking of doing this will either
already have one or will have one trivially available to install.

(It's also enough if you have qemu and binfmt_misc set up to "natively"
execute non-native programs through emulation, though that will almost
always require building a suitable libc etc via conventional
cross-compilation first.)

(aplogies, I know I'm probably teaching my grandfather to suck eggs, but
ti was recently borne in on me how many people don't know this stuff! So
I thought it might be worth reiterating anyway.)

-- 
NULL && (void)

  reply	other threads:[~2022-05-09 12:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-03 23:31 Vladimir Mezentsev
2022-05-03 23:42 ` Matthias Klose
2022-05-04  7:29   ` Vladimir Mezentsev
2022-05-07 13:30     ` Nick Alcock
2022-05-07 14:21       ` Andreas Schwab
2022-05-09 12:01         ` Nick Alcock [this message]
2022-05-09 12:13           ` Christian Groessler
2022-05-17 12:33             ` Nick Alcock

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=87ilqevrry.fsf@esperi.org.uk \
    --to=nick.alcock@oracle.com \
    --cc=binutils@sourceware.org \
    --cc=schwab@linux-m68k.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).