From: "Walter Dnes" <waltdnes@waltdnes.org>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Will a 64-bit-no-multilib machine cross-compile 32-bit code?
Date: Thu, 19 Mar 2015 00:20:26 -0400 [thread overview]
Message-ID: <20150319042026.GA7681@waltdnes.org> (raw)
In-Reply-To: <2685505.RfjHhG2H7t@navi>
On Wed, Mar 18, 2015 at 10:27:05PM -0400, Fernando Rodriguez wrote
> On Wednesday, March 18, 2015 9:56:12 PM Walter Dnes wrote:
> > My situation...
> >
> > * I've dug up my ancient netbook, and got Gentoo re-installed on it
> > * The cpu is a dual-core Intel(R) Atom(TM) CPU Z520
> > * It's 32-bit only; YES!
> > * Compiling just the Seamonkey binary (ignoring its dependancies) took
> > 14 hours
> >
> > I obviously want to offload compiling to another machine. As per the
> > subject, will a 64-bit no-multilb install be able to cross compile
> > 32-bit code?
>
> I've done it with distcc by adding the -m32 option to cflags. I used a script
> (named after the compiler on the gentoo box) to call the compiler with the -
> m32 flag and placed on the PATH environment (just for the distccd service)
> before anything else and it worked. I got a 64 bit arch box to compile for a
> 32 bit gentoo (not nearly as fast as compiling locally on the arch box but
> much faster than the gentoo box). It should work similarly with other cross-
> compile scenarios.
Thanks. I'll probably be back with a bunch of questions. As a matter
of fact, I already have one. The docs say that it does not work if the
"-march=native" cflag is used. It says to use the output of...
gcc -march=native -E -v - </dev/null 2>&1 | grep cc1
...omitting "/usr/libexec/gcc/x86_64-pc-linux-gnu/4.8.3/cc1 -E -quiet -v -"
I presume. So on the 64-bit host, I would go from...
CFLAGS="-O2 -march=native -mfpmath=sse -fomit-frame-pointer -pipe -fno-unwind-tables -fno-asynchronous-unwind-tables"
...to...
CFLAGS="-O2 -march=core2 -mcx16 -msahf -mno-movbe -mno-aes -mno-pclmul -mno-popcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2 -mno-tbm -mno-avx -mno-avx2 -mno-sse4.2 -mno-sse4.1 -mno-lzcnt -mno-rtm -mno-hle -mno-rdrnd -mno-f16c -mno-fsgsbase -mno-rdseed -mno-prfchw -mno-adx -mfxsr -mno-xsave -mno-xsaveopt --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=2048 -mtune=core2 -fstack-protector -mfpmath=sse -fomit-frame-pointer -pipe -fno-unwind-tables -fno-asynchronous-unwind-tables"
And on the target (netbook), I'd go to...
CFLAGS="-O2 -march=atom -mno-cx16 -msahf -mmovbe -mno-aes -mno-pclmul -mno-popcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2 -mno-tbm -mno-avx -mno-avx2 -mno-sse4.2 -mno-sse4.1 -mno-lzcnt -mno-rtm -mno-hle -mno-rdrnd -mno-f16c -mno-fsgsbase -mno-rdseed -mno-prfchw -mno-adx -mfxsr -mno-xsave -mno-xsaveopt --param l1-cache-size=24 --param l1-cache-line-size=64 --param l2-cache-size=512 -mtune=atom -fstack-protector -mfpmath=sse -fomit-frame-pointer -pipe -fno-unwind-tables -fno-asynchronous-unwind-tables"
Is that correct (assuming that's my output)?
--
Walter Dnes <waltdnes@waltdnes.org>
I don't run "desktop environments"; I run useful applications
next prev parent reply other threads:[~2015-03-19 4:20 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-19 1:56 [gentoo-user] Will a 64-bit-no-multilib machine cross-compile 32-bit code? Walter Dnes
2015-03-19 2:27 ` Fernando Rodriguez
2015-03-19 4:20 ` Walter Dnes [this message]
2015-03-19 5:12 ` Fernando Rodriguez
2015-03-21 12:46 ` Mike Gilbert
2015-03-21 19:52 ` Fernando Rodriguez
2015-03-22 14:03 ` Mike Gilbert
2015-03-22 14:05 ` Mike Gilbert
2015-03-23 0:56 ` Fernando Rodriguez
2015-03-23 1:25 ` Fernando Rodriguez
2015-03-24 1:51 ` Walter Dnes
2015-03-23 22:18 ` Mike Gilbert
2015-03-23 22:41 ` Fernando Rodriguez
2015-03-23 22:48 ` Mike Gilbert
2015-03-24 0:37 ` Fernando Rodriguez
2015-03-24 6:06 ` Walter Dnes
2015-03-24 7:17 ` Walter Dnes
2015-03-24 17:18 ` Mike Gilbert
2015-03-24 19:01 ` Fernando Rodriguez
2015-03-25 2:01 ` Walter Dnes
2015-03-25 5:20 ` Walter Dnes
2015-03-25 6:44 ` Walter Dnes
2015-03-24 0:26 ` Peter Humphrey
2015-03-22 11:32 ` Walter Dnes
2015-03-28 11:13 ` Frank Steinmetzger
2015-03-28 13:03 ` Walter Dnes
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=20150319042026.GA7681@waltdnes.org \
--to=waltdnes@waltdnes.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