Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 237927 - dev-db/sqlite-3.6.2 ebuild should filter ffast-math flag
Summary: dev-db/sqlite-3.6.2 ebuild should filter ffast-math flag
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Petteri Räty (RETIRED)
URL:
Whiteboard:
Keywords:
: 258715 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-09-17 12:45 UTC by PM
Modified: 2009-03-02 08:30 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description PM 2008-09-17 12:45:16 UTC
dev-db/sqlite-3.6.2 fails to build with -ffast-math CFLAG:

sqlite3.c:18431:3: error: #error SQLite will not work correctly with the -ffast-math option of GCC.

It's ebuild shoul filter that flag

Reproducible: Always

Steps to Reproduce:
1.add -ffast-math to CFLAGS
2.emerge =dev-db/sqlite-3.6.2


Actual Results:  
doesn't build

Expected Results:  
build
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2008-09-17 18:27:49 UTC
I doubt whether you'll find support for that. -ffast-math should simply never be used.
Comment 2 Petteri Räty (RETIRED) gentoo-dev 2008-09-17 19:39:35 UTC
       -ffast-math

           This option is not turned on by any -O option since it can result in incorrect output for programs which depend on an exact implementation of IEEE or ISO rules/specifications for math functions. It
           may, however, yield faster code for programs that do not require the guarantees of these specifications.

As this flag is not really supported to be set globally you should do the filtering in your /etc/portage/bashrc yourself.
Comment 3 PM 2008-09-17 19:47:27 UTC
Well, I think i read somewhere that it's safe add ffast-math to cflags since all the ebuilds that get broken by it filter it. I guess not...

What's that /etc/portage/bashrc ? I don't have it and never heard of it.
Comment 4 Petteri Räty (RETIRED) gentoo-dev 2008-09-17 20:56:02 UTC
(In reply to comment #3)
> Well, I think i read somewhere that it's safe add ffast-math to cflags since
> all the ebuilds that get broken by it filter it. I guess not...
> 
> What's that /etc/portage/bashrc ? I don't have it and never heard of it.
> 

Ask on one of our support IRC channels or mailing lists. In short it's a way to customize almost every aspect of a single ebuild emerge.
Comment 5 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2009-02-12 11:38:29 UTC
*** Bug 258715 has been marked as a duplicate of this bug. ***
Comment 6 svrmarty 2009-02-13 09:49:05 UTC
requesting to reopen this
and filtering out the flag
Comment 7 Petteri Räty (RETIRED) gentoo-dev 2009-02-13 12:04:24 UTC
(In reply to comment #6)
> requesting to reopen this
> and filtering out the flag
> 

Why?
Comment 8 Risto A. Paju 2009-03-02 08:30:15 UTC
(In reply to comment #7)
> (In reply to comment #6)
> > requesting to reopen this
> > and filtering out the flag
> > 
> 
> Why?

I think it is obvious from the beginning. Since sqlite fails to build with this flag, it should be filtered out.

In my experience, sqlite is the only package that has problems with -ffast-math. I do computational physics so I do run into issues with CFLAGS occasionally.

Also, I understand that many people want to keep -ffast-math completely out of their system. For those people, there is no harm in having the filtering option in sqlite.

Gentoo should be all about choice, and ebuilds should be fixed to allow more choice. Simply saying that nobody should use -ffast-math ever is not a very creative solution to this particular problem, as we already have the framework for filtering CFLAGS.