libmad currently builds with the CFLAGS pre-defined in its configure.ac file (-O -fforce-mem -fforce-addr -fthread-jumps -fcse-follow-jumps -fcse-skip-blocks -fexpensive-optimizations -fregmove -fschedule-insns2 -fstrength-reduce -fomit-frame-pointer). this goes against gentoo's policy and can cause breakage as arch ABI specific flags are thrown out. GCC 4.1 has also depreciated -fforce-mem and it causes a build error. attached is a patch and ebuild diff against libmad-0.15.1b.
Created attachment 80050 [details, diff] libmad-0.15.1b-configure.patch
Created attachment 80051 [details, diff] libmad-0.15.1b.ebuild.diff
I'm on ppc box, and use sys-devel/gcc-4.0.2-r3. media-libs/libmad in official tree is emerged successfully, but media-sound/madplay sounds noise with any mp3 files. Now, I tried this patch and ebuild, libmad seems work fine. That means media-sound/madplay sounds fine without noise. Ryan Hill: Should this bug block #117482 for tracking gcc-4.x porting?
media-libs/libmad-0.15.1b-r1 added to CVS with a slightly different patch that makes the configure script not add the dangerous optimization flags.
This is great but you forgot the -O2 guys. configure.ac still turns -O2 into -O. I'll attach a small addon diff. Regards Sebastian
Created attachment 119348 [details, diff] libmad-0.15.1b-cflags-addon.patch
i'm still not sure why commenting out bits of the optimize part of configure.ac is better than just not calling it, but okay. thanks.