Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Extreme CFLAGS problems...
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9, 10  Next  
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
resolute
n00b
n00b


Joined: 23 Jan 2005
Posts: 29
Location: Texas, USA

PostPosted: Mon Jan 24, 2005 8:32 am    Post subject: Reply with quote

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
View user's profile Send private message
Hell
n00b
n00b


Joined: 05 Dec 2004
Posts: 10

PostPosted: Mon Jan 24, 2005 10:41 am    Post subject: Reply with quote

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
View user's profile Send private message
vdboor
Guru
Guru


Joined: 03 Dec 2003
Posts: 592
Location: The Netherlands

PostPosted: Mon Jan 24, 2005 12:42 pm    Post subject: Reply with quote

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... 8O

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
View user's profile Send private message
ciaranm
Retired Dev
Retired Dev


Joined: 19 Jul 2003
Posts: 1719
Location: In Hiding

PostPosted: Mon Jan 24, 2005 1:19 pm    Post subject: Reply with quote

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... 8O

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
View user's profile Send private message
truekaiser
l33t
l33t


Joined: 05 Mar 2004
Posts: 801

PostPosted: Tue Jan 25, 2005 1:27 am    Post subject: Reply with quote

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
View user's profile Send private message
rhill
Retired Dev
Retired Dev


Joined: 22 Oct 2004
Posts: 1629
Location: sk.ca

PostPosted: Tue Jan 25, 2005 3:57 am    Post subject: Reply with quote

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
View user's profile Send private message
truekaiser
l33t
l33t


Joined: 05 Mar 2004
Posts: 801

PostPosted: Tue Jan 25, 2005 7:53 pm    Post subject: Reply with quote

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
View user's profile Send private message
silverpig
Tux's lil' helper
Tux's lil' helper


Joined: 10 Dec 2003
Posts: 143
Location: Vancouver BC

PostPosted: Thu Jan 27, 2005 6:57 pm    Post subject: Reply with quote

-march=pentium-m -02 -fomit-frame-pointer -pipe

Everything works beautifully :)
_________________
'Cause I can.
Back to top
View user's profile Send private message
ciaranm
Retired Dev
Retired Dev


Joined: 19 Jul 2003
Posts: 1719
Location: In Hiding

PostPosted: Thu Jan 27, 2005 7:02 pm    Post subject: Reply with quote

silverpig wrote:
-march=pentium-m -02 -fomit-frame-pointer -pipe

Everything works beautifully :)

You're lying. That can't possibly work.
Back to top
View user's profile Send private message
lightvhawk0
Guru
Guru


Joined: 07 Nov 2003
Posts: 388

PostPosted: Fri Feb 04, 2005 12:31 am    Post subject: Reply with quote

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
View user's profile Send private message
rhill
Retired Dev
Retired Dev


Joined: 22 Oct 2004
Posts: 1629
Location: sk.ca

PostPosted: Fri Feb 04, 2005 2:41 am    Post subject: Reply with quote

man, i was an ass in this thread. :oops: 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
View user's profile Send private message
legine
Guru
Guru


Joined: 27 May 2004
Posts: 555
Location: Germany

PostPosted: Sun Feb 06, 2005 11:57 am    Post subject: Reply with quote

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
View user's profile Send private message
legine
Guru
Guru


Joined: 27 May 2004
Posts: 555
Location: Germany

PostPosted: Sun Feb 06, 2005 12:42 pm    Post subject: Reply with quote

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
View user's profile Send private message
BrightSide
n00b
n00b


Joined: 29 Dec 2004
Posts: 7
Location: in the dark codewoods

PostPosted: Sat Feb 12, 2005 10:56 pm    Post subject: Reply with quote

I guess the one thing we call all agree on is: GCC has sometimes been known to break things
Back to top
View user's profile Send private message
Xaignar
Apprentice
Apprentice


Joined: 11 Jun 2003
Posts: 153
Location: Denmark

PostPosted: Sat Feb 12, 2005 11:30 pm    Post subject: Reply with quote

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
View user's profile Send private message
Lokheed
Veteran
Veteran


Joined: 12 Jul 2004
Posts: 1295
Location: /usr/src/linux

PostPosted: Sun Feb 13, 2005 1:26 am    Post subject: Reply with quote

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
View user's profile Send private message
Bob P
Advocate
Advocate


Joined: 20 Oct 2004
Posts: 3355
Location: Jackass! Development Labs

PostPosted: Fri Feb 18, 2005 4:54 am    Post subject: Reply with quote

dirtyepic wrote:
man, i was an ass in this thread. :oops: sorry ciaran, you caught me the week my grandpa passed away.

sorry to hear about your loss. :cry:

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
View user's profile Send private message
Archangel1
Veteran
Veteran


Joined: 21 Apr 2004
Posts: 1212
Location: Work

PostPosted: Fri Feb 18, 2005 5:12 am    Post subject: Reply with quote

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
View user's profile Send private message
augury
l33t
l33t


Joined: 22 May 2004
Posts: 722
Location: philadelphia

PostPosted: Mon Mar 14, 2005 7:41 am    Post subject: Reply with quote

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
View user's profile Send private message
augury
l33t
l33t


Joined: 22 May 2004
Posts: 722
Location: philadelphia

PostPosted: Mon Mar 14, 2005 7:48 am    Post subject: Reply with quote

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
View user's profile Send private message
TheCoop
Veteran
Veteran


Joined: 15 Jun 2002
Posts: 1814
Location: Where you least expect it

PostPosted: Mon Mar 14, 2005 8:23 am    Post subject: Reply with quote

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
View user's profile Send private message
charlieg
Advocate
Advocate


Joined: 30 Jul 2002
Posts: 2149
Location: Manchester UK

PostPosted: Mon Mar 14, 2005 11:28 am    Post subject: Reply with quote

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
View user's profile Send private message
charlieg
Advocate
Advocate


Joined: 30 Jul 2002
Posts: 2149
Location: Manchester UK

PostPosted: Mon Mar 14, 2005 11:36 am    Post subject: Reply with quote

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. :wink:

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
View user's profile Send private message
Birtz
Apprentice
Apprentice


Joined: 09 Feb 2005
Posts: 272
Location: Osijek / Croatia

PostPosted: Mon Mar 14, 2005 1:21 pm    Post subject: Reply with quote

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 :wink:
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
View user's profile Send private message
spb
Retired Dev
Retired Dev


Joined: 02 Jan 2004
Posts: 2135
Location: Cambridge, UK

PostPosted: Mon Mar 14, 2005 5:02 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9, 10  Next
Page 6 of 10

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum