Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 512534

Summary: flag-o-matic.eclass -- whitelist -Og
Product: Gentoo Linux Reporter: David Heidelberg (okias) <david>
Component: EclassesAssignee: Gentoo Toolchain Maintainers <toolchain>
Status: RESOLVED FIXED    
Severity: normal Keywords: PATCH
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description David Heidelberg (okias) 2014-06-05 20:36:31 UTC
A new general optimization level, -Og, has been introduced. It addresses the need for fast compilation and a superior debugging experience while providing a reasonable level of runtime performance. Overall experience for development should be better than the default optimization level -O0.
Source: https://gcc.gnu.org/gcc-4.8/changes.html

Such wow! We should totally allow this -O0 variant which making debugging easy. Tested with app-emulation/wine.

diff -Naur a/flag-o-matic.eclass b/flag-o-matic.eclass
--- a/flag-o-matic.eclass	2014-06-05 22:21:16.226251559 +0200
+++ b/flag-o-matic.eclass	2014-06-05 22:21:47.354252655 +0200
@@ -24,7 +24,7 @@
 # Note: shell globs and character lists are allowed
 setup-allowed-flags() {
 	ALLOWED_FLAGS="-pipe"
-	ALLOWED_FLAGS+=" -O -O1 -O2 -Os -mcpu -march -mtune"
+	ALLOWED_FLAGS+=" -O -O1 -O2 -Og -Os -mcpu -march -mtune"
 	ALLOWED_FLAGS+=" -fstack-protector -fstack-protector-all"
 	ALLOWED_FLAGS+=" -fbounds-checking -fno-strict-overflow"
 	ALLOWED_FLAGS+=" -fno-PIE -fno-pie -fno-unit-at-a-time"


Reproducible: Always
Comment 1 David Heidelberg (okias) 2014-06-05 20:44:24 UTC
Jeroen Roovers, such boring summary.. you always take all fun from it...
Comment 2 Ryan Hill (RETIRED) gentoo-dev 2014-06-14 07:38:27 UTC
+  14 Jun 2014; Ryan Hill <rhill@gentoo.org> flag-o-matic.eclass:
+  Add -Og, -gdwarf-*, and -fabi-version=* to allowed flags (bug #512534,
+  #512754).  Use a glob for -fstack-protector and friends.

http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.198&r2=1.199