public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Andrew Savchenko <bircoph@gentoo.org>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] cross-compile attempt
Date: Sun, 31 Jul 2016 23:18:00 +0300	[thread overview]
Message-ID: <20160731231800.92c4c889c7f91a020bbc4e0d@gentoo.org> (raw)
In-Reply-To: <1544697.klPk7OG4O7@dell_xps>

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

On Sun, 31 Jul 2016 19:40:37 +0100 Mick wrote:
> Hi All,
> 
> I am dipping my toe into cross-compile territory, in order to build i686 
> binaries for a 32bit box, which is too old to do its own emerges.  I am using 
> an amd64 box which is significantly faster to do all the heavy lifting and 
> started applying this page:
> 
> https://wiki.gentoo.org/wiki/Embedded_Handbook/General/Creating_a_cross-compiler
> 
> which I followed up with:
> 
> https://wiki.gentoo.org/wiki/Cross_build_environment

And here comes this misconception again... Please, tell me, why on
the earth cross-compiling is needed for amd64 to produce i686
binaries?!

amd64 CPU _natively_ supports x86 instructions, amd64 kernel
natively supports x86 code (this can be disabled during kernel
config, but usually it isn't), amd64 gcc *can* produce x86 binaries.

There are two ways to help older x86 boxes to build packages faster:

1. Set up distcc to produce x86 code on your amd64 processors. Just
add -m32 to your *FLAGS.

2. Copy old box system to a chroot dir on amd64. Run setarch i686
and chroot to that directory, and build 32-bit packages as usual!
There are two ways to deliver them:

2.a. Generate binary packages on new box and install them on old
boxes.

2.b. Instead of copying old box's root, mount it over NFS.

I'm currently using 1, but planning to switch to 2.a, because
distcc can't help with everything (execution of java, python,
autotools and other stuff can't be helped with distcc).

I used 2.b earlier on very old box (it is dead now).

3. Well, one can do full cross-compilation as you proposed, but
this is ridiculous. Cross-compilation is always a pain and if it
can be avoided, it should be avoided.

Best regards,
Andrew Savchenko

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

  parent reply	other threads:[~2016-07-31 20:18 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-31 18:40 [gentoo-user] cross-compile attempt Mick
2016-07-31 20:15 ` Jeremi Piotrowski
2016-07-31 20:18 ` Andrew Savchenko [this message]
2016-07-31 22:31   ` Mick
2016-08-01 13:51     ` Mick
2016-08-01 15:31       ` Peter Humphrey
2016-08-01 15:49         ` Mick
2016-08-01 16:21           ` Mick
2016-08-02  8:46             ` Peter Humphrey
2016-08-02 11:56           ` Neil Bothwick
2016-08-03  0:26             ` [gentoo-user] " Ian Zimmerman
2016-08-03  8:20               ` Neil Bothwick
2016-08-03 17:26                 ` james
2016-08-03 20:11                   ` R0b0t1
2016-07-31 20:36 ` [gentoo-user] " james
2016-08-01 15:23 ` waltdnes
2016-08-01 15:46   ` [gentoo-user] Re: [was cross-compile attempt] 32bit chroot Mick
2016-08-01 16:19     ` waltdnes
2016-08-01 16:32       ` Mick
2016-08-01 17:57         ` Mick
2016-08-01 21:21           ` Mick
2016-08-01 23:11             ` Jeremi Piotrowski
2016-08-02  4:33               ` waltdnes
2016-08-02  5:29                 ` Mick
2016-08-02  9:22           ` Peter Humphrey
2016-08-02 14:33             ` Neil Bothwick

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=20160731231800.92c4c889c7f91a020bbc4e0d@gentoo.org \
    --to=bircoph@gentoo.org \
    --cc=gentoo-user@lists.gentoo.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