All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe][PATCH] mozjs: customize HOST_CFLAGS
@ 2017-08-22  7:02 jackie.huang
  2017-08-23  0:20 ` Andre McCurdy
  0 siblings, 1 reply; 3+ messages in thread
From: jackie.huang @ 2017-08-22  7:02 UTC (permalink / raw)
  To: openembedded-devel

From: Mingli Yu <Mingli.Yu@windriver.com>

Customize HOST_CFLAGS, HOST_CXXFLAGS and HOST_LDFLAGS
to fix do_configure error as previously use the common
CFLAGS and CXXFLAGS in both cross-compile env and host env,
and the option -fstack-protector-strong which not
recognized in host env can result in do_configure
error as below.

| checking whether the host c compiler (gcc -O2 -pipe -g -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fstack-protector-strong -Wl,-z,relro,-z,now) works... configure: error: installation or configuration problem: host compiler gcc cannot create executables.

Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
---
 meta-oe/recipes-extended/mozjs/mozjs_17.0.0.bb | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta-oe/recipes-extended/mozjs/mozjs_17.0.0.bb b/meta-oe/recipes-extended/mozjs/mozjs_17.0.0.bb
index b6744395f..b72ee7bb3 100644
--- a/meta-oe/recipes-extended/mozjs/mozjs_17.0.0.bb
+++ b/meta-oe/recipes-extended/mozjs/mozjs_17.0.0.bb
@@ -51,6 +51,9 @@ PACKAGECONFIG[x11] = "--with-x --x-includes=${STAGING_INCDIR} --x-libraries=${ST
 
 # mozjs requires autoreconf 2.13
 do_configure() {
+    export HOST_CFLAGS="${BUILD_CFLAGS}"
+    export HOST_CXXFLAGS="${BUILD_CPPFLAGS}"
+    export HOST_LDFLAGS="${BUILD_LDFLAGS}"
     ( cd ${S}
       gnu-configize --force
       mv config.guess config.sub build/autoconf )
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [meta-oe][PATCH] mozjs: customize HOST_CFLAGS
  2017-08-22  7:02 [meta-oe][PATCH] mozjs: customize HOST_CFLAGS jackie.huang
@ 2017-08-23  0:20 ` Andre McCurdy
  2017-08-23  0:37   ` Huang, Jie (Jackie)
  0 siblings, 1 reply; 3+ messages in thread
From: Andre McCurdy @ 2017-08-23  0:20 UTC (permalink / raw)
  To: Huang, Jie (Jackie); +Cc: openembeded-devel

On Tue, Aug 22, 2017 at 12:02 AM,  <jackie.huang@windriver.com> wrote:
> From: Mingli Yu <Mingli.Yu@windriver.com>
>
> Customize HOST_CFLAGS, HOST_CXXFLAGS and HOST_LDFLAGS
> to fix do_configure error as previously use the common
> CFLAGS and CXXFLAGS in both cross-compile env and host env,
> and the option -fstack-protector-strong which not
> recognized in host env can result in do_configure
> error as below.

That should already be solved by:

  http://git.openembedded.org/meta-openembedded/commit/?id=a0b2e6f4fca7ac907eb7d6e06ca4c1581a5c553f

Which version of meta-oe are you testing with?

> | checking whether the host c compiler (gcc -O2 -pipe -g -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fstack-protector-strong -Wl,-z,relro,-z,now) works... configure: error: installation or configuration problem: host compiler gcc cannot create executables.
>
> Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
> Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
> ---
>  meta-oe/recipes-extended/mozjs/mozjs_17.0.0.bb | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/meta-oe/recipes-extended/mozjs/mozjs_17.0.0.bb b/meta-oe/recipes-extended/mozjs/mozjs_17.0.0.bb
> index b6744395f..b72ee7bb3 100644
> --- a/meta-oe/recipes-extended/mozjs/mozjs_17.0.0.bb
> +++ b/meta-oe/recipes-extended/mozjs/mozjs_17.0.0.bb
> @@ -51,6 +51,9 @@ PACKAGECONFIG[x11] = "--with-x --x-includes=${STAGING_INCDIR} --x-libraries=${ST
>
>  # mozjs requires autoreconf 2.13
>  do_configure() {
> +    export HOST_CFLAGS="${BUILD_CFLAGS}"
> +    export HOST_CXXFLAGS="${BUILD_CPPFLAGS}"
> +    export HOST_LDFLAGS="${BUILD_LDFLAGS}"
>      ( cd ${S}
>        gnu-configize --force
>        mv config.guess config.sub build/autoconf )
> --
> 2.11.0
>
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [meta-oe][PATCH] mozjs: customize HOST_CFLAGS
  2017-08-23  0:20 ` Andre McCurdy
@ 2017-08-23  0:37   ` Huang, Jie (Jackie)
  0 siblings, 0 replies; 3+ messages in thread
From: Huang, Jie (Jackie) @ 2017-08-23  0:37 UTC (permalink / raw)
  To: Andre McCurdy; +Cc: openembeded-devel



> -----Original Message-----
> From: Andre McCurdy [mailto:armccurdy@gmail.com]
> Sent: Wednesday, August 23, 2017 08:21
> To: Huang, Jie (Jackie)
> Cc: openembeded-devel
> Subject: Re: [oe] [meta-oe][PATCH] mozjs: customize HOST_CFLAGS
> 
> On Tue, Aug 22, 2017 at 12:02 AM,  <jackie.huang@windriver.com> wrote:
> > From: Mingli Yu <Mingli.Yu@windriver.com>
> >
> > Customize HOST_CFLAGS, HOST_CXXFLAGS and HOST_LDFLAGS
> > to fix do_configure error as previously use the common
> > CFLAGS and CXXFLAGS in both cross-compile env and host env,
> > and the option -fstack-protector-strong which not
> > recognized in host env can result in do_configure
> > error as below.
> 
> That should already be solved by:
> 
>   http://git.openembedded.org/meta-
> openembedded/commit/?id=a0b2e6f4fca7ac907eb7d6e06ca4c1581a5c553f

Thanks for pointing that out!

> 
> Which version of meta-oe are you testing with?

I think it's Morty, sorry that I didn't check with the latest before sending the patch.

Thanks,
Jackie

> 
> > | checking whether the host c compiler (gcc -O2 -pipe -g -fstack-protector-
> strong -D_FORTIFY_SOURCE=2 -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -
> fstack-protector-strong -Wl,-z,relro,-z,now) works... configure: error:
> installation or configuration problem: host compiler gcc cannot create
> executables.
> >
> > Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
> > Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
> > ---
> >  meta-oe/recipes-extended/mozjs/mozjs_17.0.0.bb | 3 +++
> >  1 file changed, 3 insertions(+)
> >
> > diff --git a/meta-oe/recipes-extended/mozjs/mozjs_17.0.0.bb b/meta-
> oe/recipes-extended/mozjs/mozjs_17.0.0.bb
> > index b6744395f..b72ee7bb3 100644
> > --- a/meta-oe/recipes-extended/mozjs/mozjs_17.0.0.bb
> > +++ b/meta-oe/recipes-extended/mozjs/mozjs_17.0.0.bb
> > @@ -51,6 +51,9 @@ PACKAGECONFIG[x11] = "--with-x --x-
> includes=${STAGING_INCDIR} --x-libraries=${ST
> >
> >  # mozjs requires autoreconf 2.13
> >  do_configure() {
> > +    export HOST_CFLAGS="${BUILD_CFLAGS}"
> > +    export HOST_CXXFLAGS="${BUILD_CPPFLAGS}"
> > +    export HOST_LDFLAGS="${BUILD_LDFLAGS}"
> >      ( cd ${S}
> >        gnu-configize --force
> >        mv config.guess config.sub build/autoconf )
> > --
> > 2.11.0
> >
> > --
> > _______________________________________________
> > Openembedded-devel mailing list
> > Openembedded-devel@lists.openembedded.org
> > http://lists.openembedded.org/mailman/listinfo/openembedded-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-08-23  0:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-22  7:02 [meta-oe][PATCH] mozjs: customize HOST_CFLAGS jackie.huang
2017-08-23  0:20 ` Andre McCurdy
2017-08-23  0:37   ` Huang, Jie (Jackie)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.