Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 58224

Summary: Incorrect gcc -march and -mcpu options in Mplayer-1.0_pre5-r2
Product: Gentoo Linux Reporter: Jesse Adelman <jesse>
Component: New packagesAssignee: Gentoo Media-video project <media-video>
Status: RESOLVED UPSTREAM    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Jesse Adelman 2004-07-24 14:46:45 UTC
I have an Athlon-MP system. Don't know yet if the actuall function of the compiled app will be affected (I'm guessing yes). Just noticed that the mplayer ebuild appears to pass strange options to gcc (i.e. "-04 -march=athlon-4 -mcpu=athlon-4"):

[sample snip]
gcc -I../libvo -I../../libvo -I/usr/X11R6/include -O4 -march=athlon-4 -mcpu=athlon-4 -pipe -ffast-math -fomit-frame-pointer -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include -DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -c -o jfdctfst.o jfdctfst.c 
gcc -I../libvo -I../../libvo -I/usr/X11R6/include -O4 -march=athlon-4 -mcpu=athlon-4 -pipe -ffast-math -fomit-frame-pointer -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include -DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -c -o jfdctint.o jfdctint.c 
gcc -I../libvo -I../../libvo -I/usr/X11R6/include -O4 -march=athlon-4 -mcpu=athlon-4 -pipe -ffast-math -fomit-frame-pointer -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include -DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -c -o mpegaudio.o mpegaudio.c 
gcc -I../libvo -I../../libvo -I/usr/X11R6/include -O4 -march=athlon-4 -mcpu=athlon-4 -pipe -ffast-math -fomit-frame-pointer -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include -DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -c -o ac3enc.o ac3enc.c 
[/sample snip]

Here's my CFLAGS from /etc/make.conf:
CFLAGS="-march=athlon-mp -O3 -pipe"

And, again, I have a dual-CPU Athlon-MP system, so the flags should be -march=athlon-mp, at least.


Reproducible: Always
Steps to Reproduce:
1. emerge mplayer
2. Watch compile output
3. Note difference



Expected Results:  
Compiled with:
CFLAGS="-march=athlon-mp -O3 -pipe"

Not:
CFLAGS="-march=athlon-4 -O4 -pipe"

Portage 2.0.50-r9 (default-x86-1.4, gcc-3.3.3, glibc-2.3.3.20040420-r0,
2.6.7-gentoo-r9)
=================================================================
System uname: 2.6.7-gentoo-r9 i686 AMD Athlon(TM) MP 2800+
Gentoo Base System version 1.4.16
distcc 2.13 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.59-r3
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon-mp -O3 -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config
/var/qmail/control /var/spool/amanda/.amandahosts"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon-mp -O3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://gentoo.ccccom.com
ftp://mirror.iawnet.sandia.gov/pub/gentoo/ http://mirror.datapipe.net/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/data3/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
USE="3dnow S3TC X Xaw3d aac acpi acpi4linux alsa apache2 apm avi berkdb bonobo
cdparanoia cdr crypt cups curl dga divx4linux dv dvd dvdr encode escreen esd
ethereal evms2 evo fbcon flash foomaticdb gb gd gdbm ggi gif gimp gimpprint gmp
gnome gphoto2 gpm gstreamer gtk gtk2 gtkhtml guile hardenedphp hbci ieee1394
imagemagick imap imlib jabber java jikes joystick jpeg kerberos krb4 lcms ldap
libg++ libwww live lm_sensors lzo lzw-tiff mad maildir mcal mdb memlimit mikmod
mldonkeypango mmx motif mozilla mozp3p mozsvg mozxmlterm mpeg mpeg4 mplayer
mysql nagios-dns nagios-ntp nagios-ping nagios-ssh ncurses net nls nocd ntlm
odbc offensive ofx oggvorbis opengl oss pam pcap pda pdflib pear-db perl png pnp
postgres ppds python quicktime readline rogue rtc ruby samba scanner sdl slang
snmp socks5 speex spell sse ssl svg svga tcltk tcpd theora tiff truetype usb v4l
v4l2 videos vim-with-x x86 xchattext xml xml2 xmms xosd xprint xrandr xv xvid
yahoo yv12 zeo zlib"
Comment 1 Chris White (RETIRED) gentoo-dev 2004-07-25 07:22:23 UTC
Due to the nature of mplayer bug reporting, CFLAGS from make.conf are not
utilized.  If you feel this situation still needs to be adressed, please
contact upstream at bugzilla.mplayerhq.hu.

Please put the bug tracking # here so that we can patch things accordingly
should they accept the cflags change.
Comment 2 Reimar Döffinger 2005-02-18 02:59:54 UTC
No need for this IMHO, according to the gcc man page, athlon-4 and athlon-mp are equivalent.
Comment 3 Jesse Adelman 2005-02-18 13:03:52 UTC
Wow, old bug. If there's no difference, then I'm happy. Sorry for the noise.