See http://forums.gentoo.org/viewtopic-t-956634.html for details.
If you have some suggestion to update the check and cover this case, please post it (not sure how many values can -gX have)
I'd suggest to change: -if [[ ${MERGE_TYPE} != "binary" ]] && is-flagq "-g*" ; then +if [[ ${MERGE_TYPE} != "binary" ]] && is-flagq "-g*" && ! is-flagq "-g*0" ; then Since we have a lot of -g* flags for the debug, in this manner we are sure that it is here to negate the debug like -g0 What do you think?
(In reply to comment #2) > What do you think? Good idea! + 01 May 2013; Alexandre Rostovtsev <tetromino@gentoo.org> + webkit-gtk-1.8.3-r200.ebuild, webkit-gtk-1.8.3-r201.ebuild, + webkit-gtk-1.8.3-r300.ebuild, webkit-gtk-1.10.2-r300.ebuild, + webkit-gtk-2.0.0.ebuild, webkit-gtk-2.0.1.ebuild: + Don't treat -g0 as a debugging flag (bug #465406, thanks to Tom Wijsman and + Agostino Sarubbo).
(In reply to comment #3) > (In reply to comment #2) > > What do you think? > > Good idea! I just need to point another fact. in case like: CFLAGS="-g0 -g" emerge foo, gcc will see the last declaration of -g, so it will add the debug symbols. In case of this pkg_pretend(), CFLAGS="-g0 -g" the check will not done because of the presence of -g0 Obviously declare "-g0 -g" is a sort of non-sense but it may happen.