[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#270884: binutils bug already filed



More information on the xine-lib FTBFS on sparc:
(CCed to debian-sparc@l.d.o for proofreading :)
(CCed to binutils bug since it can probably closed now)

On Thu, Sep 09, 2004 at 11:10:30PM -0700, Blars Blarson wrote:
> 
> See binutils bug 267824.

No, this isn't this one.
The build failures in glibc and fftw3 all occured at fmov* opcodes
and were fixed by the patch above to binutils.

The bug in xine-lib is actually simpler. The assembler code is
directly generated (mostly with cpp macros) and includes instructions
like
	ldd     [%i1], %f40
(the 40 is hardcoded in the corresponding macro)

This works on sparc64, but obviously not on sparc32. Since xine-lib is
compiled using -mcpu=supersparc -mtune=supersparc, gas complains.
When compiling with -mcpu=ultrasparc, the build succeeds.

So the real problem in this case is that xine-lib tries to include
this code even when compiled on sparc32 (which perhaps nobody of
upstream ever has tested).

There are a few possible solutions to this problem:
1) compile with -mcpu=ultrasparc (probably not acceptable)
2) if I understand the code correctly, there is a non-assembler version
available of this functionality (the sparc optimisation was added in
an upstream release, prior to this xine-lib built fine on sparc)
This will probably require some Makefile hacking. On a first look
it didn't seem obvious where to begin...
3) deactivate the whole libavcodec on sparc. This is probably easier
Makefile hacking, but I hve no clue how important the functionality
is that would be missing then.
4) Change the macros so that they only use f0 - f31. Needs someone
with fluent sparc assembler and enough time ...

Gruesse,
-- 
Frank Lichtenheld <djpig@debian.org>
www: http://www.djpig.de/



Reply to: