[FFmpeg-devel] [PATCH] swscale: also save ebx register when using PIE
Michael Niedermayer
michael at niedermayer.cc
Fri Dec 16 05:08:28 EET 2016
On Fri, Dec 16, 2016 at 02:36:53AM +0100, Andreas Cadhalpun wrote:
> Otherwise the build fails when configuring with --toolchain=hardened
> --disable-pic on i386 using gcc 4.8:
> error: PIC register clobbered by '%ebx' in 'asm'
>
> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>
> ---
> libswscale/x86/hscale_fast_bilinear_simd.c | 20 ++++++++++----------
> 1 file changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/libswscale/x86/hscale_fast_bilinear_simd.c b/libswscale/x86/hscale_fast_bilinear_simd.c
> index 2cba5f0..3f0f5f5 100644
> --- a/libswscale/x86/hscale_fast_bilinear_simd.c
> +++ b/libswscale/x86/hscale_fast_bilinear_simd.c
> @@ -199,7 +199,7 @@ void ff_hyscale_fast_mmxext(SwsContext *c, int16_t *dst,
> #if ARCH_X86_64
> uint64_t retsave;
> #else
> -#if defined(PIC)
> +#if defined(PIC) || defined(__PIE__)
please correct me if iam wrong
our configure adds -DPIC to define PIC when its enabled,
it does not add that in this case but gcc is still generating PIC code
that doesnt seem good
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
No human being will ever know the Truth, for even if they happen to say it
by chance, they would not even known they had done so. -- Xenophanes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20161216/815c4bde/attachment.sig>
More information about the ffmpeg-devel
mailing list