Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 390147 - Chromium should refuse to emerge with ffast-math cflag (sqlite.o build will always fail)
Summary: Chromium should refuse to emerge with ffast-math cflag (sqlite.o build will a...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal minor
Assignee: Chromium Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-11 03:30 UTC by Alex Boyd
Modified: 2012-01-01 09:53 UTC (History)
0 users

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 Alex Boyd 2011-11-11 03:30:26 UTC
Just noticed this today, I was trying to upgrade to www-client/chromium-17.0.928.0 and it would fail when building sqlite.o, but then I remembered when I was attempting to emerge sqlite ages ago with the -ffast-math cflag that it would refuse to build with it because it would break it, so a warning, or a complete refusal to build with -ffast-math should probably be added.

Reproducible: Always

Steps to Reproduce:
1.Attempt to compile chromium with -ffast-math cflag
2.Let it build until it fails at sqlite.o
Actual Results:  
Emerging fails at the compiling of sqlite.o

Expected Results:  
A warning or refusal to emerge chromium with -ffast-math
Comment 1 Alex Boyd 2011-11-11 05:01:40 UTC
By the way, I don't really know if this is something I should be reporting as a bug, I more than know it's stupid to have ffast-math as a cflag (it was only being used globally since I forgot to remove it) but a warning/refusal to build comes up when you build dev-db/sqlite with ffast-math so I would think it should also come up here when building the internal sqlite for chromium.

I'm pretty new to bug reporting (if you couldn't already tell :p) so sorry if this isn't justified, as aforementioned I noticed it happens with other packages so should probably happen with chromium.
Comment 2 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2011-11-11 12:41:23 UTC
Working on a fix.
Comment 3 Richard Freeman gentoo-dev 2011-11-11 14:34:50 UTC
Certainly no harm in filtering it but it is worth nothing that probably 90% of the packages in the tree will suffer from this same "bug" - as you've already noted it isn't really something that should go in CFLAGS except on a per-package (or more likely per-file) basis.
Comment 4 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2011-11-11 15:48:19 UTC
Fixed without revbump. Used strip-flags.
Comment 5 Daniel Douglas 2011-12-07 02:27:59 UTC
Why not filter-flags instead? Last I checked chromium had no problems with -O3 or graphite flags. BTW, v8 with -ffast-math builds but crashes predictably in certain  situations as well.
Comment 6 Mike Gilbert gentoo-dev 2011-12-07 03:08:17 UTC
We don't want to play whack-a-mole with compiler flags.
Comment 7 Richard Freeman gentoo-dev 2011-12-07 13:48:00 UTC
(In reply to comment #6)
> We don't want to play whack-a-mole with compiler flags.

I'm not a big fan of strip-flags in general - it seems contrary to the nature of Gentoo.  If I build a package with complicated CFLAGS and run into problems then I build it without complicated CFLAGS.  I think that it is generally accepted that bugs can be closed as invalid when reported with crazy CFLAGS so you don't need to try to filter them all.  Users will file invalid bugs no matter what you put in the ebuild, so why punish users who know what they're doing?

On the other hand, I see that the two flags that I would point out as being safe are apparently now bundled in -O2 anyway.
Comment 8 Mike Gilbert gentoo-dev 2011-12-08 04:51:56 UTC
(In reply to comment #7)

I don't really feel strongly about this either way. Paweł is the one that needs convincing.

I generally prefer to let people shoot themselves in the foot, so long as they are warned.
Comment 9 Daniel Douglas 2011-12-30 23:55:36 UTC
In case someone cares enough, here's the nasty bashrc hack I use to set arbitrary flags on Chromium. Obviously not guaranteed to work in the future (exploit redefining a function currently called after the strip-flags). e.g: reset graphite and switch to -O3.

if [[ $CATEGORY == www-client && $PN == chromium ]]; then
	pre_src_configure() {
		egyp() {
			replace-flags '-O2' '-O3'
			append-flags '-floop-interchange' '-floop-strip-mine' '-floop-block'
			local -a cmd=( 'build/gyp_chromium' '--depth=.' "${@}" )
			printf '<%q> ' "${cmd[@]}" >&2
			"${cmd[@]}"
		}
	}
fi
Comment 10 Mike Gilbert gentoo-dev 2012-01-01 09:53:34 UTC
Ok, since we clearly have some determined people who want to live dangerously, I have added a custom-cflags USE flag that will prevent the replace-flags and strip flags functions from being called. You will find it on the latest dev channel and live ebuilds.

On the dev side, this should be better than trying to troubleshoot random bashrc hooks.