Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 87483 - Patch to enable mmx support in mythtv-0.18
Summary: Patch to enable mmx support in mythtv-0.18
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Television related Applications in Gentoo's Portage
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2005-03-31 16:36 UTC by Stephan Wienczny
Modified: 2005-05-11 01:52 UTC (History)
1 user (show)

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


Attachments
Filters -momit-leaf-frame-pointer and allows MMX again (mythtv-0.18.ebuild,2.98 KB, application/octet-stream)
2005-04-24 18:12 UTC, Robert Tindle
Details
Filters -momit-leaf-frame-pointer and allows MMX again (mythtv-0.18.ebuild,2.98 KB, application/octet-stream)
2005-04-24 18:38 UTC, Robert Tindle
Details
Enable O3 and MMX optimizations via "mmx" use flags (mythtv-0.18.ebuild,2.81 KB, text/plain)
2005-04-26 16:50 UTC, Brian Merrill
Details
-fomit-frame-pointer plus O3 and MMX use flag enabled (mythtv-0.18.ebuild,2.84 KB, text/plain)
2005-05-03 13:02 UTC, James Gater
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Wienczny 2005-03-31 16:36:41 UTC
I found a C-Flag that is incompatible with mythtv: 
-momit-leaf-frame-pointer
Please filter it out.

Reproducible: Always
Steps to Reproduce:
1.emerge mythtv with -momit-leaf-frame-pointer in CFLAGS


Actual Results:  
The compililation fails 


Portage 2.0.51.19 (default-linux/x86/2005.0, gcc-3.4.3-20050110, 
glibc-2.3.4.20050125-r1, 2.6.12-rc1-mm3 i686) 
================================================================= 
System uname: 2.6.12-rc1-mm3 i686 Intel(R) Pentium(R) M processor 1.60GHz 
Gentoo Base System version 1.6.10 
Python:              dev-lang/python-2.3.5 [2.3.5 (#1, Feb 17 2005, 21:44:31)] 
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) 
[disabled] 
ccache version 2.4 [enabled] 
dev-lang/python:     2.3.5 
sys-devel/autoconf:  2.59-r6, 2.13 
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.5 
sys-devel/binutils:  2.15.92.0.2-r7 
sys-devel/libtool:   1.5.14 
virtual/os-headers:  2.6.8.1-r4 
ACCEPT_KEYWORDS="x86 ~x86" 
AUTOCLEAN="yes" 
CFLAGS="-march=pentium-m -O3 -pipe -ftracer -fomit-frame-pointer -ffast-math 
-momit-leaf-frame-pointer -mfpmath=sse,387" 
CHOST="i686-pc-linux-gnu" 
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control" 
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/texmf/web2c /etc/env.d" 
CXXFLAGS="-march=pentium-m -O3 -pipe -ftracer -fomit-frame-pointer -ffast-math 
-momit-leaf-frame-pointer -mfpmath=sse,387" 
DISTDIR="/usr/portage/distfiles" 
FEATURES="autoaddcvs autoconfig ccache distlocks fixpackages sandbox sfperms" 
GENTOO_MIRRORS="ftp://pandemonium.tiscali.de/pub/gentoo/ 
http://pandemonium.tiscali.de/pub/gentoo/ 
ftp://ftp.tu-clausthal.de/pub/linux/gentoo/ 
http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ 
http://gd.tuwien.ac.at/opsys/linux/gentoo/" 
LANG="de_DE.utf8" 
LC_ALL="de_DE.utf8" 
LDFLAGS="-Wl,-O1 -Wl,--enable-new-dtags -Wl,--sort-common -s" 
MAKEOPTS="-j2" 
PKGDIR="/usr/portage/packages" 
PORTAGE_TMPDIR="/var/tmp" 
PORTDIR="/usr/portage" 
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" 
USE="x86 X X509 a52 accessibility acl acpi acpi4linux aim alsa apache2 arts 
artswrappersuid asterisk avalon avi bash-completion bcmath bidi bitmap-fonts 
bluetooth bzip2 bzlib calendar cdda cdio cdparanoia cdrom chipcard codecs 
cpdflib crypt css ctype cups curl curlwrappers dbm debugger dga dio divx4linux 
dmx dnd doc dts dv dvb dvd dvdr dvdread encode escreen ethereal extras faac 
faad fame ffmpeg fftw flac flash font-server fortran freetds freetype ftp gcj 
gd gd-external gif gimp gimpprint gkrellm glitz glut gmp gnokii gnomedb 
gphoto2 gpm gps graphviz gs gstreamer gtk gtk2 gtkhtml hal hbci hdf hdf5 httpd 
iconv icq idea idl imagemagick imap imlib imlib2 iodbc ipv6 irda irmc jabber 
jack java javadoc javamail javascript jikes jit jpeg jpeg2k kde kdeenablefinal 
kdepim kerberos ladspa latex ldap libgd lirc live lufsusermount lzo lzw 
lzw-tiff mad maildir matroska mhash mikmod mime ming mjpeg mmap mmx mmx2 mng 
moneyplex mono mozilla mozsvg mp3 mpeg mpeg2 mpeg4 mpi mplayer mpm-worker msn 
mupad-noscilab mysql mythtv nagios-dns nagios-game nagios-ntp nagios-ping 
nagios-ssh ncurses net network nls nptl nptlonly odbc ogg oggvorbis openexr 
opengl pam pcap pcmcia pda pdf perl pg-hier pg-intdatetime pg-vacuumdelay php 
pic png posix postgres povray ppds procmail pthreads pwdb python qt quicktime 
quotes rdesktop readline real rhino rtc samba sasl scanner sdl shared 
sharedmem skey slang slp smartcard smime sms smux sndfile snmp soap sockets 
socks5 softmmu speedo speex spell sqlite sse sse2 ssl stream subversion svg 
svga svgz sysvipc szip tcltk tcpd tetex theora threads tidy tiff tokenizer 
transcode truetype truetype-fonts type1 type1-fonts unicode usb userlocales 
utf8 v4l v4l2 visualization vlm vorbis wifi wmf wxwindows x509 xanim xine 
xinerama xinetd xml xml2 xmlrpc xosd xpm xprint xsl xv xvid xvmc yahoo zlib 
linguas_de linguas_en" 
Unset:  ASFLAGS, CBUILD, CTARGET, PORTDIR_OVERLAY
Comment 1 Ciaran McCreesh 2005-03-31 16:47:16 UTC
Better solution: don't use daft CFLAGS.
Comment 2 Robert Tindle 2005-04-24 18:02:20 UTC
If I understand this bug correctly, it goes a bit more then filtering it out.  Currently MMX is being disabled because it has some problems.  As pointed out in this thread:

http://forums.gentoo.org/viewtopic-t-325017-highlight-.html

by immudium, filtering out this flag may allow MMX to compile correcty.  This should be looked into more then just saying "don't use these flags" as it's currently effecting how well MythTV runs.  Also filtering theis seams to allow the 'fix bug 67832, 81610, etc" lines to be removed.
Comment 3 Robert Tindle 2005-04-24 18:12:25 UTC
Created attachment 57132 [details]
Filters -momit-leaf-frame-pointer and allows MMX again
Comment 4 Robert Tindle 2005-04-24 18:36:40 UTC
Comment on attachment 57132 [details]
Filters -momit-leaf-frame-pointer and allows MMX again

bad attachment
Comment 5 Robert Tindle 2005-04-24 18:38:19 UTC
Created attachment 57135 [details]
Filters -momit-leaf-frame-pointer and allows MMX again

It's my first time with bugzilla..... that's the only excuse I got. :P
Comment 6 Brian Merrill 2005-04-26 16:50:45 UTC
Created attachment 57339 [details]
Enable O3 and MMX optimizations via "mmx" use flags

The above MMX optimized ebuild is missing a "myconf=" and thus all use
variables are ignored.	The following attachment fixes the issue.  In addition,
I believe the mythtv "mmx" use flag should remain an option in the ebuild to
allow the user to enable or disable the flag if they choose.  The attached
ebuild also retains the "mmx" use flag in addition to allowing O3 optimizations
and filtering the "-momit-leaf-frame-pointer" as noted above.
Comment 7 Chris Ripp 2005-04-30 13:49:11 UTC
The "fix" posted in attachment 57339 [details] still doesn't solve the problem, at least on my box. athlon-xp. I tried w/ -O2 as well. Still nothing.  It still pukes at PostProcess_MMX

libpostproc/postprocess_template.c: In function `postProcess_MMX':
libpostproc/postprocess_template.c:3198: error: can't find a register in class `GENERAL_REGS' while reloading `asm'
libpostproc/postprocess_template.c:3283: error: can't find a register in class `GENERAL_REGS' while reloading `asm'
libpostproc/postprocess_template.c:3198: error: can't find a register in class `GENERAL_REGS' while reloading `asm'
libpostproc/postprocess_template.c:3283: error: can't find a register in class `GENERAL_REGS' while reloading `asm'
make[2]: *** [postprocess.o] Error 1
make[2]: Leaving directory `/var/tmp/portage/mythtv-0.18/work/mythtv-0.18/libs/libavcodec'
make[1]: *** [sub-libavcodec] Error 2
make[1]: Leaving directory `/var/tmp/portage/mythtv-0.18/work/mythtv-0.18/libs'
make: *** [sub-libs] Error 2

Portage 2.0.51.20-r5 (default-linux/x86/2005.0, gcc-3.4.3-20050110, glibc-2.3.5-r0, 2.6.11-gentoo-r6 i686)
=================================================================
System uname: 2.6.11-gentoo-r6 i686 AMD Athlon(tm) XP 2000+
Gentoo Base System version 1.6.11
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
ccache version 2.4 [disabled]
dev-lang/python:     2.2.3-r5, 2.3.5
sys-apps/sandbox:    1.2.3
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5
sys-devel/binutils:  2.15.92.0.2-r8
sys-devel/libtool:   1.5.16
virtual/os-headers:  2.4.19-r1, 2.6.11
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon-xp -O3 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon-xp -O3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distcc distlocks sandbox sfperms strict"
GENTOO_MIRRORS="ftp://ftp.ndlug.nd.edu/pub/gentoo/"
MAKEOPTS="-j9"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 3dnow 3dnowex 3dnowext 4kstacks X a52 aac acpi alsa apm audiofile avi berkdb bitmap-fonts bootsplash crypt curl divx4linux dv dvd edl emboss encode esd ffmpeg flac fortran gdbm gif gpm gstreamer imagemagick imlib ipv6 joystick jpeg libg++ libwww lirc mad mikmod mjpeg mmx mp3 mpeg mpeg4 mysql mythtv ncurses net network nls nptl nvidia ogg oggvorbis openal opengl oss pam pdflib perl php png python qt quicktime readline sdl slang smooth spell sse sse2 ssl svga tcltk tcpd theora threads tiff transcode truetype truetype-fonts type1-fonts v4l v4l2 vorbis xml xml2 xmms xosd xv xvid xvmc zlib"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS



What now?


On a side note:  The original ebuild (that disabled MMX) causes mythbackend to un at near 100% CPU... don't know if its related but I haven't been able to build the MMX-enabled version to confirm.
Comment 8 Brian Merrill 2005-05-03 09:33:52 UTC
It's odd that you are not able to build with O2 optimizations as well.  For my part, I've successfully built Myth 0.18 on three different boxes using the mmx enabled build that I posted above.  One Pentium 4 and two Athlon XP's.  The Pentium 4 and one of the Athlong XP's are running an up to date gentoo testing branch, while the second Athlon XP is running an up to date gentoo stable branch.  I'll post emerge --info for all three to hopefully nail down why the configuration above fails.

**Pentium 4 - MythTV 0.18 MMX Enabled - Gentoo Testing Branch**
Portage 2.0.51.21 (default-linux/x86/2005.0, gcc-3.4.3-20050110, glibc-2.3.5-r0, 2.6.11-gentoo-r6 i686)
=================================================================
System uname: 2.6.11-gentoo-r6 i686 Intel(R) Pentium(R) 4 CPU 2.80GHz
Gentoo Base System version 1.6.11
ccache version 2.4 [enabled]
dev-lang/python:     2.3.5
sys-apps/sandbox:    1.2.3
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5
sys-devel/binutils:  2.15.92.0.2-r8
sys-devel/libtool:   1.5.16
virtual/os-headers:  2.6.11
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O3 -march=pentium4 -mtune=pentium4 -fforce-addr -momit-leaf-frame-pointer -fomit-frame-pointer -ftracer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O3 -march=pentium4 -mtune=pentium4 -fforce-addr -momit-leaf-frame-pointer -fomit-frame-pointer -ftracer -pipe -fvisibility-inlines-hidden"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks sandbox sfperms strict userpriv usersandbox"
GENTOO_MIRRORS="http://gentoo.netnitco.net/ http://mirror.usu.edu/mirrors/gentoo/ http://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ http://gentoo.mirrors.tds.net/gentoo http://gentoo.osuosl.org/ http://cudlug.cudenver.edu/gentoo/"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X acpi alsa apache2 apm avi berkdb bitmap-fonts crypt cups emboss encode flac foomaticdb fortran gdbm gif gpm gtk gtk2 imlib ipv6 java jpeg libg++ libwww mad mikmod mmx motif mp3 mpeg mysql nas ncurses nls nptl nvidia ogg oggvorbis opengl oss pam pdflib perl png python qt quicktime readline samba sdl spell sse ssl svga tcpd tiff truetype truetype-fonts type1-fonts vorbis xinerama xml2 xmms xv zlib userland_GNU kernel_linux libc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LINGUAS


**Athon XP - MythTV 0.18 MMX Enabled - Gentoo Testing Branch**
Portage 2.0.51.21 (default-linux/x86/2005.0, gcc-3.4.3-20050110, glibc-2.3.5-r0, 2.6.11-gentoo-r6 i686)
=================================================================
System uname: 2.6.11-gentoo-r6 i686 AMD Athlon(tm) XP 2000+
Gentoo Base System version 1.6.11
dev-lang/python:     2.3.5
sys-apps/sandbox:    1.2.3
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5
sys-devel/binutils:  2.15.92.0.2-r8
sys-devel/libtool:   1.5.16
virtual/os-headers:  2.6.11
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O3 -march=athlon-xp -mtune=athlon-xp -fforce-addr -momit-leaf-frame-pointer -fomit-frame-pointer -ftracer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O3 -march=athlon-xp -mtune=athlon-xp -fforce-addr -momit-leaf-frame-pointer -fomit-frame-pointer -ftracer -pipe -fvisibility-inlines-hidden"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.mirrors.tds.net/gentoo http://mirror.usu.edu/mirrors/gentoo/ http://gentoo.netnitco.net/ http://cudlug.cudenver.edu/gentoo/ http://gentoo.osuosl.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LDFLAGS="-W1,-O1"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 3dnow X acpi alsa apm avi berkdb bitmap-fonts crypt cups emboss encode foomaticdb fortran gdbm gif gpm gtk gtk2 imlib ipv6 ithreads jpeg ldap libg++ libwww mad mikmod mmx motif mp3 mpeg mysql ncurses nls nptl nvidia ogg oggvorbis opengl oss pam pdflib perl png pthreads python qt quicktime readline samba sdl spell sse ssl svga tcpd tiff truetype truetype-fonts type1-fonts vorbis xml2 xmms xv zlib userland_GNU kernel_linux libc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LINGUAS


**Athon XP - MythTV 0.18 MMX Enabled - Gentoo Stable Branch**
Portage 2.0.51.19 (default-linux/x86/2005.0, gcc-3.3.5-20050130, glibc-2.3.4.20041102-r1, 2.6.11-gentoo-r6 i686)
=================================================================
System uname: 2.6.11-gentoo-r6 i686 AMD Athlon(tm) XP 2800+
Gentoo Base System version 1.4.16
Python:              dev-lang/python-2.3.5 [2.3.5 (#1, Apr 30 2005, 14:50:16)]
dev-lang/python:     2.3.5
sys-apps/sandbox:    [Not Present]
sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.4
sys-devel/binutils:  2.15.92.0.2-r7
sys-devel/libtool:   1.5.16
virtual/os-headers:  2.6.8.1-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O3 -mcpu=i686 -march=athlon-xp -fforce-addr -momit-leaf-frame-pointer -fomit-frame-pointer -ftracer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O3 -mcpu=i686 -march=athlon-xp -fforce-addr -momit-leaf-frame-pointer -fomit-frame-pointer -ftracer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 3dnow 3dnowext X alsa apache2 apm arts avi berkdb bitmap-fonts crypt cups curl divx4linux emboss encode fam flac foomaticdb fortran gdbm gif gpm gtk gtk2 imlib ipv6 java jpeg kde libg++ libwww mad mikmod mmx motif mp3 mpeg mysql ncurses nls nvidia ogg oggvorbis opengl oss pam pdflib perl png python qt quicktime readline samba sdl spell sse ssl svga tcpd tiff truetype truetype-fonts type1-fonts vorbis xinerama xml2 xmms xv xvid zlib"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LINGUAS
Comment 9 James Gater 2005-05-03 12:10:51 UTC
Thanks Brian, your info confirms my testing; the key cflag appears to be -fomit-frame-pointer. 

It looks like there's a bit of history here. Mythtv uses a tweaked ffmpeg built-in (rather then the ffmpeg system libraries from the ebuild). There's a bug in gcc-ssa due to the lack of registers with i686 that causes our postprocess_mmx build failure in libavcodec (part of ffmpeg) under certain conditions. This is the same reason that -O3 and -Os had to be downgraded to O2 in mythtv-0.16. This fix however no longer works with mythtv-0.18. 

GCC won't fix the bug as it's an 'obsolete' method of coding; ffmpeg won't switch to the new method as it's not available on gcc-2.95. Ergo, we have two solutions. Force a drop back to gcc-3.3 for mythtv, drop down to -O0 (yeah right!) or find a hack that works for us.

For mythtv-0.18 this hack appears to be -fomit-frame-pointer as a cflag, when using gcc 3.4 (and presumably 4.0, though I haven't tested that yet). We'll probably have to revisit this every time until ffmpeg changes their code and mythtv bases on that, or gcc fixes what they consider an 'invalid' bug.

Obviously, forcing -fomit-frame-pointer is hardly an ideal solution (drastically reduces debug info as I understand it) though it does free up a couple of registers by doing so, apparently (pulled from a version of this bug
from a non-gentoo mailing list)

To sum up, I've compiled successfully on two separate boxes that previously wouldn't get past postprocess_mmx with the mmx use flag (and -O3) enabled (using http://bugs.gentoo.org/attachment.cgi?id=57339) using the following cflags:
athlon-xp:
CFLAGS="-O3 -march=athlon-xp -pipe -fomit-frame-pointer"

celeron-d (pentium-4 core):
CFLAGS="-march=pentium4 -O3 -pipe -fomit-frame-pointer"

I've also compiled with 
CFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer" successfully.

Oh, it's also worth pointing out that I upgraded to linux-headers-2.6.11, and that removing the -march flags doesn't help.

Apologies to any real coders if I've represented something incorrectly. (Tis also a little annoying, as I did test -fomit-frame-pointer with the original hack ebuild, and it didn't work, maybe because I had too much cruft from failed compiles, or yet another bug with mmx which I've resolved by accident)

References:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13850
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11203
http://gcc.gnu.org/ml/gcc-bugs/2004-01/msg03115.html
http://www.gossamer-threads.com/lists/mythtv/dev/78694?search_string=GENERAL_REGS;#78694
http://sourceforge.net/tracker/index.php?func=detail&aid=890586&group_id=16082&atid=116082
Comment 10 James Gater 2005-05-03 13:02:43 UTC
Created attachment 57955 [details]
-fomit-frame-pointer plus O3 and MMX use flag enabled

Also fixed the mythtv-setup line, so we end up with mythsetup again.
Comment 11 Brian Jackson (RETIRED) gentoo-dev 2005-05-03 13:34:08 UTC
Is there some way to edit the Makefiles to add -fomit-frame-pointer for the things that need it? Seems that would be less destructive.
Comment 12 James Gater 2005-05-03 13:45:57 UTC
Presumably that could be done with a patch; All -fomit-frame-pointer does is free up a register at a particular choke point. The bug is

i686-pc-linux-gnu-gcc -c -pipe -march=pentiumpro -w -O2 -march=athlon-xp -pipe -fno-pie -D_REENTRANT -DPIC -fPIC  -DMMX -DUSING_IVTV -DUSING_XRANDR -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DPREFIX=\"/usr\" -DHAVE_AV_CONFIG_H -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -I/usr/qt/3/mkspecs/linux-g++ -I. -I.. -I../.. -I/usr/qt/3/include -o a52_bitstream.o liba52/a52_bitstream.c 
 libpostproc/postprocess_template.c: In function `postProcess_MMX': 
 libpostproc/postprocess_template.c:3198: error: can't find a register in class `GENERAL_REGS' while reloading `asm' 
 libpostproc/postprocess_template.c:3283: error: can't find a register in class `GENERAL_REGS' while reloading `asm' 
 libpostproc/postprocess_template.c:3198: error: can't find a register in class `GENERAL_REGS' while reloading `asm' 
 libpostproc/postprocess_template.c:3283: error: can't find a register in class `GENERAL_REGS' while reloading `asm' 
 make: *** [postprocess.o] Error 1 
 make: *** Waiting for unfinished jobs.... 
 make: Leaving directory `/var/tmp/portage/mythtv-0.18/work/mythtv-0.18/libs/libavcodec'

So the choke point is libs/libavcodec. I'm afraid coding the patch to modify the cflags only for that library is beyond my capability though.
Comment 13 Brian Merrill 2005-05-03 15:32:02 UTC
Thanks for the great investigative work James.  Definitely a tough one to track down.  I'll mark my previous ebuild as deprecated.
Comment 14 Doug Goldstein (RETIRED) gentoo-dev 2005-05-11 01:52:00 UTC
InCVS