webkitgtk: Enable building for ARC architecture

Submitted by Alexey Brodkin on Jan. 11, 2019, 12:50 p.m. | Patch ID: 157797

Details

Message ID 20190111125014.34593-1-abrodkin@synopsys.com
State Accepted
Commit 463f10fde9f72d26e89db324ca675bfe597fcc5e
Headers show

Commit Message

Alexey Brodkin Jan. 11, 2019, 12:50 p.m.
For that we need 2 things:
 1. Disable JIT in JS as it's not supported for ARC.

 2. Compile with "-mlong-calls" so relocations with
    offsets larger than 25 bits are used, otherwise
    linker fails to link final binaries.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Alexander Kanavin <alex.kanavin@gmail.com>
Cc: Hongxu Jia <hongxu.jia@windriver.com>
---
 meta/recipes-sato/webkit/webkitgtk_2.22.5.bb | 7 +++++++
 1 file changed, 7 insertions(+)

Patch hide | download patch | download mbox

diff --git a/meta/recipes-sato/webkit/webkitgtk_2.22.5.bb b/meta/recipes-sato/webkit/webkitgtk_2.22.5.bb
index fc56822f7a..56f69c7a30 100644
--- a/meta/recipes-sato/webkit/webkitgtk_2.22.5.bb
+++ b/meta/recipes-sato/webkit/webkitgtk_2.22.5.bb
@@ -69,6 +69,13 @@  EXTRA_OECMAKE = " \
 EXTRA_OECMAKE_append_x86 = " -DUSE_GSTREAMER_GL=OFF "
 EXTRA_OECMAKE_append_x86-x32 = " -DUSE_GSTREAMER_GL=OFF "
 
+# Javascript JIT is not supported on ARC
+EXTRA_OECMAKE_append_arc = " -DENABLE_JIT=OFF "
+# By default 25-bit "medium" calls are used on ARC
+# which is not enough for binaries larger than 32 MiB
+CFLAGS_append_arc = " -mlong-calls"
+CXXFLAGS_append_arc = " -mlong-calls"
+
 # Javascript JIT is not supported on powerpc
 EXTRA_OECMAKE_append_powerpc = " -DENABLE_JIT=OFF "
 EXTRA_OECMAKE_append_powerpc64 = " -DENABLE_JIT=OFF "

Comments

Khem Raj Jan. 11, 2019, 3:31 p.m.
On Fri, Jan 11, 2019 at 4:50 AM Alexey Brodkin
<alexey.brodkin@synopsys.com> wrote:
>
> For that we need 2 things:
>  1. Disable JIT in JS as it's not supported for ARC.
>
>  2. Compile with "-mlong-calls" so relocations with
>     offsets larger than 25 bits are used, otherwise
>     linker fails to link final binaries.
>
> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
> Cc: Alexander Kanavin <alex.kanavin@gmail.com>
> Cc: Hongxu Jia <hongxu.jia@windriver.com>
> ---
>  meta/recipes-sato/webkit/webkitgtk_2.22.5.bb | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/meta/recipes-sato/webkit/webkitgtk_2.22.5.bb b/meta/recipes-sato/webkit/webkitgtk_2.22.5.bb
> index fc56822f7a..56f69c7a30 100644
> --- a/meta/recipes-sato/webkit/webkitgtk_2.22.5.bb
> +++ b/meta/recipes-sato/webkit/webkitgtk_2.22.5.bb
> @@ -69,6 +69,13 @@ EXTRA_OECMAKE = " \
>  EXTRA_OECMAKE_append_x86 = " -DUSE_GSTREAMER_GL=OFF "
>  EXTRA_OECMAKE_append_x86-x32 = " -DUSE_GSTREAMER_GL=OFF "
>
> +# Javascript JIT is not supported on ARC
> +EXTRA_OECMAKE_append_arc = " -DENABLE_JIT=OFF "
> +# By default 25-bit "medium" calls are used on ARC
> +# which is not enough for binaries larger than 32 MiB
> +CFLAGS_append_arc = " -mlong-calls"
> +CXXFLAGS_append_arc = " -mlong-calls"

perhaps adding to CPPFLAGS is going to be enough for both c/c++ cases

> +
>  # Javascript JIT is not supported on powerpc
>  EXTRA_OECMAKE_append_powerpc = " -DENABLE_JIT=OFF "
>  EXTRA_OECMAKE_append_powerpc64 = " -DENABLE_JIT=OFF "
> --
> 2.16.2
>
Alexey Brodkin Jan. 14, 2019, 8:45 p.m.
Hi Khem,

> -----Original Message-----
> From: Khem Raj [mailto:raj.khem@gmail.com]
> Sent: Friday, January 11, 2019 6:32 PM
> To: Alexey Brodkin <alexey.brodkin@synopsys.com>
> Cc: Patches and discussions about the oe-core layer <openembedded-core@lists.openembedded.org>;
> Richard Purdie <richard.purdie@linuxfoundation.org>; Ross Burton <ross.burton@intel.com>; linux-snps-
> arc@lists.infradead.org; Alexander Kanavin <alex.kanavin@gmail.com>; Hongxu Jia
> <hongxu.jia@windriver.com>
> Subject: Re: [PATCH] webkitgtk: Enable building for ARC architecture
> 
> On Fri, Jan 11, 2019 at 4:50 AM Alexey Brodkin
> <alexey.brodkin@synopsys.com> wrote:
> >
> > For that we need 2 things:
> >  1. Disable JIT in JS as it's not supported for ARC.
> >
> >  2. Compile with "-mlong-calls" so relocations with
> >     offsets larger than 25 bits are used, otherwise
> >     linker fails to link final binaries.
> >
> > Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
> > Cc: Alexander Kanavin <alex.kanavin@gmail.com>
> > Cc: Hongxu Jia <hongxu.jia@windriver.com>
> > ---
> >  meta/recipes-sato/webkit/webkitgtk_2.22.5.bb | 7 +++++++
> >  1 file changed, 7 insertions(+)
> >
> > diff --git a/meta/recipes-sato/webkit/webkitgtk_2.22.5.bb b/meta/recipes-
> sato/webkit/webkitgtk_2.22.5.bb
> > index fc56822f7a..56f69c7a30 100644
> > --- a/meta/recipes-sato/webkit/webkitgtk_2.22.5.bb
> > +++ b/meta/recipes-sato/webkit/webkitgtk_2.22.5.bb
> > @@ -69,6 +69,13 @@ EXTRA_OECMAKE = " \
> >  EXTRA_OECMAKE_append_x86 = " -DUSE_GSTREAMER_GL=OFF "
> >  EXTRA_OECMAKE_append_x86-x32 = " -DUSE_GSTREAMER_GL=OFF "
> >
> > +# Javascript JIT is not supported on ARC
> > +EXTRA_OECMAKE_append_arc = " -DENABLE_JIT=OFF "
> > +# By default 25-bit "medium" calls are used on ARC
> > +# which is not enough for binaries larger than 32 MiB
> > +CFLAGS_append_arc = " -mlong-calls"
> > +CXXFLAGS_append_arc = " -mlong-calls"
> 
> perhaps adding to CPPFLAGS is going to be enough for both c/c++ cases

Just tried that (only CPPFLAGS_append_arc = " -mlong-calls") and
I don't see "-mlong-calls" used during compilation at all
(I'm looking at .../oe/build/tmp-glibc/work/archs-oe-linux/webkitgtk/2.22.5-r0/temp/log.do_compile).

So I may guess webkitgtk doesn't copy CPPFLAGS to CFLAGS and CXXFLAGS.

-Alexey
Khem Raj Jan. 14, 2019, 9:12 p.m.
On Mon, Jan 14, 2019 at 12:45 PM Alexey Brodkin
<alexey.brodkin@synopsys.com> wrote:
>
> Hi Khem,
>
> > -----Original Message-----
> > From: Khem Raj [mailto:raj.khem@gmail.com]
> > Sent: Friday, January 11, 2019 6:32 PM
> > To: Alexey Brodkin <alexey.brodkin@synopsys.com>
> > Cc: Patches and discussions about the oe-core layer <openembedded-core@lists.openembedded.org>;
> > Richard Purdie <richard.purdie@linuxfoundation.org>; Ross Burton <ross.burton@intel.com>; linux-snps-
> > arc@lists.infradead.org; Alexander Kanavin <alex.kanavin@gmail.com>; Hongxu Jia
> > <hongxu.jia@windriver.com>
> > Subject: Re: [PATCH] webkitgtk: Enable building for ARC architecture
> >
> > On Fri, Jan 11, 2019 at 4:50 AM Alexey Brodkin
> > <alexey.brodkin@synopsys.com> wrote:
> > >
> > > For that we need 2 things:
> > >  1. Disable JIT in JS as it's not supported for ARC.
> > >
> > >  2. Compile with "-mlong-calls" so relocations with
> > >     offsets larger than 25 bits are used, otherwise
> > >     linker fails to link final binaries.
> > >
> > > Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
> > > Cc: Alexander Kanavin <alex.kanavin@gmail.com>
> > > Cc: Hongxu Jia <hongxu.jia@windriver.com>
> > > ---
> > >  meta/recipes-sato/webkit/webkitgtk_2.22.5.bb | 7 +++++++
> > >  1 file changed, 7 insertions(+)
> > >
> > > diff --git a/meta/recipes-sato/webkit/webkitgtk_2.22.5.bb b/meta/recipes-
> > sato/webkit/webkitgtk_2.22.5.bb
> > > index fc56822f7a..56f69c7a30 100644
> > > --- a/meta/recipes-sato/webkit/webkitgtk_2.22.5.bb
> > > +++ b/meta/recipes-sato/webkit/webkitgtk_2.22.5.bb
> > > @@ -69,6 +69,13 @@ EXTRA_OECMAKE = " \
> > >  EXTRA_OECMAKE_append_x86 = " -DUSE_GSTREAMER_GL=OFF "
> > >  EXTRA_OECMAKE_append_x86-x32 = " -DUSE_GSTREAMER_GL=OFF "
> > >
> > > +# Javascript JIT is not supported on ARC
> > > +EXTRA_OECMAKE_append_arc = " -DENABLE_JIT=OFF "
> > > +# By default 25-bit "medium" calls are used on ARC
> > > +# which is not enough for binaries larger than 32 MiB
> > > +CFLAGS_append_arc = " -mlong-calls"
> > > +CXXFLAGS_append_arc = " -mlong-calls"
> >
> > perhaps adding to CPPFLAGS is going to be enough for both c/c++ cases
>
> Just tried that (only CPPFLAGS_append_arc = " -mlong-calls") and
> I don't see "-mlong-calls" used during compilation at all
> (I'm looking at .../oe/build/tmp-glibc/work/archs-oe-linux/webkitgtk/2.22.5-r0/temp/log.do_compile).
>
> So I may guess webkitgtk doesn't copy CPPFLAGS to CFLAGS and CXXFLAGS.
>

yes its possible. Thanks for additional verifications

> -Alexey