[FFmpeg-devel] [PATCH] use MANGLE in cavsdsp_mmx.c

Reimar Döffinger Reimar.Doeffinger
Wed Sep 30 18:36:27 CEST 2009

On Wed, Sep 30, 2009 at 07:17:33PM +0300, Uoti Urpala wrote:
> On Wed, 2009-09-30 at 17:59 +0200, Reimar D?ffinger wrote:
> > since OpenBSD uses PIC and EBP and EBX can't be used, it can't compile cavsdsp_mmx.c.
> > While those are "m" constraints, at least some still use up a register.
> > Attached is a patch that fixes compilation by using MANGLE on one of the
> > variables that is only used in 2 places.
> > Personally I'd be in favour to be consistent with other parts of FFmpeg
> > and just use MANGLE whereever possible, but that would be a more
> > invasive change.
> In what sense does it "use PIC" if MANGLE works? MANGLE is only an
> uglier and less robust way to get the same effect as you'd get by
> compiling without -fPIC. So does the default compiler always force -fPIC
> on, even though binaries compiled without that do work fine on the
> platform? Or what?

No it's not the same thing, not using -fPIC can result in code that can
not link at all on x86_64 systems while MANGLE (due to our hacked
variant that does IP-relative) still works.
But if you insist on being pedantic, I do s/uses PIC/the compiler
behaves as with something like -fPIC -fPIE -pie set by default/

More information about the ffmpeg-devel mailing list