Gentoo Archives: gentoo-user

From: Alex Schuster <wonko@×××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] per-package CFLAGS?
Date: Fri, 27 Apr 2012 12:29:46
Message-Id: 20120427142812.701bbd62@weird.wonkology.org
In Reply to: [gentoo-user] per-package CFLAGS? by Doug Hunley
1 Doug Hunley writes:
2
3 > Am I understanding the docs correctly in that I can use
4 > /etc/portage/package.env to set per-package CFLAGS?
5
6 Yes, and it's quite easy. Here is mine:
7
8 app-emulation/virtualbox safecflags.conf j1.conf
9 app-office/libreoffice notmpfs.conf
10 dev-lang/R j1.conf
11 games-fps/alienarena notmpfs.conf
12 games-fps/worldofpadman notmpfs.conf
13 games-puzzle/pingus safecflags.conf
14 games-sports/vdrift notmpfs.conf
15 mail-client/thunderbird notmpfs.conf
16 sys-boot/grub grub.conf
17 sys-libs/glibc nosandbox.conf
18 www-client/firefox notmpfs.conf
19
20 These *.conf files are located in /etc/portage/env/, and they are just
21 shell scripts sourced by emerge. For example, j1.conf simply has the line
22 'MAKEOPTS=-j1' in it, this disables parallel makes for some packages
23 where I had trouble with it. Similarly, notmpfs.conf has
24 'PORTAGE_TMPDIR=/var/portage/tmp', while my normal PORTAGE_TMPDIR is on
25 tmpfs. 5G sometimes is not enough for the big packages. grub.conf has
26 'export DONT_MOUNT_BOOT=foo', this disables mounting the /boot directory
27 and doing stuff there when emerging it again. I already forgot about this
28 one. And nosandbox.conf has 'FEATURES=-usersandbox', as recent glibc does
29 not build here with this setting.
30
31 Any finally my savecflags.conf:
32 CFLAGS="-pipe -march=amdfam10 -O2"
33 CXXFLAGS=$CFLAGS
34
35 Wonko

Replies

Subject Author
Re: [gentoo-user] per-package CFLAGS? Doug Hunley <doug.hunley@×××××.com>