Gentoo Archives: gentoo-user

From: Neil Bothwick <neil@××××××××××.uk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Binary packages for a different amd64 flavor
Date: Tue, 12 Jun 2018 19:18:09
Message-Id: 20180612201750.4d1ef5ab@digimed.co.uk
In Reply to: [gentoo-user] Binary packages for a different amd64 flavor by Ian Zimmerman
1 On Tue, 12 Jun 2018 11:31:32 -0700, Ian Zimmerman wrote:
2
3 > I have had it with compiling stuff from source on my laptop. It is just
4 > too slow. So I would like to create binary packages on my desktop and
5 > then just tell the laptop to use them.
6 >
7 > Simple enough, except that the desktop is AMD Phenom, and the laptop is
8 > Intel 64 bit Atom. Up to now, each system had unique CFLAGS to squeeze
9 > as much performance as possible.
10 >
11 > On the desktop:
12 > CFLAGS="-march=barcelona --param l1-cache-size=64 --param
13 > l1-cache-line-size=64 --param l2-cache-size=512 -O2 -pipe"
14 >
15 > On the laptop:
16 > CFLAGS="-march=ivybridge --param l1-cache-size=32 --param
17 > l1-cache-line-size=64 --param l2-cache-size=4096 -O2 -pipe"
18 >
19 > I don't want to give up these tunings, but from the wiki page [1] I can
20 > see no straightforward way to have different CFLAGS when compiling
21 > binary packages, from the normal CFLAGS when installing directly from
22 > source on the host system. Is the only way of doing this to set up a
23 > full-blown cross-development environment?
24
25 Set up a container (or chroot but a container is easier to manage)
26 containing a copy of the root filesystem of the laptop. Tweak make.conf
27 to add buildpkg and set an appropriate PKGDIR. then you can just enter
28 the container/chroot and run your world update or whatever else you want
29 to emerge.
30
31 Now export the PKGDIR over NFS and mount it on the laptop and add
32 --usepkg to the portage default opts in make.conf.
33
34
35 --
36 Neil Bothwick
37
38 Don't judge a book by its movie.