Skip to contentSkip to conversation

nss: disable -Werror

PATCH New Ross Burton 1 participant 2 messages May 14, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 nss: disable -Werror

-Werror should be used by developers and not packagers, because new compiler flags or GCC versions can use new warnings.

---
 meta-oe/recipes-support/nss/nss_3.64.bb | 1 +
 1 file changed, 1 insertion(+)
meta-oe/recipes-support/nss/nss_3.64.bb +1 -0
index 1863db131b..119d4ad037 100644
@@ -96,6 +96,7 @@ do_compile() {
     export NS_USE_GCC=1
     export NSS_USE_SYSTEM_SQLITE=1
     export NSS_ENABLE_ECC=1
+    export NSS_ENABLE_WERROR=0
 
     ${@bb.utils.contains("TUNE_FEATURES", "crypto", "export NSS_USE_ARM_HW_CRYPTO=1", "", d)}
 
Signature · 1 line
2.25.1
#1 lore raw

PATCH 2/2 nss: remove -march vs -mcpu workaround

NSS's build tries to be clever and passes for example -march=armv8-a+crypto explicitly, instead of relying on the person doing the compilation to set the right flags.

This conflicts with our compiler flags which typically pass the ideal tune for the target, for example -mcpu=cortex-a55+crc+crypto.

When this happens GCC warns that the flags conflict (which was promoted to an error, now fixed) and -march takes precedence over -mcpu.

As there's a huge number of potential tune flags to remove to avoid the conflict, now that warnings are not fatal we can stop removing the flags and let GCC warn as the generated code is the same.

---
 meta-oe/recipes-support/nss/nss_3.64.bb | 4 ----
 1 file changed, 4 deletions(-)
meta-oe/recipes-support/nss/nss_3.64.bb +0 -4
index 119d4ad037..fce5a856ee 100644
@@ -43,10 +43,6 @@ inherit siteinfo
 TD = "${S}/tentative-dist"
 TDS = "${S}/tentative-dist-staging"
 
-# cortex-a55 is ARMv8.2-a based but libatomic explicitly asks for -march=armv8.1-a
-# which caused -march conflicts in gcc
-TUNE_CCARGS_remove = "-mcpu=cortex-a55+crc -mcpu=cortex-a55 -mcpu=cortex-a55+crc+crypto"
-
 TARGET_CC_ARCH += "${LDFLAGS}"
 
 do_configure_prepend_libc-musl () {
Signature · 1 line
2.25.1