[PATCH] Re: [MPlayer-dev-eng] osdep/fseeko.c problem []

Corey Hickey bugfood-ml at fatooh.org
Thu Jun 9 06:15:00 CEST 2005


Arne Driescher wrote:
> Hi Corey,
> 
> thank you for offering your help for my problem.
> Please find attached the requested files. If you need any more information 
> I will certainly do what I can to provide them.
> 
> Greetings,
> Arne
> 
> P.S. The folloing information might be useful:
> From man gcc:
> k8, opteron, athlon64, athlon-fx
>                AMD K8 core based CPUs with x86-64 instruction set support.
>                (This supersets MMX, SSE, SSE2, 3dNOW!, enhanced 3dNOW! and
>                64-bit instruction set extensions.)
> 
> From using this on the command line:
> 
>>gcc -v
> 
> Reading specs from /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.5/specs
> Configured with: ../configure --enable-threads=posix --prefix=/usr 
> --with-local-prefix=/usr/local --infodir=/usr/share/info 
> --mandir=/usr/share/man --enable-languages=c,c++,f77,objc,java,ada 
> --disable-checking --libdir=/usr/lib64 --enable-libgcj --with-slibdir=/lib64 
> --with-system-zlib --enable-shared --enable-__cxa_atexit x86_64-suse-linux
> Thread model: posix
> gcc version 3.3.5 20050117 (prerelease) (SUSE Linux)
> 
> 
>>gcc -Wall test.c
>>gcc -Wall -march=athlon64 test.c                         
> 
> cc1: error: bad value (athlon64) for -march= switch
> 
>>gcc -Wall -mcpu=athlon64 test.c                          
> 
> cc1: error: bad value (athlon64) for -mcpu= switch
> 
>>gcc -Wall -mcpu=athlon-fx test.c                         
> 
> cc1: error: bad value (athlon-fx) for -mcpu= switch
> 
>>gcc -Wall -mcpu=k8 test.c
>>gcc -Wall -mcpu=opteron test.c
> 
> cc1: error: bad value (opteron) for -mcpu= switch
> 
>>gcc -Wall -mcpu=k8 -march=k8 test.c
>>
> 
> For whatever reason/bug this gcc version seems to prefere k8 for mcpu/march 
> option.

Thank you for that information.

Vanilla gcc 3.3.5 does not support k8/opteron/athlon64/athlon-fx
optimization. I verified this by reading the manpage from the source
tarball. The stanza you quoted from your gcc manpage looks just like one
from my gcc 3.4.4 manpage.

In your configure.log I see:
cc     /tmp/mplayer-conf-16730-10154.c -o
/tmp/mplayer-conf-11986-10154.o -march=athlon-xp -mcpu=athlon-xp
cc1: error: CPU you selected does not support x86-64 instruction set
cc1: error: CPU you selected does not support x86-64 instruction set

That's just like the error I see when I try to use -march=athlon-xp with
gcc 3.4. Gcc 3.3 likes -march=athlon-xp but doesn't support
-march=athlon64 (etc.). By example:

bugfood at bugfood:/tmp$ gcc-3.3 hello.c -march=athlon-xp
bugfood at bugfood:/tmp$ gcc-3.3 hello.c -march=athlon64
cc1: error: bad value (athlon64) for -march= switch
cc1: error: bad value (athlon64) for -mcpu= switch
bugfood at bugfood:/tmp$ gcc-3.4 hello.c -march=athlon-xp
hello.c:1: error: CPU you selected does not support x86-64 instruction set
hello.c:1: error: CPU you selected does not support x86-64 instruction set
bugfood at bugfood:/tmp$ gcc-3.4 hello.c -march=athlon64


So, my tentative conclusion is that your gcc 3.3.5 has some broken
backported patches from gcc 3.4 and configure has trouble because it
expects your gcc to behave like the version it says it is.

I wrote a patch that should fix that.

Rather than try to work around your broken compiler, configure now
optimistically sets proc=k8; if that fails with the gcc version being
used, configure will fall back on proc=athlon-xp. That's actually how I
did it for the corresponding 32-bit section, and it should work just fine.

Configure now uses k8 instead of athlon64 (for both 32-bit and 64-bit).
With non-broken gcc builds this really shouldn't make any difference,
and it lets the broken suse version work.


I've tested this patch on my athlon64 running 64-bit with gcc 3.3 and
gcc 3.4. 32-bit operation is untested, though the change is trivial and
I don't see why it won't work. Guillaume, can you verify that?

-Corey
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: configure-athlon64-changes.diff
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20050608/07add65f/attachment.asc>


More information about the MPlayer-dev-eng mailing list