Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

On a Gentoo Linux box which I'm not administering (and to which I don't have root access), how can I find out the options which were used to compile the package?

(Please note I've never worked with Gentoo before, but have good working knowledge of Debian-based distros)

share|improve this question

migrated from serverfault.com Jul 24 '12 at 15:56

This question came from our site for system and network administrators.

2 Answers 2

up vote 1 down vote accepted

If the portage package manager is used (it most likely is) then the CPU flags can be found in /etc/make.conf as CFLAGS and CXXFLAGS. Note that individual ebuilds may filter certain flags, so the flags you see in /etc/make.conf may not be the ones that were used to compile the package. Looking at the ebuild (under /usr/portage/<category name>/<program name>/) might tell you if that is the case.

This assumes of course that the contents of /etc/make.conf weren't changed after the compilation of the package.

share|improve this answer
/etc/make.conf may not reflect options used when the package was installed. See my answer. –  noisebleed Jul 24 '12 at 17:09
thanks, Lars, I was looking for the ebuild information –  andreas-h Jul 25 '12 at 10:32

Please be aware that current USE flags and other configuration defined in /etc/make.conf may have changed since the package was installed. A more reliable way of checking configuration and compile options is to check var/db/pkg.

Example for apache-2.2.22:

$ cat /var/db/pkg/www-servers/apache-2.2.22-r1/CFLAGS
-mtune=native -O2 -pipe -g
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.