[mythtv-commits] Ticket #10542: configure incorrectly detects VIA c3 and enables cmov etc...
MythTV
noreply at mythtv.org
Sat Apr 14 21:10:06 UTC 2012
#10542: configure incorrectly detects VIA c3 and enables cmov etc...
----------------------------------+------------------------------
Reporter: andrew@… | Owner:
Type: Bug Report - General | Status: closed
Priority: minor | Milestone:
Component: Packaging | Version: 0.24.2
Severity: medium | Resolution: Upstream Bug
Keywords: c3 cmov configure | Ticket locked: 0
----------------------------------+------------------------------
Comment (by andrew@…):
Right here's what I found out:
1) -march=native is broken for the c3 in all versions of gcc from
gcc-4.4.4 to gcc-4.6.2 and probably current (see
[http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45359]) which includes a
patch to enable the correct flags for my processor.
2) after applying this patch to GCC and re-installing it, mythtv
./configure --enable-proc-opt on the c3 box disables cmov but still gets
some of the options wrong (see attached) you get:[[BR]]
CPU: x86 x86_32 (VIA Ezra), MMX=yes, MMX2=yes, 3DNow!=yes, 3DNow!
extended=yes, SSE=yes, SSSE3=yes, CMOV=no.[[BR]]
Should be: [[BR]]
mmx=yes, mmx2=no, amd3dnow=yes, amd3dnowext=no, sse=no, SSE3=yes, cmov=n
ffmpeg ./configure seems to have a similar problem by the way - if this
is what you are using as a template.
3) if you pass the -ffast-math option to gcc versions gcc-4.4.4 to
gcc-4.6.2 (and probably current) when used as a linker it adds cmovne
instructions into the linked code even if -march=c3 is set. (gcc-3.4.6
doesn't do this) - this explains most of the cmov instructions I found in
my gentoo i586-pc-linux-gnu with -march=c3 CFLAGS system (also appear in
my -march=k6-3 laptop buy the way) - that and the icedtea-bin files which
isn't that surprising really - I'm still trying to wheedle out the rest
and pluck up the courage to file a gcc bug...
4) I spent ages trying to work out where
/mythtv/external/FFmpeg/libavformat/libmythavformat.so.52 was getting cmov
instructions from then discovered it has the function name
'<mov_read_cmov>' in it which was giving me a false positive - doh! (see
my find cmov script, again shamelessly stolen from someone else attached)
I have found that the rest of gentoo's ebuilds don't seem to mind being
merged in a chroot using my core2 - even ffmpeg - they continue to honor
my -march=c3 CFLAGS in make.conf. For this reason (and as compiling on the
C3 itself even with distcc just takes forever) I would suggest that
:[[BR]]
a) mythtv's ebuilds be updated to honour any -march CFLAGS in make.conf
(as suggested by Simon Kenyon above) - by all means continue to strip -Ox
and other stuff out [[BR]]
b) the ./configure script be updated to set the correct options for VIA
processors (see the patch in
[http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45359] as a starting point
which seems sensible and works for me - anyone out there got a cyrix to
fill in the 'fixme'?)
I did have a go at creating a new ebuild so I could test a configure patch
myself but the GIT overlay magic got me royally confused when it started
downloading another version of mythtv using my new ebuild's name (I've got
a serious learning curve by the looks of things!). If someone could point
me to the right part of the configure files and explain what's happening
with the ebuild I would be happy to give it another try though.
--
Ticket URL: <http://code.mythtv.org/trac/ticket/10542#comment:10>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
More information about the mythtv-commits
mailing list