Patchwork libvpx: force arm mode to be able to link with ffmpeg where arm mode already is forced

login
register
mail settings
Submitter Martin Jansa
Date Jan. 12, 2011, 11:48 a.m.
Message ID <1294832897-3343-1-git-send-email-Martin.Jansa@gmail.com>
Download mbox | patch
Permalink /patch/256/
State Superseded, archived
Headers show

Comments

Martin Jansa - Jan. 12, 2011, 11:48 a.m.
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 recipes/webm/libvpx.inc |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
Khem Raj - Jan. 12, 2011, 6:28 p.m.
On 1/12/2011 3:48 AM, Martin Jansa wrote:
> Signed-off-by: Martin Jansa<Martin.Jansa@gmail.com>

hmmm what issues do u see if you build it with thumb mode.

> ---
>   recipes/webm/libvpx.inc |    6 +++++-
>   1 files changed, 5 insertions(+), 1 deletions(-)
>
> diff --git a/recipes/webm/libvpx.inc b/recipes/webm/libvpx.inc
> index 9913d5b..9d40945 100644
> --- a/recipes/webm/libvpx.inc
> +++ b/recipes/webm/libvpx.inc
> @@ -1,11 +1,15 @@
>   DESCRIPTION = "vpx Multi-Format Codec SDK"
>   LICENSE = "BSD"
>
> -INC_PR = "r5"
> +INC_PR = "r6"
>
>   SRC_URI = "git://review.webmproject.org/libvpx.git;protocol=git;tag=v${PV}"
>   S = "${WORKDIR}/git"
>
> +# ffmpeg links with this and fails
> +# sysroots/armv4t-oe-linux-gnueabi/usr/lib/libvpx.a(vpx_encoder.c.o)(.text+0xc4): unresolvable R_ARM_THM_CALL relocation against symbol `memcpy@@GLIBC_2.4'
> +ARM_INSTRUCTION_SET = "arm"
> +
>   CFLAGS += "-fPIC"
>
>   export CC
Martin Jansa - Jan. 13, 2011, 7:31 a.m.
On Wed, Jan 12, 2011 at 10:28:10AM -0800, Khem Raj wrote:
> On 1/12/2011 3:48 AM, Martin Jansa wrote:
> > Signed-off-by: Martin Jansa<Martin.Jansa@gmail.com>
> 
> hmmm what issues do u see if you build it with thumb mode.

+# ffmpeg links with this and fails
+# sysroots/armv4t-oe-linux-gnueabi/usr/lib/libvpx.a(vpx_encoder.c.o)(.text+0xc4): unresolvable R_ARM_THM_CALL relocation against symbol `memcpy@@GLIBC_2.4'

and full log is here
http://tinderbox.openembedded.org/packages/1398033/

> > ---
> >   recipes/webm/libvpx.inc |    6 +++++-
> >   1 files changed, 5 insertions(+), 1 deletions(-)
> >
> > diff --git a/recipes/webm/libvpx.inc b/recipes/webm/libvpx.inc
> > index 9913d5b..9d40945 100644
> > --- a/recipes/webm/libvpx.inc
> > +++ b/recipes/webm/libvpx.inc
> > @@ -1,11 +1,15 @@
> >   DESCRIPTION = "vpx Multi-Format Codec SDK"
> >   LICENSE = "BSD"
> >
> > -INC_PR = "r5"
> > +INC_PR = "r6"
> >
> >   SRC_URI = "git://review.webmproject.org/libvpx.git;protocol=git;tag=v${PV}"
> >   S = "${WORKDIR}/git"
> >
> > +# ffmpeg links with this and fails
> > +# sysroots/armv4t-oe-linux-gnueabi/usr/lib/libvpx.a(vpx_encoder.c.o)(.text+0xc4): unresolvable R_ARM_THM_CALL relocation against symbol `memcpy@@GLIBC_2.4'
> > +ARM_INSTRUCTION_SET = "arm"
> > +
> >   CFLAGS += "-fPIC"
> >
> >   export CC
> 
> 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
Khem Raj - Jan. 14, 2011, 3:12 a.m.
On 1/12/2011 11:31 PM, Martin Jansa wrote:
> On Wed, Jan 12, 2011 at 10:28:10AM -0800, Khem Raj wrote:
>> On 1/12/2011 3:48 AM, Martin Jansa wrote:
>>> Signed-off-by: Martin Jansa<Martin.Jansa@gmail.com>
>>
>> hmmm what issues do u see if you build it with thumb mode.
>
> +# ffmpeg links with this and fails
> +# sysroots/armv4t-oe-linux-gnueabi/usr/lib/libvpx.a(vpx_encoder.c.o)(.text+0xc4): unresolvable R_ARM_THM_CALL relocation against symbol `memcpy@@GLIBC_2.4'
>
> and full log is here
> http://tinderbox.openembedded.org/packages/1398033/

Its not clear in the logs but is libvpx using -fPIE compiler option ? if 
yes then you should remove it and then it will work.

>
>>> ---
>>>    recipes/webm/libvpx.inc |    6 +++++-
>>>    1 files changed, 5 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/recipes/webm/libvpx.inc b/recipes/webm/libvpx.inc
>>> index 9913d5b..9d40945 100644
>>> --- a/recipes/webm/libvpx.inc
>>> +++ b/recipes/webm/libvpx.inc
>>> @@ -1,11 +1,15 @@
>>>    DESCRIPTION = "vpx Multi-Format Codec SDK"
>>>    LICENSE = "BSD"
>>>
>>> -INC_PR = "r5"
>>> +INC_PR = "r6"
>>>
>>>    SRC_URI = "git://review.webmproject.org/libvpx.git;protocol=git;tag=v${PV}"
>>>    S = "${WORKDIR}/git"
>>>
>>> +# ffmpeg links with this and fails
>>> +# sysroots/armv4t-oe-linux-gnueabi/usr/lib/libvpx.a(vpx_encoder.c.o)(.text+0xc4): unresolvable R_ARM_THM_CALL relocation against symbol `memcpy@@GLIBC_2.4'
>>> +ARM_INSTRUCTION_SET = "arm"
>>> +
>>>    CFLAGS += "-fPIC"
>>>
>>>    export CC
>>
>>
>> _______________________________________________
>> Openembedded-devel mailing list
>> Openembedded-devel@lists.openembedded.org
>> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>
>
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
Martin Jansa - Jan. 24, 2011, 10:24 a.m.
On Thu, Jan 13, 2011 at 07:12:50PM -0800, Khem Raj wrote:
> On 1/12/2011 11:31 PM, Martin Jansa wrote:
> > On Wed, Jan 12, 2011 at 10:28:10AM -0800, Khem Raj wrote:
> >> On 1/12/2011 3:48 AM, Martin Jansa wrote:
> >>> Signed-off-by: Martin Jansa<Martin.Jansa@gmail.com>
> >>
> >> hmmm what issues do u see if you build it with thumb mode.
> >
> > +# ffmpeg links with this and fails
> > +# sysroots/armv4t-oe-linux-gnueabi/usr/lib/libvpx.a(vpx_encoder.c.o)(.text+0xc4): unresolvable R_ARM_THM_CALL relocation against symbol `memcpy@@GLIBC_2.4'
> >
> > and full log is here
> > http://tinderbox.openembedded.org/packages/1398033/
> 
> Its not clear in the logs but is libvpx using -fPIE compiler option ? if 
> yes then you should remove it and then it will work.

only -fPIC and even with added -fno-PIE it still fails here (only with
binutils-2.21, haven't seen it with 2.20)

> >
> >>> ---
> >>>    recipes/webm/libvpx.inc |    6 +++++-
> >>>    1 files changed, 5 insertions(+), 1 deletions(-)
> >>>
> >>> diff --git a/recipes/webm/libvpx.inc b/recipes/webm/libvpx.inc
> >>> index 9913d5b..9d40945 100644
> >>> --- a/recipes/webm/libvpx.inc
> >>> +++ b/recipes/webm/libvpx.inc
> >>> @@ -1,11 +1,15 @@
> >>>    DESCRIPTION = "vpx Multi-Format Codec SDK"
> >>>    LICENSE = "BSD"
> >>>
> >>> -INC_PR = "r5"
> >>> +INC_PR = "r6"
> >>>
> >>>    SRC_URI = "git://review.webmproject.org/libvpx.git;protocol=git;tag=v${PV}"
> >>>    S = "${WORKDIR}/git"
> >>>
> >>> +# ffmpeg links with this and fails
> >>> +# sysroots/armv4t-oe-linux-gnueabi/usr/lib/libvpx.a(vpx_encoder.c.o)(.text+0xc4): unresolvable R_ARM_THM_CALL relocation against symbol `memcpy@@GLIBC_2.4'
> >>> +ARM_INSTRUCTION_SET = "arm"
> >>> +
> >>>    CFLAGS += "-fPIC"
> >>>
> >>>    export CC
> >>
> >>
> >> _______________________________________________
> >> Openembedded-devel mailing list
> >> Openembedded-devel@lists.openembedded.org
> >> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
> >
> >
> >
> > _______________________________________________
> > Openembedded-devel mailing list
> > Openembedded-devel@lists.openembedded.org
> > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
> 
> 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
Khem Raj - Jan. 24, 2011, 3:44 p.m.
On Mon, Jan 24, 2011 at 2:24 AM, Martin Jansa <martin.jansa@gmail.com> wrote:
> only -fPIC and even with added -fno-PIE it still fails here (only with
> binutils-2.21, haven't seen it with 2.20)
>

Hmmm, then it needs some investigation weather its a latent bug that
2.21 uncovered or if its a regression

Patch

diff --git a/recipes/webm/libvpx.inc b/recipes/webm/libvpx.inc
index 9913d5b..9d40945 100644
--- a/recipes/webm/libvpx.inc
+++ b/recipes/webm/libvpx.inc
@@ -1,11 +1,15 @@ 
 DESCRIPTION = "vpx Multi-Format Codec SDK"
 LICENSE = "BSD"
 
-INC_PR = "r5"
+INC_PR = "r6"
 
 SRC_URI = "git://review.webmproject.org/libvpx.git;protocol=git;tag=v${PV}"
 S = "${WORKDIR}/git"
 
+# ffmpeg links with this and fails 
+# sysroots/armv4t-oe-linux-gnueabi/usr/lib/libvpx.a(vpx_encoder.c.o)(.text+0xc4): unresolvable R_ARM_THM_CALL relocation against symbol `memcpy@@GLIBC_2.4'
+ARM_INSTRUCTION_SET = "arm"
+
 CFLAGS += "-fPIC"
 
 export CC