$ ./configure --help | grep debug --enable-debug add -g we can do this with CFLAGS.
Fair enough, fixed.
You are wrong, read configure, USE debug should not be removed. '--enable-debug' also removes -ffast-math -fomit-frame-pointer from CFLAGS and replaces -O3 with -O1. USE="-debug": x86_64-pc-linux-gnu-gcc -Wshadow -O3 -ffast-math -m64 -march=corei7-avx -pipe -Wall -I. -I. -std=gnu99 -fPIC -fomit-frame-pointer -fno-tree-vectorize -c -o common/mc.o common/mc.c USE="debug": x86_64-pc-linux-gnu-gcc -Wshadow -O1 -g -m64 -march=corei7-avx -pipe -Wall -I. -I. -std=gnu99 -fPIC -fno-tree-vectorize -c -o common/mc.o common/mc.c And we can not be sure, that upstream does not change behaviour of --enable-debug. Having this USE does not create any maintenance burden.
(In reply to Nikoli from comment #2) yes; this goes with the fact that it should also honour cflags :)
Default upstream CFLAGS are fine, users normally want them for x264, not slow -O2.
(In reply to Nikoli from comment #4) users normally want the CFLAGS they have set in make.conf; some exceptions are -ffast-math because it cannot work globally and -fomit-frame-pointer when needed for inline asm
x264 upstream is strongly against using -O2 for x264 packages. But we do not want -O3 for all packages.
(In reply to Nikoli from comment #6) > x264 upstream is strongly against using -O2 for x264 packages. But we do not > want -O3 for all packages. I'm sorry but this is just nonsense: - we're talking about a flag that changes -O3 to -O1 - this is against gentoo policy - the difference between O2 and O3 tends to change between gcc versions so this statement without gcc version is not well defined - upstream used to have -O4 (omg so fast) until they realized clang produced bytecode with this - -O3 can be enabled globally, it is generally not because it often produces slower programs even if there were serious reasons for using -O3, replace-flags is much cleaner.
19 Jun 2013; Patrick McLean <chutz@gentoo.org> x264-0.0.20130506.ebuild, x264-9999.ebuild: Remove the debug USE flag as all it does is add -g to the CFLAGS (bug #473814).