package/libnss: fix Makefile ifndef FREEBL_NO_DEPEND

NSS Makefile build system is pretty weak if used with parallel build. In
this case what happens is that 'ifndef FREEBL_NO_DEPEND' appears in
lib/freebl/manifest.mn and coreconf/Linux.mk. When parallel building
variable FREEBL_NO_DEPEND gets defined if not defined to 1, but in the
2 occurences we end up having on variable set to 1 and 1 still not
defined. This results in:
`
/home/giuliobenetti/br-reproduce/3e046c996825447f48377f7c4361b5db26b84f95/output/host/lib/gcc/arm-buildroot-linux-musleabi/14.3.0/../../../../arm-buildroot-linux-musleabi/bin/ld: Linux2.6_arm_arm-buildroot-linux-musleabi-gcc.br_real_glibc_PTH_DBG.OBJ/Linux_SINGLE_SHLIB/lowhash_vector.o: in function `loader_GetOriginalPathname':
lowhash_vector.c:(.text.loader_GetOriginalPathname+0x68): undefined reference to `PR_SetError'
collect2: error: ld returned 1 exit status
`
So let's pass FREEBL_NO_DEPEND=1 when building to define that variable
instead to let NSS Makefile to calculate it.

Fixes:
https://autobuild.buildroot.net/results/ad4/ad40536728303c56d1d0968e38ac36da12cca416//

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
Signed-off-by: Romain Naour <romain.naour@smile.fr>
(cherry picked from commit 6d3cc38ec0)
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
This commit is contained in:
Giulio Benetti
2025-12-29 18:03:31 +01:00
committed by Thomas Perale
parent 66127b61bb
commit 33ec270f8a

View File

@@ -57,7 +57,8 @@ LIBNSS_BUILD_VARS = \
OS_ARCH="Linux" \
OS_RELEASE="2.6" \
OS_TEST=$(BR2_PACKAGE_LIBNSS_ARCH) \
NSS_ENABLE_WERROR=0
NSS_ENABLE_WERROR=0 \
FREEBL_NO_DEPEND=1
ifeq ($(BR2_POWERPC_CPU_HAS_ALTIVEC),)
# Disable Altivec if not supported
@@ -136,7 +137,8 @@ HOST_LIBNSS_BUILD_VARS = \
NSS_USE_SYSTEM_SQLITE=1 \
SQLITE_INCLUDE_DIR=$(HOST_DIR)/include \
ZLIB_INCLUDE_DIR=$(HOST_DIR)/include \
NSS_ENABLE_WERROR=0
NSS_ENABLE_WERROR=0 \
FREEBL_NO_DEPEND=1
HOST_LIBNSS_DEPENDENCIES = host-libnspr host-sqlite host-zlib