Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 1/1] nss: pay attention to CFLAGS
@ 2017-11-15 18:54 Joe Slater
  2017-11-15 19:39 ` Khem Raj
  0 siblings, 1 reply; 3+ messages in thread
From: Joe Slater @ 2017-11-15 18:54 UTC (permalink / raw)
  To: openembedded-core

nss ignores CFLAGS so we suggest them via CC.

Signed-off-by: Joe Slater <jslater@windriver.com>
---
 meta/recipes-support/nss/nss_3.33.bb | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-support/nss/nss_3.33.bb b/meta/recipes-support/nss/nss_3.33.bb
index e3d4f96..06d81ce 100644
--- a/meta/recipes-support/nss/nss_3.33.bb
+++ b/meta/recipes-support/nss/nss_3.33.bb
@@ -104,7 +104,12 @@ do_compile() {
     # We can modify CC in the environment, but if we set it via an
     # argument to make, nsinstall, a host program, will also build with it!
     #
-    export CC="${CC} -g"
+    # nss pretty much does its own thing with CFLAGS, so we put them into CC.
+    # Optimization will get clobbered, but most of the stuff will survive.
+    # The motivation for this is to point to the correct place for debug
+    # source files and CFLAGS does that.  Nothing uses CCC.
+    #
+    export CC="${CC} ${CFLAGS}"
     make -C ./nss CCC="${CXX} -g" \
         OS_TEST=${OS_TEST} \
         RPATH="${RPATH}"
-- 
2.7.4



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

* Re: [PATCH 1/1] nss: pay attention to CFLAGS
  2017-11-15 18:54 [PATCH 1/1] nss: pay attention to CFLAGS Joe Slater
@ 2017-11-15 19:39 ` Khem Raj
  2017-11-17 21:14   ` Slater, Joseph
  0 siblings, 1 reply; 3+ messages in thread
From: Khem Raj @ 2017-11-15 19:39 UTC (permalink / raw)
  To: Joe Slater; +Cc: Patches and discussions about the oe-core layer

On Wed, Nov 15, 2017 at 10:54 AM, Joe Slater <jslater@windriver.com> wrote:
> nss ignores CFLAGS so we suggest them via CC.

is that a limitation or intentional in nss build system.

>
> Signed-off-by: Joe Slater <jslater@windriver.com>
> ---
>  meta/recipes-support/nss/nss_3.33.bb | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/meta/recipes-support/nss/nss_3.33.bb b/meta/recipes-support/nss/nss_3.33.bb
> index e3d4f96..06d81ce 100644
> --- a/meta/recipes-support/nss/nss_3.33.bb
> +++ b/meta/recipes-support/nss/nss_3.33.bb
> @@ -104,7 +104,12 @@ do_compile() {
>      # We can modify CC in the environment, but if we set it via an
>      # argument to make, nsinstall, a host program, will also build with it!
>      #
> -    export CC="${CC} -g"
> +    # nss pretty much does its own thing with CFLAGS, so we put them into CC.
> +    # Optimization will get clobbered, but most of the stuff will survive.
> +    # The motivation for this is to point to the correct place for debug
> +    # source files and CFLAGS does that.  Nothing uses CCC.
> +    #
> +    export CC="${CC} ${CFLAGS}"
>      make -C ./nss CCC="${CXX} -g" \
>          OS_TEST=${OS_TEST} \
>          RPATH="${RPATH}"
> --
> 2.7.4
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


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

* Re: [PATCH 1/1] nss: pay attention to CFLAGS
  2017-11-15 19:39 ` Khem Raj
@ 2017-11-17 21:14   ` Slater, Joseph
  0 siblings, 0 replies; 3+ messages in thread
From: Slater, Joseph @ 2017-11-17 21:14 UTC (permalink / raw)
  To: Khem Raj; +Cc: Patches and discussions about the oe-core layer

It is intentional that nss tries to configure CFLAGS for the particular build environment.  Another approach we could take here would be to only put in the prefix-mapping options (and -g).

Joe


-----Original Message-----
From: Khem Raj [mailto:raj.khem@gmail.com] 
Sent: Wednesday, November 15, 2017 11:39 AM
To: Slater, Joseph
Cc: Patches and discussions about the oe-core layer
Subject: Re: [OE-core] [oe-core][PATCH 1/1] nss: pay attention to CFLAGS

On Wed, Nov 15, 2017 at 10:54 AM, Joe Slater <jslater@windriver.com> wrote:
> nss ignores CFLAGS so we suggest them via CC.

is that a limitation or intentional in nss build system.

>
> Signed-off-by: Joe Slater <jslater@windriver.com>
> ---
>  meta/recipes-support/nss/nss_3.33.bb | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/meta/recipes-support/nss/nss_3.33.bb b/meta/recipes-support/nss/nss_3.33.bb
> index e3d4f96..06d81ce 100644
> --- a/meta/recipes-support/nss/nss_3.33.bb
> +++ b/meta/recipes-support/nss/nss_3.33.bb
> @@ -104,7 +104,12 @@ do_compile() {
>      # We can modify CC in the environment, but if we set it via an
>      # argument to make, nsinstall, a host program, will also build with it!
>      #
> -    export CC="${CC} -g"
> +    # nss pretty much does its own thing with CFLAGS, so we put them into CC.
> +    # Optimization will get clobbered, but most of the stuff will survive.
> +    # The motivation for this is to point to the correct place for debug
> +    # source files and CFLAGS does that.  Nothing uses CCC.
> +    #
> +    export CC="${CC} ${CFLAGS}"
>      make -C ./nss CCC="${CXX} -g" \
>          OS_TEST=${OS_TEST} \
>          RPATH="${RPATH}"
> --
> 2.7.4
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core

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

end of thread, other threads:[~2017-11-17 21:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-15 18:54 [PATCH 1/1] nss: pay attention to CFLAGS Joe Slater
2017-11-15 19:39 ` Khem Raj
2017-11-17 21:14   ` Slater, Joseph

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox