View previous topic :: View next topic |
Author |
Message |
resolute n00b
Joined: 23 Jan 2005 Posts: 29 Location: Texas, USA
|
Posted: Mon Jan 24, 2005 8:32 am Post subject: |
|
|
I don't think the Gentoo developers care at all if anyone breaks their system with insane CFLAGS.
I do think the Gentoo developers care when they have to wade through useless bug reports about the aftermath though. _________________ "Our Nation - this generation - will lift a dark threat of violence from our people and our future. We will rally the world to this cause by our efforts, by our courage. We will not tire, we will not falter, and we will not fail." |
|
Back to top |
|
|
Hell n00b
Joined: 05 Dec 2004 Posts: 10
|
Posted: Mon Jan 24, 2005 10:41 am Post subject: |
|
|
How about simply just implementing a standard to use? Put it in the handbook and make it clear (in bold letters) that using these flags are safe to use and anyone breaking away from it is more than likely not guaranteed any support (unless approved by the Gentoo devs). The current handbook doesn't really make anything clear about the make.conf and cfflags, especially for migrating users who are reading about these great CFFLAGS for improving performance and such on the forums. Then at aleast anyone is welcome to use whatever flags they want and you can use a ritual "We don't support your current settings, goodbye" for replies for help (unless someone is willing).
There are a couple websites offering "safe" flags to use, but I'm not so sure anymore if they are considered "safe" and still be able to gain support. And I really don't mind the filtering of flags though, I'm sure the people that want to circumvent these filterings will and should KNOW how to do it anyways. |
|
Back to top |
|
|
vdboor Guru
Joined: 03 Dec 2003 Posts: 592 Location: The Netherlands
|
Posted: Mon Jan 24, 2005 12:42 pm Post subject: |
|
|
I agree with the opinions of 'ciaranm' and 'Hell'.
Limiting choice (or producing a big warning sign) could scare some people off. But it could make the Gentoo community a lot healthier.
The piont 'Hell' is trying to make is valid, the Gentoo handbook doesn't educate users much about CFLAGS, nor does the Gentoo website. In fact, the Gentoo website even advertises with "speed" as one of the major benefits of Gentoo! Talking about attracting the wrong people...
My CFLAGS are sane, but I also make the mistake of trying -O3, -Os and -ffast-math (and a few others recommeded at freehackers.org). And I'm just a 'average' user who just doesn't want to surf the net looking for the right packages. It's very simple: if you hear a story enough times, you'll start to believe there could be some truth in it... [and follow the croud]
Talking about advantages (except for the speed-hoax), I think it's the openess, flexibility, initscripts and package availability. I still have to experience that speed difference coming from Slackware. I've read a response at slashdot from a Gentoo user compiling it's entire system with '-O0 -g' to produce usefull debug reports. Try that on any other disto.. Such options should be advertised, not speed! _________________ The best way to accelerate a windows server is by 9.81M/S²
Linux user #311670 and Yet Another Perl Programmer
[ screenies | Coding on KMess ] |
|
Back to top |
|
|
ciaranm Retired Dev
Joined: 19 Jul 2003 Posts: 1719 Location: In Hiding
|
Posted: Mon Jan 24, 2005 1:19 pm Post subject: |
|
|
dirtyepic wrote: | freedom of choice is freedom to fuck up our systems if we so choose. please stop trying to protect users from ourselves, dad. just because you've decided something is "sane" doesn't make it law. |
I didn't say we were offering total freedom. Would you like us to give you an option to automatically unmerge glibc after any install? That'd be freedom, so it must be a good thing, right?
Quote: | flag filtering definitely does have it's place. especially in the toolchain, which should never be build with any C/CXX/LD/ASFLAGS set. but everything else is fair fucking game until it is proven to break. i'm sick of this condescending "save-you-from-your-own-stupidity" attitude. we're not users verses develepers. we're a COMMUNITY, and i think some people need to have that drilled into their head. |
-ffast-math has been proven to break things. -funroll-loops has been proven to break things. -funroll-all-loops has been proven to break things. -finline-functions has been proven to break things. -frename-registers has been proven to break things. -O3 has been proven to break things.
Quote: | feel free to toss away as many bug reports as you like, but force your world-view on the community and i think you'll soon find the community forcing right back. |
There's this strange theory going around from a few people that a small number of loudmouthed ricers are the Gentoo 'community'. I can assure you that that group are not representative of the Gentoo user base at all, and that their obnoxious behaviour is doing far more harm to the community than anything any developer could possibly try.
vdboor wrote: | The piont 'Hell' is trying to make is valid, the Gentoo handbook doesn't educate users much about CFLAGS, nor does the Gentoo website. In fact, the Gentoo website even advertises with "speed" as one of the major benefits of Gentoo! Talking about attracting the wrong people... |
Yup. That speed gain comes from using -march/-mtune/-mcpu and only linking against libraries you actually use. Oh, and that text is going to go byebye once we get the new site up. |
|
Back to top |
|
|
truekaiser l33t
Joined: 05 Mar 2004 Posts: 801
|
Posted: Tue Jan 25, 2005 1:27 am Post subject: |
|
|
i am looking thorugh the bugzilla docs and i am wondering why you can't just use it's search features to show only the bugs with sane cflags. |
|
Back to top |
|
|
rhill Retired Dev
Joined: 22 Oct 2004 Posts: 1629 Location: sk.ca
|
Posted: Tue Jan 25, 2005 3:57 am Post subject: |
|
|
ciaranm wrote: | dirtyepic wrote: | freedom of choice is freedom to fuck up our systems if we so choose. please stop trying to protect users from ourselves, dad. just because you've decided something is "sane" doesn't make it law. |
I didn't say we were offering total freedom. Would you like us to give you an option to automatically unmerge glibc after any install? That'd be freedom, so it must be a good thing, right? |
Well, we do have the option to unmerge glibc at any given time if we decide to. We don't because we have half a brain in our heads. Idiot-proofing everything doesn't do anything but keep the idiots around.
Quote: | flag filtering definitely does have it's place. especially in the toolchain, which should never be build with any C/CXX/LD/ASFLAGS set. but everything else is fair fucking game until it is proven to break. i'm sick of this condescending "save-you-from-your-own-stupidity" attitude. we're not users verses develepers. we're a COMMUNITY, and i think some people need to have that drilled into their head. |
Quote: | -ffast-math has been proven to break things. -funroll-loops has been proven to break things. -funroll-all-loops has been proven to break things. -finline-functions has been proven to break things. -frename-registers has been proven to break things. -O3 has been proven to break things. |
Yes, indeed they have broken some things. But they also have been proven to improve some things. -O2 has been proven to break things as well. A kernel won't compile with -O0. Zlib's default optimization is -O3. My point is that there are no safe flags. Your proposal is a good baseline, but to disqualify everything that doesn't fall under it as "ricer" nonsense is a cop-out, and bordering on close-minded ignorance.
Quote: | feel free to toss away as many bug reports as you like, but force your world-view on the community and i think you'll soon find the community forcing right back. |
Quote: | There's this strange theory going around from a few people that a small number of loudmouthed ricers are the Gentoo 'community'. I can assure you that that group are not representative of the Gentoo user base at all, and that their obnoxious behaviour is doing far more harm to the community than anything any developer could possibly try. |
And there are a few loudmouthed developers going around dismissing anything and anyone they disagree with by labeling them with stereotypical racial slurs. I'm sure I'm not the only one who will not stand for that kind of behaviour in my community.
cheers. _________________ by design, by neglect
for a fact or just for effect |
|
Back to top |
|
|
truekaiser l33t
Joined: 05 Mar 2004 Posts: 801
|
Posted: Tue Jan 25, 2005 7:53 pm Post subject: |
|
|
hmm interesting. they can't ignore a few nuts but are perfectly able to ignore the same amount of people in the fourms... |
|
Back to top |
|
|
silverpig Tux's lil' helper
Joined: 10 Dec 2003 Posts: 143 Location: Vancouver BC
|
Posted: Thu Jan 27, 2005 6:57 pm Post subject: |
|
|
-march=pentium-m -02 -fomit-frame-pointer -pipe
Everything works beautifully _________________ 'Cause I can. |
|
Back to top |
|
|
ciaranm Retired Dev
Joined: 19 Jul 2003 Posts: 1719 Location: In Hiding
|
Posted: Thu Jan 27, 2005 7:02 pm Post subject: |
|
|
silverpig wrote: | -march=pentium-m -02 -fomit-frame-pointer -pipe
Everything works beautifully |
You're lying. That can't possibly work. |
|
Back to top |
|
|
lightvhawk0 Guru
Joined: 07 Nov 2003 Posts: 388
|
Posted: Fri Feb 04, 2005 12:31 am Post subject: |
|
|
ciaranm wrote: | silverpig wrote: | -march=pentium-m -02 -fomit-frame-pointer -pipe
Everything works beautifully |
You're lying. That can't possibly work. |
rofl
-march=k8 -O2 -frename-registers
every thing is groovy! _________________ If God has made us in his image, we have returned him the favor. - Voltaire |
|
Back to top |
|
|
rhill Retired Dev
Joined: 22 Oct 2004 Posts: 1629 Location: sk.ca
|
Posted: Fri Feb 04, 2005 2:41 am Post subject: |
|
|
man, i was an ass in this thread. sorry ciaran, you caught me the week my grandpa passed away. _________________ by design, by neglect
for a fact or just for effect |
|
Back to top |
|
|
legine Guru
Joined: 27 May 2004 Posts: 555 Location: Germany
|
Posted: Sun Feb 06, 2005 11:57 am Post subject: |
|
|
Hmm, I believe I use the CFlags given in the Handbook. (Hmm, Okey I did not enter -pipe and forgot to set the CXXFLAG <- put them in hopefully nothing changes )
My gentoo is realy fast. faster then my Fedora installaton. And I am satisfied with the speed I got with this optimisations)
The problem is more Gentoo offeres Choices, the more choices the more people try. Most companies try to chanell the choice (you get what you need) to avoid these problems :/
Which of corse brings other problems up.
I like to have the choice. And I would appreciate if the handbook is linked with a documentation of Flags wich are not to use if you wnat a stable system (and maybe support/right to send in Bug reports). This informs you over the consequneces of the choice you have and everybody (newbees too) when get some general guidance. (which is done best of all Distros I know of)
Some people did say this already, I think, and I like this Idea. I want this attitude backed more up. |
|
Back to top |
|
|
legine Guru
Joined: 27 May 2004 Posts: 555 Location: Germany
|
Posted: Sun Feb 06, 2005 12:42 pm Post subject: |
|
|
Hmm, I do not like Debian because I had bad starting expirence. Its nothing worth speaking of, but I was a real noob with real lack of knowledge (and this I had a lot). Since that time I do not like bunch Mailinglists withup to 600 Mails a day. (I of course got all Mailing list because you never now when you need one )
And I do not like binaries. I never need that what I am looking for. Binaries have the disadvantages that they are no way that flexible like a swift compile.
Now there was a statement that people made theire Choices and try to defend them. I support this!
I believe that this hole a vs. b is natural good thing. (As long as this does not become violent, then you should train you lack of selfcontrol )
IMHO it is good because you can test your choice, if it is right if it is the one you made correct. You lcompare youre choices to others and determine in a confrontation if this is the best to do.
(Thanks for this nice Debian forum! I bookmarked it. Maybe I give them another shot someday.) |
|
Back to top |
|
|
BrightSide n00b
Joined: 29 Dec 2004 Posts: 7 Location: in the dark codewoods
|
Posted: Sat Feb 12, 2005 10:56 pm Post subject: |
|
|
I guess the one thing we call all agree on is: GCC has sometimes been known to break things |
|
Back to top |
|
|
Xaignar Apprentice
Joined: 11 Jun 2003 Posts: 153 Location: Denmark
|
Posted: Sat Feb 12, 2005 11:30 pm Post subject: |
|
|
BrightSide wrote: | I guess the one thing we call all agree on is: GCC has sometimes been known to break things |
Or more generally: Software has bugs, so don't push it. |
|
Back to top |
|
|
Lokheed Veteran
Joined: 12 Jul 2004 Posts: 1295 Location: /usr/src/linux
|
Posted: Sun Feb 13, 2005 1:26 am Post subject: |
|
|
Xaignar wrote: | BrightSide wrote: | I guess the one thing we call all agree on is: GCC has sometimes been known to break things |
Or more generally: Software has bugs, so don't push it. |
There is always a trade off in everything. Balance the boat and you will stay afloat. |
|
Back to top |
|
|
Bob P Advocate
Joined: 20 Oct 2004 Posts: 3355 Location: Jackass! Development Labs
|
Posted: Fri Feb 18, 2005 4:54 am Post subject: |
|
|
dirtyepic wrote: | man, i was an ass in this thread. sorry ciaran, you caught me the week my grandpa passed away. |
sorry to hear about your loss.
i have to say, i don't think that you were an ass in this thread at all -- everything that you said needed to be said, and i enjoyed reading your posts. fwiw, i also think that it is a cop-out for gentoo devs to sweep problems under the rug by summarily turning off -O3 optimizations. if that's the way gentoo is going to be, the Gentoo Handbook should come clean and say that -O3 isn't even offered in gentoo. that way, people will stop wasting their time experimenting in trying to optimize their installations when Big Brother has decided that it isn't good for them to do so. _________________ .
Stage 1/3 | Jackass! | Rockhopper! | Thanks | Google Sucks |
|
Back to top |
|
|
Archangel1 Veteran
Joined: 21 Apr 2004 Posts: 1212 Location: Work
|
Posted: Fri Feb 18, 2005 5:12 am Post subject: |
|
|
I like Hell's idea - a bit more information in the CFLAGS section in the manual wouldn't go amiss. A few more example -march settings maybe, and then say specifically that "-O2 -fomit-frame-pointer -pipe" (or whatever) is okay, and anything else may well lead to problems.
IIRC, the current one makes it sound very open to experimentation. Of course it is, but I think it might encourage a little more recklessness with it than is really a good idea.
However there has to be a happy median; Gentoo is about choice, and we don't want to try to stop users from optimising if they so choose - we just need to make it a bit more obvious that they're not going to get a lot of sympathy if they go beserk on CFLAGS. _________________ What are you, stupid? |
|
Back to top |
|
|
augury l33t
Joined: 22 May 2004 Posts: 722 Location: philadelphia
|
Posted: Mon Mar 14, 2005 7:41 am Post subject: |
|
|
I don't think theres a fully defined set of good/bad flags. gcc is vague in the documentation when it comes to this. the optimizations are simply the algorithms it is programmed to preform. if you like it, take it.
I've used these flags on all packages including striped ebuild and i haven't broken anything (major)
Code: |
LDFLAGS="-Wl,-O1,--sort-common,--allow-shlib-undefined,--allow-multiple-definition,--enable-new-dtags,--hash-size=8161 -z now -z combreloc -z muldefs"
CFLAGS="-DTT_CONFIG_OPTION_BYTECODE_INTERPRETER -pipe -g0 -O3 -march=pentium4 -msse2 -mfpmath=sse -fweb -funswitch-loops -funroll-all-loops -funit-at-a-time -fsched2-use-traces -fsched2-use-superblocks -fsched-stalled-insns=16 -frename-registers -fprefetch-loop-arrays -fpeel-loops -fomit-frame-pointer -fmerge-all-constants -finline-limit=32384 -finline-functions -ffunction-sections -ffast-math -fdata-sections -fbranch-target-load-optimize2"
CXXFLAGS="-DTT_CONFIG_OPTION_BYTECODE_INTERPRETER -pipe -g0 -O3 -march=pentium4 -msse2 -mfpmath=sse -fweb -funswitch-loops -funroll-all-loops -funit-at-a-time -fsched2-use-traces -fsched2-use-superblocks -fsched-stalled-insns=16 -frename-registers -fprefetch-loop-arrays -fpeel-loops -fomit-frame-pointer -fmerge-all-constants -finline-limit=32384 -finline-functions -ffunction-sections -ffast-math -fdata-sections -fbranch-target-load-optimize2 -fabi-version=0 -fvisibility-inlines-hidden -fpermissive -fno-enforce-eh-specs"
|
except glibc
Code: |
CFLAGS="-pipe -O3 -march=pentium4 -msse2 -mfpmath=sse -fweb -funswitch-loops -funroll-all-loops -funit-at-a-time -frename-registers -fprefetch-loop-arrays -fpeel-loops -fomit-frame-pointer -fmerge-all-constants -finline-limit=32384 -finline-functions" (i used ffast-math in pthreads and resolv) |
and binutils. gcc needs -g to be availible. i tryed building a malign-double with packages. python and a few others fail though, so it not real great for a desktop system. im thinking about using mregparms for a piii quad system im about to build since the high mem is so slow. -ffast-math is actually fairly safe flag. -fsingle-precsion-constant break java-script engines (kdelibs & moz builds) and i never saw much speed from it and it makes graphics look not so good.
gcc-4.0.0 has some new opts that make loops run very,very fast. it breaks stuff though but its on its way.
Last edited by augury on Mon Mar 14, 2005 7:55 am; edited 1 time in total |
|
Back to top |
|
|
augury l33t
Joined: 22 May 2004 Posts: 722 Location: philadelphia
|
Posted: Mon Mar 14, 2005 7:48 am Post subject: |
|
|
i also use param's but i pre-defined them into gcc. im pretty sure -O3 is safe on everything since it also is coded to just use -O3 and ftracer unless i -fno each and every flag. |
|
Back to top |
|
|
TheCoop Veteran
Joined: 15 Jun 2002 Posts: 1814 Location: Where you least expect it
|
Posted: Mon Mar 14, 2005 8:23 am Post subject: |
|
|
augury wrote: |
Code: |
LDFLAGS="-Wl,-O1,--sort-common,--allow-shlib-undefined,--allow-multiple-definition,--enable-new-dtags,--hash-size=8161 -z now -z combreloc -z muldefs"
CFLAGS="-DTT_CONFIG_OPTION_BYTECODE_INTERPRETER -pipe -g0 -O3 -march=pentium4 -msse2 -mfpmath=sse -fweb -funswitch-loops -funroll-all-loops -funit-at-a-time -fsched2-use-traces -fsched2-use-superblocks -fsched-stalled-insns=16 -frename-registers -fprefetch-loop-arrays -fpeel-loops -fomit-frame-pointer -fmerge-all-constants -finline-limit=32384 -finline-functions -ffunction-sections -ffast-math -fdata-sections -fbranch-target-load-optimize2"
CXXFLAGS="-DTT_CONFIG_OPTION_BYTECODE_INTERPRETER -pipe -g0 -O3 -march=pentium4 -msse2 -mfpmath=sse -fweb -funswitch-loops -funroll-all-loops -funit-at-a-time -fsched2-use-traces -fsched2-use-superblocks -fsched-stalled-insns=16 -frename-registers -fprefetch-loop-arrays -fpeel-loops -fomit-frame-pointer -fmerge-all-constants -finline-limit=32384 -finline-functions -ffunction-sections -ffast-math -fdata-sections -fbranch-target-load-optimize2 -fabi-version=0 -fvisibility-inlines-hidden -fpermissive -fno-enforce-eh-specs"
|
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! _________________ 95% of all computer errors occur between chair and keyboard (TM)
"One World, One web, One program" - Microsoft Promo ad.
"Ein Volk, Ein Reich, Ein Führer" - Adolf Hitler
Change the world - move a rock |
|
Back to top |
|
|
charlieg Advocate
Joined: 30 Jul 2002 Posts: 2149 Location: Manchester UK
|
Posted: Mon Mar 14, 2005 11:28 am Post subject: |
|
|
Somebody who knows / cares / has-the-time should put up a more detailed page on www.gentoo-wiki.com going over some of the lesser known cflags. Then perhaps people can write down their experiences against each one (packages that don't build, etc).
I found that perl doesn't build with CFLAGS := " -fvisibility=hidden" and CXXFLAGS := " -fvsibility-inlines-hidden" (although I don't know which one specifically causes it to fail, the former probably). _________________ Want Free games?
Free Gamer - open source games list & commentary
Open source web-enabled rich UI platform: Vexi |
|
Back to top |
|
|
charlieg Advocate
Joined: 30 Jul 2002 Posts: 2149 Location: Manchester UK
|
Posted: Mon Mar 14, 2005 11:36 am Post subject: |
|
|
lightvhawk0 wrote: | ciaranm wrote: | silverpig wrote: | -march=pentium-m -02 -fomit-frame-pointer -pipe
Everything works beautifully |
You're lying. That can't possibly work. |
rofl
-march=k8 -O2 -frename-registers
every thing is groovy! |
Quotes "" needed. Plain = won't work.
That and -02 (from sliverpig) is invalid - should be -O2. _________________ Want Free games?
Free Gamer - open source games list & commentary
Open source web-enabled rich UI platform: Vexi |
|
Back to top |
|
|
Birtz Apprentice
Joined: 09 Feb 2005 Posts: 272 Location: Osijek / Croatia
|
Posted: Mon Mar 14, 2005 1:21 pm Post subject: |
|
|
augury wrote: |
except glibc
Code: |
CFLAGS="-pipe -O3 -march=pentium4 -msse2 -mfpmath=sse -fweb -funswitch-loops -funroll-all-loops -funit-at-a-time -frename-registers -fprefetch-loop-arrays -fpeel-loops -fomit-frame-pointer -fmerge-all-constants -finline-limit=32384 -finline-functions" (i used ffast-math in pthreads and resolv) |
and binutils. |
This is a waste of disk space. Your flags are being filtered(TM), no matter how long you would write the line
Unless you have hacked ebuilds for both of them, in your particular case, glibc and binutils gets compiled with;
Code: | CFLAGS="-pipe -O2 -march=pentium4" | And if you have "~x86" in your ACCEPT_KEYWORDS, it adds "-fprefetch-loop-arrays" to it.
Cheers _________________ It is not enough to have a good mind. The main thing is to use it well.
-- Rene Descartes
Don't have a childhood hero? How about Rob Hubbard http://www.freenetpages.co.uk/hp/tcworh/profile.htm |
|
Back to top |
|
|
spb Retired Dev
Joined: 02 Jan 2004 Posts: 2135 Location: Cambridge, UK
|
Posted: Mon Mar 14, 2005 5:02 pm Post subject: |
|
|
augury wrote: | I've used these flags on all packages including striped ebuild and i haven't broken anything (major) | Yes you have. You've completely horked your system, and we know it.
Oh, and glibc locks its CFLAGS at known good values, so that other line you have is doing nothing. -ffast-math is only 'fairly safe' because most of the packages that it breaks filter it out. If you really want to come up with the best set of flags for performance, and don't care about breaking stuff, then you need to define seperate flags for every package, so your stupid flags really aren't doing much to help performance anyway. Please come back when you know something about how the toolchain works. |
|
Back to top |
|
|
|