Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 120220 - genflags outputs inadvisable CFLAGS for amd64?
Summary: genflags outputs inadvisable CFLAGS for amd64?
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Robin Johnson
Depends on:
Reported: 2006-01-24 14:06 UTC by Jonathan Coome (RETIRED)
Modified: 2009-04-17 04:10 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Coome (RETIRED) gentoo-dev 2006-01-24 14:06:34 UTC
I'd never heard of genflags before until today, but it seems that it is generating potentially inadvisable CFLAGS, and some users may be following them (see the attached link). This is the output I get when running host2flags:

CFLAGS="-m64 -O3 -pipe -fPIC"
CXXFLAGS="-m64 -O3 -pipe -fPIC"

According to the amd64 technotes [1] the -m64 flag is irrelevant in normal usage, and could break anything that compiles things with -m32 internally, and people shouldn't use -fPIC globally.

Perhaps a warning should be issued if this is the case, or the output corrected?

Comment 1 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2006-01-24 16:15:37 UTC
yup, genflags is badly out of date.
When I wrote it all arches gave input on what the correct flags were for their systems.

It does badly need updating (a full rewrite actually), but I don't have time for it presently.

My longterm objective is to see what languages are provided in the latest releases again, and re-write all of genflags in it, also providing support for the many newer chips that have come out since genflags was first written.

If you could provide info on all of the newer /proc/cpuinfo for AMD64 machines, and the relevant CFLAGS to use, I'd appreciate it.
Comment 2 Jeremy Olexa (darkside) (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2009-04-17 04:10:34 UTC
Mask message said:

# Robin H. Johnson <> (20 Oct 2008)
# Masked for removal in 30 days (see bugs #120220, #137998, #170782)
# genflags should never have been born.  Output needs to be specific per GCC
# version, and that's a big change.

so treecleaners removed it.