Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 376895 - media-sound/aqualung-0.9_beta11-r1 does not respect CFLAGS
Summary: media-sound/aqualung-0.9_beta11-r1 does not respect CFLAGS
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal minor (vote)
Assignee: Daniel Pielmeier
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-29 10:36 UTC by Agostino Sarubbo
Modified: 2011-08-07 10:57 UTC (History)
1 user (show)

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 Agostino Sarubbo gentoo-dev 2011-07-29 10:36:59 UTC
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.
Comment 1 Daniel Pielmeier gentoo-dev 2011-08-01 18:23:14 UTC
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.
Comment 2 Daniel Pielmeier gentoo-dev 2011-08-02 15:09:30 UTC
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.
Comment 3 Agostino Sarubbo gentoo-dev 2011-08-02 15:14:07 UTC
any USEFLAGS must not edits cflags environment.
Comment 4 Samuli Suominen (RETIRED) gentoo-dev 2011-08-07 10:57:12 UTC
+  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