Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 123215 - media-libs/libmad builds with retarded default CFLAGS
Summary: media-libs/libmad builds with retarded default CFLAGS
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Sound Team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2006-02-17 19:09 UTC by Ryan Hill (RETIRED)
Modified: 2007-07-01 02:33 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
libmad-0.15.1b-configure.patch (libmad-0.15.1b-configure.patch,631 bytes, patch)
2006-02-17 19:09 UTC, Ryan Hill (RETIRED)
Details | Diff
libmad-0.15.1b.ebuild.diff (libmad-0.15.1b.ebuild.diff,714 bytes, patch)
2006-02-17 19:11 UTC, Ryan Hill (RETIRED)
Details | Diff
libmad-0.15.1b-cflags-addon.patch (libmad-0.15.1b-cflags-addon.patch,367 bytes, patch)
2007-05-15 11:52 UTC, Sebastian
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Hill (RETIRED) gentoo-dev 2006-02-17 19:09:07 UTC
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.
Comment 1 Ryan Hill (RETIRED) gentoo-dev 2006-02-17 19:09:49 UTC
Created attachment 80050 [details, diff]
libmad-0.15.1b-configure.patch
Comment 2 Ryan Hill (RETIRED) gentoo-dev 2006-02-17 19:11:56 UTC
Created attachment 80051 [details, diff]
libmad-0.15.1b.ebuild.diff
Comment 3 hiyuh 2006-03-06 12:12:35 UTC
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?
Comment 4 Patrick McLean gentoo-dev 2006-03-10 12:32:30 UTC
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.
Comment 5 Sebastian 2007-05-15 11:51:21 UTC
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
Comment 6 Sebastian 2007-05-15 11:52:28 UTC
Created attachment 119348 [details, diff]
libmad-0.15.1b-cflags-addon.patch
Comment 7 Ryan Hill (RETIRED) gentoo-dev 2007-07-01 02:33:04 UTC
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.