public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: wraeth <wraeth@wraeth.id.au>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Compiling for different CPU but same architecture
Date: Fri, 01 Aug 2014 18:23:03 +1000	[thread overview]
Message-ID: <1406881383.2106.1.camel@wraeth.id.au> (raw)
In-Reply-To: <1406880069.31927.1.camel@nileshgr.com>

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

On Fri, 2014-08-01 at 13:31 +0530, Nilesh Govindrajan wrote:
> systemd-nspawn seems to be interesting. But will it work on my i5?
> Because I prefer to use -march=native. For using distcc I copied all the
> flags that gcc selects in march=native mode to make.conf.

systemd-nspawn is described as "a chroot on steroids". It has no impact
on what flags you use for compiling packages.

The advantage of systemd-nspawn is the fact that it actually isolates
and executes the chroot's own init process, either systemd or (as I
understand - haven't tested myself) newer versions of OpenRC. Once
you're in the chroot, things work almost the same as if you had actually
booted the system itself (with some exceptions). It manages mounting the
virtual filesystems it needs, and has built-in functionality for
managing bind mounts if needed (such as binding your portage tree so you
don't have to re-download it).

As Neil said, once inside the chroot, you would still have to manually
set your CFLAGS - "-march=native" is a function of gcc to dynamically
detect the optimal flags to use *at the time it compiles*.

All this is rather meaningless, though, if you don't have systemd on
your host system anyway.
-- 
wraeth <wraeth@wraeth.id.au>

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 213 bytes --]

  parent reply	other threads:[~2014-08-01  8:23 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-01  3:53 [gentoo-user] Compiling for different CPU but same architecture Nilesh Govindrajan
2014-08-01  5:46 ` Canek Peláez Valdés
2014-08-01  5:59   ` wraeth
2014-08-01  7:53     ` Neil Bothwick
2014-08-01  8:01       ` Nilesh Govindrajan
2014-08-01  8:09         ` Neil Bothwick
2014-08-01  8:23         ` wraeth [this message]
2014-08-01  8:25           ` Nilesh Govindrajan
2014-08-01  8:37             ` wraeth
2014-08-01 11:45         ` Jc García
2014-08-01 11:51           ` Neil Bothwick
2014-08-01 12:00             ` Jc García
2014-08-01 12:22               ` Nilesh Govindrajan
2014-08-01 13:04                 ` Jc García
2014-08-01 12:29               ` Nilesh Govindrajan

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=1406881383.2106.1.camel@wraeth.id.au \
    --to=wraeth@wraeth.id.au \
    --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