x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -pthread -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng14 -I/usr/include/libdrm -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/libxml2 -I/usr/include/alsa -D_REENTRANT -march=native -O2 -g0 -rdynamic -ggdb -g -O0 -Wall -DAQUALUNG_SKINDIR=\"/usr/share/aqualung/skin\" -DAQUALUNG_LOCALEDIR=\"/usr/share/locale\" -DAQUALUNG_DATADIR=\"/usr/share/aqualung\" -D_GNU_SOURCE -MT store_cdda.o -MD -MP -MF .deps/store_cdda.Tpo -c -o store_cdda.o store_cdda.c mv -f .deps/search_playlist.Tpo .deps/search_playlist.Po Please drop -ggdb -g and -O0 and what you believe is not need.
Does it work if you build with USE="-debug". I only get this output with the debug USE flag enabled. You are correct with not respecting CFLAGS, as it appends -O2 for release (USE="-debug") builds. This should be fixed now.
from aqualung configure.ac it does: 11 AC_ARG_ENABLE( 12 debug, 13 [ --enable-debug=yes,no compile with debugging support (default: no)], 14 debug="$enableval", 15 debug="no") 16 if test "$debug" = "yes"; then 17 buildtype=debug 18 BUILD_CFLAGS="-rdynamic -ggdb -g -O0" 19 AC_DEFINE([DEBUG_BUILD], [1], [Defined if doing a debug build]) 20 AC_MSG_RESULT(debug) 21 else 22 buildtype=release 23 BUILD_CFLAGS="-O2" 24 AC_DEFINE([RELEASE_BUILD], [1], [Defined if doing a release build]) 25 AC_MSG_RESULT(release) 26 fi and later: 944 CFLAGS="$CFLAGS $BUILD_CFLAGS -Wall $PLATFORM_CFLAGS $AQUALUNG_SKINDIR $AQUALUNG_LOCALEDIR $AQUALUNG_DATADIR -D_GNU_SOURCE" If you enable debugging it appends "-rdynamic -ggdb -g -O0" and if you disable it "-O2" is appended. For debugging I would say it is okay to append those flags but it should not append anything for a non debug build as this overwrites the users CFLAGS thus I removed the -O2 for release build via sed. Another possible solution would be to put $BUILD_CFLAGS before $CFLAGS. This way the user specified CFLAGS are respected in any case.
any USEFLAGS must not edits cflags environment.
+ 07 Aug 2011; Samuli Suominen <ssuominen@gentoo.org> + aqualung-0.9_beta11-r1.ebuild: + Leave setting -g and -O levels to user with debug build wrt #376895