Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Discussion & Documentation Gentoo Chat
  • Search

Extreme CFLAGS problems...

Opinions, ideas and thoughts about Gentoo. Anything and everything about Gentoo except support questions.
Post Reply
  • Print view
Advanced search
246 posts
  • Page 9 of 10
    • Jump to page:
  • Previous
  • 1
  • …
  • 6
  • 7
  • 8
  • 9
  • 10
  • Next
Author
Message
racoontje
Veteran
Veteran
Posts: 1290
Joined: Mon Jul 19, 2004 8:58 pm

  • Quote

Post by racoontje » Fri Apr 01, 2005 11:41 am

lamaistres wrote:Can someone give me the name of an ebuild that breaks when I compile with -ffast-math. I'm just curious.
There should be none left, plenty of ebuilds filter CFLAGS (especially totally nutty ones like -ffast-math) so you dont hurt yourself while running with razors ;-)
Top
kimchi_sg
Advocate
Advocate
Posts: 3039
Joined: Fri Nov 26, 2004 11:11 am

  • Quote

Post by kimchi_sg » Fri Apr 01, 2005 11:43 am

yogi85 wrote:
"-march=pentium3 -O2 -fweb -pipe -fomit-frame-pointer -ftracer -fforce-addr -ftree-vectorize -ftree-vectorizer-verbose=1 "
8O can anyone explain to me wat is this vectorizer thingy doing there....i thought it something got to do with graphics thing...if it is...can i compile it with gimp??
Please, don't play with fire.

Dangerous CFLAGS, such as the whole list you quoted, are the Gentoo equivalent of matches and fire. Don't even think of them.
Top
racoontje
Veteran
Veteran
Posts: 1290
Joined: Mon Jul 19, 2004 8:58 pm

  • Quote

Post by racoontje » Fri Apr 01, 2005 12:19 pm

Some of it is sane. -fweb is in the orange zone (should be OK but not guaranteed), but it's almost like the author snorted Columbian sugar about halfway down the list.
Is -ftree-vectorize even a CFLAG? Doesn't show up in the gcc manual...
Top
allanw
Arch/Herd Tester
Arch/Herd Tester
Posts: 60
Joined: Wed Mar 02, 2005 12:10 am

  • Quote

Post by allanw » Fri Apr 01, 2005 3:55 pm

It's one of those new gcc4 optimizations.
Top
kimchi_sg
Advocate
Advocate
Posts: 3039
Joined: Fri Nov 26, 2004 11:11 am

  • Quote

Post by kimchi_sg » Fri Apr 01, 2005 4:04 pm

allanw wrote:It's one of those new gcc4 optimizations.
Read that as
It's one of those new shiny nuclear warheads that will immediately toast your Gentoo system and reduce it to a smoking pile of ash.
Top
racoontje
Veteran
Veteran
Posts: 1290
Joined: Mon Jul 19, 2004 8:58 pm

  • Quote

Post by racoontje » Fri Apr 01, 2005 7:52 pm

kimchi_sg wrote:
allanw wrote:It's one of those new gcc4 optimizations.
Read that as
It's one of those new shiny nuclear warheads that will immediately toast your Gentoo system and reduce it to a smoking pile of ash.
I thought even ciaranm once said that vectorizing is silly, but shouldn't break anything. Unlike fuzzy logic options like -ffast-math ;-)
Top
fca
Guru
Guru
Posts: 346
Joined: Sat Feb 22, 2003 5:14 pm
Location: Netherlands

  • Quote

Post by fca » Fri Apr 01, 2005 8:20 pm

lamaistres wrote:Can someone give me the name of an ebuild that breaks when I compile with -ffast-math. I'm just curious.
Packages that break with -ffast-math forced are roughly 2 categories:
System libraries
Things that implement math functions in a funky way (gmp comes to mind).

Other things should not be broken by -ffast-math. I've tested it, and all audio/video encoding programs that I've tested function correctly with -ffast-math. In fact, a lot of them recommend setting it (or default to it), because of the thing it does: speed up floating-point operations at the cost of correctness in corner cases. System libraries and funky math libraries cannot stand it, because of the exact same thing. However, it doesn't mean -ffast-math shouldn't be used at all. In fact, I've used it on code that I used to calculate things for my thesis. Why? Because it sped things up, and it didn't break the code. Results were the same, just a measly 10% faster, which matters a lot if you're running the thing for about a week.

I think this thread is going a bit too far in bunking crazy CFLAGS. They have their uses sometimes, GCC authors do not implement them because they feel a need for broken flags or something. It's just that many of them have uses that a normal Gentoo user doesn't come close to, but sometimes they can be useful. Some flags considered stable by Gentoo developers are considered broken or not ready by GCC developers (-fstack-protector, -fvisibility-inlines-hidden), and vice versa.

Calling new gcc4 optimizations nuclear warheads or something isn't going to help them become stable. If you dare, test them, if you don't dare, wait for others to test them.
Top
racoontje
Veteran
Veteran
Posts: 1290
Joined: Mon Jul 19, 2004 8:58 pm

  • Quote

Post by racoontje » Fri Apr 01, 2005 8:21 pm

fca wrote:
lamaistres wrote:Can someone give me the name of an ebuild that breaks when I compile with -ffast-math. I'm just curious.
Packages that break with -ffast-math forced are roughly 2 categories:
System libraries
Things that implement math functions in a funky way (gmp comes to mind).

Other things should not be broken by -ffast-math. I've tested it, and all audio/video encoding programs that I've tested function correctly with -ffast-math. In fact, a lot of them recommend setting it (or default to it), because of the thing it does: speed up floating-point operations at the cost of correctness in corner cases. System libraries and funky math libraries cannot stand it, because of the exact same thing. However, it doesn't mean -ffast-math shouldn't be used at all. In fact, I've used it on code that I used to calculate things for my thesis. Why? Because it sped things up, and it didn't break the code. Results were the same, just a measly 10% faster, which matters a lot if you're running the thing for about a week.

I think this thread is going a bit too far in bunking crazy CFLAGS. They have their uses sometimes, GCC authors do not implement them because they feel a need for broken flags or something. It's just that many of them have uses that a normal Gentoo user doesn't come close to, but sometimes they can be useful. Some flags considered stable by Gentoo developers are considered broken or not ready by GCC developers (-fstack-protector, -fvisibility-inlines-hidden), and vice versa.

Calling new gcc4 optimizations nuclear warheads or something isn't going to help them become stable. If you dare, test them, if you don't dare, wait for others to test them.
Please give me the source of said thesis code.
Top
ciaranm
Retired Dev
Retired Dev
User avatar
Posts: 1719
Joined: Sat Jul 19, 2003 11:04 pm
Location: In Hiding
Contact:
Contact ciaranm
Website

  • Quote

Post by ciaranm » Fri Apr 01, 2005 9:00 pm

fca wrote:Packages that break with -ffast-math forced are roughly 2 categories:
System libraries
Things that implement math functions in a funky way (gmp comes to mind).

Other things should not be broken by -ffast-math.
Complete bollocks. Anything that uses floating point that has not explicitly been designed to work with -ffast-math will be broken.
Paludis 0.12, 127.35% Portage compatible and six times faster.
Top
slikdigit
n00b
n00b
Posts: 73
Joined: Fri Aug 30, 2002 7:28 pm
Location: US

  • Quote

Post by slikdigit » Fri Apr 01, 2005 9:03 pm

I remember somewhere someone optimised blender with fastmath (not in gentoo, and not me) and got ugly render artifacts.
I like tapes.
Top
kimchi_sg
Advocate
Advocate
Posts: 3039
Joined: Fri Nov 26, 2004 11:11 am

  • Quote

Post by kimchi_sg » Sat Apr 02, 2005 12:44 am

slikdigit wrote:I remember somewhere someone optimised blender with fastmath (not in gentoo, and not me) and got ugly render artifacts.
If it breaks, you get to keep the pieces. :lol:
Top
racoontje
Veteran
Veteran
Posts: 1290
Joined: Mon Jul 19, 2004 8:58 pm

  • Quote

Post by racoontje » Sat Apr 02, 2005 10:06 am

Not surprising that they get ugly render artifacts, after all, their floating point is all broked.

Btw ciaranm is it possible to get code to play nicely with -ffast-math and still have it work with non-ffast-math?
Top
ciaranm
Retired Dev
Retired Dev
User avatar
Posts: 1719
Joined: Sat Jul 19, 2003 11:04 pm
Location: In Hiding
Contact:
Contact ciaranm
Website

  • Quote

Post by ciaranm » Sat Apr 02, 2005 4:46 pm

racoontje wrote:Not surprising that they get ugly render artifacts, after all, their floating point is all broked.

Btw ciaranm is it possible to get code to play nicely with -ffast-math and still have it work with non-ffast-math?
Oh, sure. 'All' you have to do to get your code to play nice with -ffast-math is to make sure it will never generate any floating point exceptions, that it doesn't rely too heavily on precision and that the occasional utterly screwy result makes no difference. Relying upon -ffast-math's broken behaviour would be utterly weird -- taking it into account and allowing for it, on the other hand, is useful sometimes.
Paludis 0.12, 127.35% Portage compatible and six times faster.
Top
IvanYosifov
l33t
l33t
User avatar
Posts: 778
Joined: Fri Oct 15, 2004 6:33 pm
Location: Bulgaria

  • Quote

Post by IvanYosifov » Sat Apr 02, 2005 9:34 pm

Can someone pinpoint a concreate package that is known to break with -ffast-math and does not filter the flag already ?
Top
ciaranm
Retired Dev
Retired Dev
User avatar
Posts: 1719
Joined: Sat Jul 19, 2003 11:04 pm
Location: In Hiding
Contact:
Contact ciaranm
Website

  • Quote

Post by ciaranm » Sat Apr 02, 2005 9:45 pm

IvanYosifov wrote:Can someone pinpoint a concreate package that is known to break with -ffast-math and does not filter the flag already ?
dev-lang/perl
Paludis 0.12, 127.35% Portage compatible and six times faster.
Top
IvanYosifov
l33t
l33t
User avatar
Posts: 778
Joined: Fri Oct 15, 2004 6:33 pm
Location: Bulgaria

  • Quote

Post by IvanYosifov » Sun Apr 03, 2005 9:24 am

Ok... I emerged perl with -ffast-math. It compiled. How do I make it crash and burn ?
Top
ciaranm
Retired Dev
Retired Dev
User avatar
Posts: 1719
Joined: Sat Jul 19, 2003 11:04 pm
Location: In Hiding
Contact:
Contact ciaranm
Website

  • Quote

Post by ciaranm » Sun Apr 03, 2005 9:28 am

IvanYosifov wrote:Ok... I emerged perl with -ffast-math. It compiled. How do I make it crash and burn ?
Do some floating point code that raises time-critical exceptions.
Paludis 0.12, 127.35% Portage compatible and six times faster.
Top
IvanYosifov
l33t
l33t
User avatar
Posts: 778
Joined: Fri Oct 15, 2004 6:33 pm
Location: Bulgaria

  • Quote

Post by IvanYosifov » Sun Apr 03, 2005 9:43 am

Do some floating point code that raises time-critical exceptions.
I could do that in C, compile with -ffast-math, and conclude that gcc is broken.

The wording of my original question was wrong, sorry. I am trying to understand the real negative effects
of -ffast-math. So the question I wanted to ask is: are there any ebuilds that will be broken out of the box? Interpreters I can brake with code writen by me do not count. If some perl package, however, contains such code - it does count.
Top
whitesouls
Guru
Guru
User avatar
Posts: 358
Joined: Fri Nov 19, 2004 9:02 am
Location: In Front of My Laptop

  • Quote

Post by whitesouls » Sun Apr 03, 2005 11:13 am

no wonder last time my system broke...i used the -fweb -ffast-math together...cant get the system at all...kept on receving errors...

Code: Select all

CFLAGS="-O3 -march=pentium3 -pipe -fomit-frame-pointer -minline-all-stringops -foptim
ize-sibling-calls -fcaller-saves -falign-functions=64 -finline-functions -funit-at-a-
time"
is this cflags ok??i'm using now and kimchi..i would like to see ur cflags if possible..thanks..:D
whitesouls

Please insert the [SOLVED] tag if your problem is solved in your respective thread.
Top
kimchi_sg
Advocate
Advocate
Posts: 3039
Joined: Fri Nov 26, 2004 11:11 am

  • Quote

Post by kimchi_sg » Sun Apr 03, 2005 11:58 am

yogi85 wrote:

Code: Select all

CFLAGS="-O3 -march=pentium3 -pipe -fomit-frame-pointer -minline-all-stringops -foptimize-sibling-calls -fcaller-saves -falign-functions=64 -finline-functions -funit-at-a-
time"
is this cflags ok??
Seriously, I think everything in there should be taken out, except for "-O3 -march=pentium3 -pipe -fomit-frame-pointer".

I've used Gentoo long enough to wean myself off most of the CFLAGS hype already.
yogi85 wrote:i'm using now and kimchi..i would like to see ur cflags if possible..thanks..:D
Here's mine. I use only the ones "recommended" in the Stage 1-on-3 tutorial:

Code: Select all

shrek@maximus ~ $ grep ^CFLAGS /etc/make.conf
CFLAGS="-march=pentium4 -mtune=pentium4 -O3 -pipe -fomit-frame-pointer -momit-leaf-frame-pointer -fforce-addr -ftracer"
shrek@maximus ~ $ grep ^CXXFLAGS /etc/make.conf
CXXFLAGS="${CFLAGS} -fvisibility-inlines-hidden"
Top
Helena
Veteran
Veteran
User avatar
Posts: 1114
Joined: Wed Apr 02, 2003 12:06 pm
Location: Den Dolder, The Netherlands

  • Quote

Post by Helena » Sun Apr 03, 2005 12:34 pm

kimchi_sg wrote:Here's mine. I use only the ones "recommended" in the Stage 1-on-3 tutorial:

Code: Select all

shrek@maximus ~ $ grep ^CFLAGS /etc/make.conf
CFLAGS="-march=pentium4 -mtune=pentium4 -O3 -pipe -fomit-frame-pointer -momit-leaf-frame-pointer -fforce-addr -ftracer"
shrek@maximus ~ $ grep ^CXXFLAGS /etc/make.conf
CXXFLAGS="${CFLAGS} -fvisibility-inlines-hidden"
After reading almost this entire thread I was already wondering why a bug that I filed with the same CFLAGS setting was even being considered :? . I am very happy with this 1-on-3 system, it feels much faster than the traditional set-up I have running in parallel (it's a multi-boot system) and consider myself a sane Gentoo user. There's only 1 library that did not compile and one flag had to be filtered out. True, I needed a bug report to find that out.

So I guess I'll stay on this route and eventually abandon the other set-up...:)
Top
kimchi_sg
Advocate
Advocate
Posts: 3039
Joined: Fri Nov 26, 2004 11:11 am

  • Quote

Post by kimchi_sg » Sun Apr 03, 2005 12:36 pm

Helena wrote:After reading almost this entire thread I was already wondering why a bug that I filed with the same CFLAGS setting was even being considered ... There's only 1 library that did not compile and one flag had to be filtered out...
Please tell us what that library or package was. :)
Top
whitesouls
Guru
Guru
User avatar
Posts: 358
Joined: Fri Nov 19, 2004 9:02 am
Location: In Front of My Laptop

  • Quote

Post by whitesouls » Sun Apr 03, 2005 1:03 pm

:D ...kimchi..i'm using this cflags but there's no poblem except for compiling firefox and mozilla with ldflags

Code: Select all

LDFLAGS="-Wl,-O1 -Wl,--sort-common -s -z now"
and for me it looks stable..the method stage 1 on 3...i was doing tht without realising there's a guide in the forums...i realised this when i went thru the documentation and tips....may i know why did you ask me to take out everything...

Code: Select all

-momit-leaf-frame-pointer -fforce-addr -ftracer
1. Please tell me wat this line does and

Code: Select all

CXXFLAGS="${CFLAGS} -fvisibility-inlines-hidden"
2. Is this line is applicable in gcc 3.4.3 and i'm puzzled what this line actually does.....
3.Kimchi, are you tuning your system to be hard and stable or more towards performance?

coz i guess there should be a certain flags where it ensures both stability as well as performance there rather than leaving it as normal cflags

Code: Select all

"-march=pentium4 -mtune=pentium4 -O3 -pipe -fomit-frame-pointer"
whitesouls

Please insert the [SOLVED] tag if your problem is solved in your respective thread.
Top
Helena
Veteran
Veteran
User avatar
Posts: 1114
Joined: Wed Apr 02, 2003 12:06 pm
Location: Den Dolder, The Netherlands

  • Quote

Post by Helena » Sun Apr 03, 2005 1:57 pm

kimchi_sg wrote:
Helena wrote:After reading almost this entire thread I was already wondering why a bug that I filed with the same CFLAGS setting was even being considered ... There's only 1 library that did not compile and one flag had to be filtered out...
Please tell us what that library or package was. :)
Sorry didn't think it was important at this point.:o

It was libsdl-1.2.8-r1 and the flag was -fforce-addr. See http://bugs.gentoo.org/show_bug.cgi?id=87077


/EDIT: fixed the bug URL.
Top
whitesouls
Guru
Guru
User avatar
Posts: 358
Joined: Fri Nov 19, 2004 9:02 am
Location: In Front of My Laptop

  • Quote

Post by whitesouls » Mon Apr 04, 2005 4:08 am

So, kimchi...or anybody...please answer my question coz i'm kind of blur of this cflags rite now....
whitesouls

Please insert the [SOLVED] tag if your problem is solved in your respective thread.
Top
Post Reply
  • Print view

246 posts
  • Page 9 of 10
    • Jump to page:
  • Previous
  • 1
  • …
  • 6
  • 7
  • 8
  • 9
  • 10
  • Next

Return to “Gentoo Chat”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic