[FFmpeg-devel] [PATCH] mipsen require compilation with -DPIC since gcc-4.3

Måns Rullgård mans
Sun Sep 21 18:39:05 CEST 2008


Luca Barbato <lu_zero at gentoo.org> writes:

> M?ns Rullg?rd wrote:
>> If it used to work, and now has stopped working, there has to be a bug
>> somewhere.  Since FFmpeg didn't change, the bug must be in gcc.
>
> Or gcc was doing something nonstandard and now it is disallowing it.

That's true, and it wouldn't be the first time.  Shame on gcc devs for
doing non-standard stuff in the first place.

>>>> In general, we avoid bug
>>>> workarounds that have a negative performance impact, and PIC code
>>>> certainly is slower than non-PIC on MIPS, at least when using gcc.
>>> Given the number of registers mips has, I'm not so sure, Reinhard could 
>>> you please provide a benchmark?
>> 
>> I'm talking about the extra indirection imposed by PIC.
>
> Still, if the benchmark show that the change doesn't hinder performance 
> we could just stop this discussion.
>
>> There is no reason for MIPS to not support textrels in shared libs.
>
> There is a reason why it should?

The instruction set allows it, and it's good for performance.

>> The mention of gcc 4.3 suggests that gcc has started doing something
>> stupid, which should be reported as a bug.
>
> I'm not even sure I want to build a cross compiler just to try to 
> reproduce it...
>
> Anybody with a mips box could please chip in and tell us?

I have some MIPS gear at work, but no gcc 4.3 cross-compiler.  If I
have time, I could still run some tests with and without PIC using
whatever compilers I do have.

-- 
M?ns Rullg?rd
mans at mansr.com




More information about the ffmpeg-devel mailing list