I just completed a clean gentoo install with GCC 4.1.1 on my PPC machine, and everything was fine, except for libmad. It compiled just fine, but when it came to actually playing anything with mp3 sound (avi file, or just mp3) all I got was hiss. To solve it, I had to change my CFLAGS from: CFLAGS="-O3 -mcpu=G4 -mtune=G4 -maltivec -mabi=altivec -fomit-frame-pointer -pipe" to: CFLAGS="-O2 -pipe -mcpu=7400 -maltivec -mabi=altivec" shiny ~ # emerge --info Portage 2.1.1_pre2-r7 (default-linux/ppc/ppc32, gcc-4.1.1, glibc-2.4-r3, 2.6.17.4 ppc) ================================================================= System Settings ================================================================= System uname: 2.6.17.4 ppc 7447A, altivec supported Gentoo Base System version 1.12.1 app-admin/eselect-compiler: [Not Present] dev-lang/python: 2.4.3-r1 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: [Not Present] dev-util/confcache: [Not Present] sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2 sys-devel/binutils: 2.16.1-r3 sys-devel/gcc-config: 1.3.13-r3 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r4 ACCEPT_KEYWORDS="ppc" AUTOCLEAN="yes" CBUILD="powerpc-unknown-linux-gnu" CFLAGS="-O2 -pipe -mcpu=7400 -maltivec -mabi=altivec" CHOST="powerpc-unknown-linux-gnu" CONFIG_PROTECT="/etc /usr/share/X11/xkb" CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/terminfo" CXXFLAGS="-O2 -pipe -mcpu=7400 -maltivec -mabi=altivec" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks metadata-transfer parallel-fetch sandbox sfperms strict" GENTOO_MIRRORS="http://ftp.iinet.net.au/pub/Gentoo http://mirror.pacific.net.au/Gentoo http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/overlays/local" SYNC="rsync://rsync.au.gentoo.org/gentoo-portage" USE="ppc X a52 aac alsa altivec amr apm asf avahi bash-completion beagle berkdb bitmap-fonts bluetooth bzip2 cairo cdparanoia cdr cli crypt curl daap dbus dga divx divx4linux dlloader dri drm dts dv dvd dvdr eds esd evo exif fbcon ffmpeg firefox flac fortran glitz gnome gphoto2 gstreamer gtk gtk2 gtkhtml hal howl ieee1394 insecure-drivers ipod irmc isdnlog java joystick libcaca libnotify live lzo mad madwifi matroska mng mono mozilla mp3 mp4 mpeg nautilus ncurses network nls nptl nptlonly nsplugin ogg opengl pci pcmcia pcre perl pmu png ppds pppd python radeon readline reflection samba sdl session sheep speex spl ssl tcpd theora threads truetype-fonts type1-fonts udev unicode usb v4l v4l2 vidix vorbis x264 xine xinerama xorg xv xvid zlib elibc_glibc input_devices_mouse input_devices_keyboard input_devices_evdev kernel_linux userland_GNU video_cards_radeon" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS
Add -fno-strict-aliasing. libmad is known to break strict aliasing rules.
Sound herd, should we add -fno-strict-aliasing to all libmad builds?
Sound herd? Andy did this fix your problem?
> Andy did this fix your problem? yep :)
Sorry, when I interate over bugs I forget the ones CC'd to sound. I'll take care of this, let me double check how many strict-aliasing warnings there are and I'll add -fno-strict-aliasing.
It does not really seem to on AMD64, so I'll add the -fno-strict-aliasing conditional.
Done.