Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 32199 - xfree rejects all cflags, even useful ones
Summary: xfree rejects all cflags, even useful ones
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High enhancement (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-28 09:26 UTC by John Richard Moser
Modified: 2004-09-19 17:27 UTC (History)
0 users

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


Attachments
ebuild for 4.3.99.14 that allows -fomit-frame-pointer, -Os, and USE=+xfreecflags (xfree-4.3.99.14.ebuild,31.55 KB, text/plain)
2003-10-28 09:55 UTC, John Richard Moser
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Richard Moser 2003-10-28 09:26:50 UTC
I find that xfree rejects cflags because people were complaining about xfree
breaking.  The comments seem to indicate that the maintainers don't want people
using -march= and then enabling -msse or -mmmx or such things that their CPU
doesn't handle, and so filter all cflags.

It seems that -fomit-frame-pointer doesn't hurt X, and there is good reason to
use it.  I suggest two things:

1) Expliticely allow -fomit-frame-pointer
2) add a USE flag 'xfreecflags' to respect cflags in xfree for users who know
what they're doing.

Reproducible: Always
Steps to Reproduce:
1. set CFLAGS to include -fomit-frame-pointer
2. emerge xfree


Actual Results:  
emerged xfree without -fomit-frame-pointer

Expected Results:  
emerge xfree with -fomit-frame-pointer

(None necessary)
Comment 1 John Richard Moser 2003-10-28 09:55:07 UTC
Created attachment 19896 [details]
ebuild for 4.3.99.14 that allows -fomit-frame-pointer, -Os, and USE=+xfreecflags

just backport the changes to older X ebuilds.  They're all at the top, and
just
involve the script that strips the cflags.  Annoying little thing but has
its
uses, although you might want to hold off on actually releasing this with
-fomit-frame-pointer in the ALLOWED_FLAGS until I test it more.  It's given
me
no trouble so far but I don't know how to stress-test X.
Comment 2 Donnie Berkholz (RETIRED) gentoo-dev 2003-10-28 14:13:09 UTC
Is it so difficult to simply comment the strip-flags line? That also seems
more likely to ensure people doing so are aware of what they're doing and
that they read the large comment about extra flags causing problems and not
to file bugs if using them.

It actually doesn't strip all CFLAGS. It allows these:
ALLOWED_FLAGS="-fstack-protector -march -mcpu -O -O1 -O2 -O3 -pipe" and in
the case of ACCEPT_KEYWORDS="~arch" also allows -freorder-blocks and -fprefetch-loop-arrays,
based on reading the strip-flags and filter-flags functions in /usr/portage/eclass/flag-o-matic.eclass.

However adding -fomit-frame-pointer to ALLOWED_FLAGS may be a valid suggestion.

Also in the future please attach diffs to the current ebuilds in portage;
it makes it a lot easier to see what the changes actually are.
Comment 3 Donnie Berkholz (RETIRED) gentoo-dev 2003-10-28 14:14:25 UTC
btw compiling with -Os is known to cause problems, that's why it's disallowed
by default.
Comment 4 John Richard Moser 2003-10-28 15:26:02 UTC
Ahh, thanks, I'll keep the -Os thing in mind, please make sure to filter
that out in any case.

Flags that DEFINITELY cause problems should be filtered.  Flags that are
unconfirmed or just too uncommon for us to care should be allowed by using
the USE=
Comment 5 Donnie Berkholz (RETIRED) gentoo-dev 2003-10-28 15:35:55 UTC
You haven't justified yet why a USE flag is better than commenting out the
strip-flags line, with its accompanying comments on why it may be a bad idea
etc.
Comment 6 John Richard Moser 2003-11-07 08:30:09 UTC
good point, but -fomit-frame-pointer doesn't seem harmful (I've been using
it on 4.3.0-r3) so test it out and if it's not problematic add it to the
allowed flags.
Comment 7 Donnie Berkholz (RETIRED) gentoo-dev 2003-11-07 09:10:19 UTC
We can give it a shot on the next development release and see if there seem
to be problems.
Comment 8 Donnie Berkholz (RETIRED) gentoo-dev 2003-11-24 23:25:44 UTC
OK, it's in 4.3.99.16.
Comment 9 John Richard Moser 2004-09-19 17:24:32 UTC
You can mark this bug INVALID or WONTFIX any time, you know
Comment 10 John Richard Moser 2004-09-19 17:27:43 UTC
Ah, INVALIDed it myself