public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Nick Alcock <nick.alcock@oracle.com>
To: Christian Groessler <chris@groessler.org>
Cc: binutils@sourceware.org
Subject: Re: how should I configure my buuild for i386-*linux*
Date: Tue, 17 May 2022 13:33:41 +0100	[thread overview]
Message-ID: <878rr0qqxm.fsf@esperi.org.uk> (raw)
In-Reply-To: <20188446-d3c5-2ebe-de7d-14fe03f981a0@groessler.org> (Christian Groessler's message of "Mon, 9 May 2022 14:13:27 +0200")

On 9 May 2022, Christian Groessler stated:

> On 5/9/22 14:01, Nick Alcock via Binutils wrote:
>> 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.
>
> If you're on a Debian system (maybe others), run "linux32" and configure in this subshell.
>
> It lets the programs think they are running on a 32bit machine.

This is only enough if you've replaced /usr/bin/gcc etc with wrappers
that detect this and introduce "-m32" etc into the invocations passed to
the real gcc. Debian uses such a wrapper, but it's not guaranteed on all
systems. (But if you are on such a system, it is terribly convenient.)

-- 
NULL && (void)

      reply	other threads:[~2022-05-17 12:34 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
2022-05-09 12:13           ` Christian Groessler
2022-05-17 12:33             ` Nick Alcock [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=878rr0qqxm.fsf@esperi.org.uk \
    --to=nick.alcock@oracle.com \
    --cc=binutils@sourceware.org \
    --cc=chris@groessler.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).