Skip to contentSkip to conversation

nss: pay attention to CFLAGS

PATCH In review Joe Slater 3 participants 3 messages Nov 15, 2017 – Nov 17, 2017

lore
Share & tools
lore

Joe Slater

author
#0 lore raw

PATCH 1/1 nss: pay attention to CFLAGS

nss ignores CFLAGS so we suggest them via CC.

---
 meta/recipes-support/nss/nss_3.33.bb | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
meta/recipes-support/nss/nss_3.33.bb +6 -1
index e3d4f96..06d81ce 100644
@@ -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}"
Signature · 1 line
2.7.4
#1 lore raw
Quoted 1 line · Joe Slater

nss ignores CFLAGS so we suggest them via CC.

is that a limitation or intentional in nss build system.

Quoted 32 lines
---
 meta/recipes-support/nss/nss_3.33.bb | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
meta/recipes-support/nss/nss_3.33.bb +6 -2
index e3d4f96..06d81ce 100644
@@ -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
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#2 lore raw

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:[email protected]]
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

Quoted 1 line · Joe Slater

nss ignores CFLAGS so we suggest them via CC.

is that a limitation or intentional in nss build system.

Quoted 32 lines
---
 meta/recipes-support/nss/nss_3.33.bb | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
meta/recipes-support/nss/nss_3.33.bb +6 -2
index e3d4f96..06d81ce 100644
@@ -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
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core