[meta-oe,1/1] nss: suppress unused-function compile error

Submitted by Slater, Joseph on March 23, 2020, 6:38 p.m. | Patch ID: 171234

Details

Message ID 20200323183811.67969-1-joe.slater@windriver.com
State Changes Requested
Headers show

Commit Message

Slater, Joseph March 23, 2020, 6:38 p.m.
Allows qemumips64 nss to compile.

Signed-off-by: Joe Slater <joe.slater@windriver.com>
---
 .../nss/nss/no_unused_function_error.patch             | 18 ++++++++++++++++++
 meta-oe/recipes-support/nss/nss_3.51.bb                |  1 +
 2 files changed, 19 insertions(+)
 create mode 100644 meta-oe/recipes-support/nss/nss/no_unused_function_error.patch

Patch hide | download patch | download mbox

diff --git a/meta-oe/recipes-support/nss/nss/no_unused_function_error.patch b/meta-oe/recipes-support/nss/nss/no_unused_function_error.patch
new file mode 100644
index 0000000..cce748f
--- /dev/null
+++ b/meta-oe/recipes-support/nss/nss/no_unused_function_error.patch
@@ -0,0 +1,18 @@ 
+nss: suppress unused-function compile error
+
+Upstream-Status: Inappropriate [workaround]
+
+Signed-off-by: Joe Slater <joe.slater@windriver.com>
+
+
+--- a/nss/coreconf/Werror.mk
++++ b/nss/coreconf/Werror.mk
+@@ -96,7 +96,7 @@ ifndef WARNING_CFLAGS
+     endif #ndef NSS_ENABLE_WERROR
+ 
+     ifeq ($(NSS_ENABLE_WERROR),1)
+-      WARNING_CFLAGS += -Werror
++      WARNING_CFLAGS += -Werror -Wno-error=unused-function
+     else
+       # Old versions of gcc (< 4.8) don't support #pragma diagnostic in functions.
+       # Use this to disable use of that #pragma and the warnings it suppresses.
diff --git a/meta-oe/recipes-support/nss/nss_3.51.bb b/meta-oe/recipes-support/nss/nss_3.51.bb
index 889967c..73e5150 100644
--- a/meta-oe/recipes-support/nss/nss_3.51.bb
+++ b/meta-oe/recipes-support/nss/nss_3.51.bb
@@ -32,6 +32,7 @@  SRC_URI = "http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/${VERSIO
            file://system-pkcs11.txt \
            file://nss-fix-nsinstall-build.patch \
            file://0001-freebl-add-a-configure-option-to-disable-ARM-HW-cryp.patch \
+           file://no_unused_function_error.patch \
            "
 
 SRC_URI[md5sum] = "e59dc16965ef7713669c628d2640ebd1"

Comments

Khem Raj March 23, 2020, 6:45 p.m.
Perhaps its best to just use something like --disable-werror

On Mon, Mar 23, 2020 at 11:38 AM Joe Slater <joe.slater@windriver.com> wrote:
>
> Allows qemumips64 nss to compile.
>
> Signed-off-by: Joe Slater <joe.slater@windriver.com>
> ---
>  .../nss/nss/no_unused_function_error.patch             | 18 ++++++++++++++++++
>  meta-oe/recipes-support/nss/nss_3.51.bb                |  1 +
>  2 files changed, 19 insertions(+)
>  create mode 100644 meta-oe/recipes-support/nss/nss/no_unused_function_error.patch
>
> diff --git a/meta-oe/recipes-support/nss/nss/no_unused_function_error.patch b/meta-oe/recipes-support/nss/nss/no_unused_function_error.patch
> new file mode 100644
> index 0000000..cce748f
> --- /dev/null
> +++ b/meta-oe/recipes-support/nss/nss/no_unused_function_error.patch
> @@ -0,0 +1,18 @@
> +nss: suppress unused-function compile error
> +
> +Upstream-Status: Inappropriate [workaround]
> +
> +Signed-off-by: Joe Slater <joe.slater@windriver.com>
> +
> +
> +--- a/nss/coreconf/Werror.mk
> ++++ b/nss/coreconf/Werror.mk
> +@@ -96,7 +96,7 @@ ifndef WARNING_CFLAGS
> +     endif #ndef NSS_ENABLE_WERROR
> +
> +     ifeq ($(NSS_ENABLE_WERROR),1)
> +-      WARNING_CFLAGS += -Werror
> ++      WARNING_CFLAGS += -Werror -Wno-error=unused-function
> +     else
> +       # Old versions of gcc (< 4.8) don't support #pragma diagnostic in functions.
> +       # Use this to disable use of that #pragma and the warnings it suppresses.
> diff --git a/meta-oe/recipes-support/nss/nss_3.51.bb b/meta-oe/recipes-support/nss/nss_3.51.bb
> index 889967c..73e5150 100644
> --- a/meta-oe/recipes-support/nss/nss_3.51.bb
> +++ b/meta-oe/recipes-support/nss/nss_3.51.bb
> @@ -32,6 +32,7 @@ SRC_URI = "http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/${VERSIO
>             file://system-pkcs11.txt \
>             file://nss-fix-nsinstall-build.patch \
>             file://0001-freebl-add-a-configure-option-to-disable-ARM-HW-cryp.patch \
> +           file://no_unused_function_error.patch \
>             "
>
>  SRC_URI[md5sum] = "e59dc16965ef7713669c628d2640ebd1"
> --
> 2.7.4
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#83459): https://lists.openembedded.org/g/openembedded-devel/message/83459
Mute This Topic: https://lists.openembedded.org/mt/72499655/3617530
Group Owner: openembedded-devel+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub  [oe-patchwork@oe-patch.openembedded.org]
-=-=-=-=-=-=-=-=-=-=-=-