public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Alex Schuster <wonko@wonkology.org>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] per-package CFLAGS?
Date: Fri, 27 Apr 2012 14:28:12 +0200	[thread overview]
Message-ID: <20120427142812.701bbd62@weird.wonkology.org> (raw)
In-Reply-To: <CALxYTP7Rq3J+fkMt83m8q5jNCG3X58FcxJZDZQRV-ck_n4Wmug@mail.gmail.com>

Doug Hunley writes:

> Am I understanding the docs correctly in that I can use
> /etc/portage/package.env to set per-package CFLAGS?

Yes, and it's quite easy. Here is mine:

app-emulation/virtualbox	safecflags.conf j1.conf
app-office/libreoffice		notmpfs.conf
dev-lang/R			j1.conf
games-fps/alienarena		notmpfs.conf
games-fps/worldofpadman		notmpfs.conf
games-puzzle/pingus		safecflags.conf
games-sports/vdrift		notmpfs.conf
mail-client/thunderbird		notmpfs.conf
sys-boot/grub			grub.conf
sys-libs/glibc			nosandbox.conf
www-client/firefox		notmpfs.conf

These *.conf files are located in /etc/portage/env/, and they are just
shell scripts sourced by emerge. For example, j1.conf simply has the line
'MAKEOPTS=-j1' in it, this disables parallel makes for some packages
where I had trouble with it. Similarly, notmpfs.conf has
'PORTAGE_TMPDIR=/var/portage/tmp', while my normal PORTAGE_TMPDIR is on
tmpfs. 5G sometimes is not enough for the big packages. grub.conf has
'export DONT_MOUNT_BOOT=foo', this disables mounting the /boot directory
and doing stuff there when emerging it again. I already forgot about this
one. And nosandbox.conf has 'FEATURES=-usersandbox', as recent glibc does
not build here with this setting. 

Any finally my savecflags.conf:
  CFLAGS="-pipe -march=amdfam10 -O2"
  CXXFLAGS=$CFLAGS

	Wonko



  reply	other threads:[~2012-04-27 12:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-27 12:08 [gentoo-user] per-package CFLAGS? Doug Hunley
2012-04-27 12:28 ` Alex Schuster [this message]
2012-04-27 14:47   ` Doug Hunley

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=20120427142812.701bbd62@weird.wonkology.org \
    --to=wonko@wonkology.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