Gentoo Archives: gentoo-user

From: R0b0t1 <r030t1@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: cross-compile attempt
Date: Wed, 03 Aug 2016 20:11:45
Message-Id: CAAD4mYhhPcuf65ezMscCu1fxJeAj7VcQ0esX8mw5CQ-yRTHUsQ@mail.gmail.com
In Reply to: Re: [gentoo-user] Re: cross-compile attempt by james
1 On Wed, Aug 3, 2016 at 12:26 PM, james <garftd@×××××××.net> wrote:
2 > On 08/03/2016 03:20 AM, Neil Bothwick wrote:
3 >>
4 >> On Tue, 2 Aug 2016 17:26:09 -0700, Ian Zimmerman wrote:
5 >>
6 >>>> If you are using systemd, it is much simpler to use a container with
7 >>>> systemd-nspawn that chroot, it takes care of all the mucking around
8 >>>> required to get /dev, /proc and friends available to the container.
9 >>>>
10 >>>> The only mount I need to take care of myself is for $PKGDIR, which is
11 >>>> also available via NFS on the target box.
12 >>>
13 >>>
14 >>> Even with chroot and without without systemd, it pays to create a dead
15 >>> simple shell script that does all the mounting. You can even have that
16 >>> script itself exec chroot as the last step.
17 >>
18 >>
19 >> That's what I do, only the script is even simpler now ;-)
20 >>
21 >> While containers are simpler, it is still easy to miss out a step, so a
22 >> script makes a lot of sense.
23 >>
24 >>
25 >
26 > OK, so now I curious to try this out too. I'd be interested in testing
27 > this script for a hardware system (situation) exactly identical to Mick.
28 > I do not use systemd. If someone wanted to post a script via gist
29 > (http://www.labnol.org/internet/github-gist-tutorial/) or elsewhere
30 > or privately or via private email, centric to openrc, I'd test it out,
31 > for a variety of final target image needs.
32 >
33 > Also any other scripts for arm64v8 builds on native arm64 systems would
34 > be of keen interest to me. I'd settle for a script for armv7 to use as a
35 > starting point.
36 >
37 >
38 >
39 > James
40 >
41
42 You can compile for i386 natively with the multi-target libraries
43 installed. I have used a chroot instead when my system was installed
44 without the i386 libraries.
45
46 My other thought was using a cross compiler, but I was running out of
47 disk space at the time and needed to support multiple systems. The
48 major issue here is it is hard (or cumbersome) to keep partial
49 systems; each crossdev prefix will be a self-contained system.