1 ################################################################################
5 ################################################################################
7 LIBNSS_VERSION
= 3.27.2
8 LIBNSS_SOURCE
= nss-
$(LIBNSS_VERSION
).
tar.gz
9 LIBNSS_SITE
= https
://ftp.mozilla.org
/pub
/mozilla.org
/security
/nss
/releases
/NSS_
$(subst .
,_
,$(LIBNSS_VERSION
))_RTM
/src
11 LIBNSS_INSTALL_STAGING
= YES
12 LIBNSS_DEPENDENCIES
= libnspr sqlite zlib
13 LIBNSS_LICENSE
= MPLv2.0
14 LIBNSS_LICENSE_FILES
= nss
/COPYING
16 # --gc-sections triggers binutils ld segfault
17 # https://sourceware.org/bugzilla/show_bug.cgi?id=21180
18 ifeq ($(BR2_microblaze
),y
)
19 define LIBNSS_DROP_GC_SECTIONS
20 sed
-i
's:-Wl,--gc-sections::g' $(@D
)/nss
/coreconf
/Linux.mk
23 LIBNSS_PRE_CONFIGURE_HOOKS
+= LIBNSS_DROP_GC_SECTIONS
28 NSPR_INCLUDE_DIR
=$(STAGING_DIR
)/usr
/include/nspr \
29 NSPR_LIB_DIR
=$(STAGING_DIR
)/usr
/lib \
32 NSS_DISABLE_GTESTS
=1 \
33 NSS_USE_SYSTEM_SQLITE
=1 \
35 NATIVE_CC
="$(HOSTCC)" \
36 TARGETCC
="$(TARGET_CC)" \
37 TARGETCCC
="$(TARGET_CXX)" \
38 TARGETRANLIB
="$(TARGET_RANLIB)" \
43 # #pragma usage needs gcc >= 4.8
44 # See https://bugzilla.mozilla.org/show_bug.cgi?id=1226179
45 ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
),)
46 LIBNSS_BUILD_VARS
+= NSS_ENABLE_WERROR
=0
49 ifeq ($(BR2_ARCH_IS_64
),y
)
50 # MIPS64 n32 is treated as a 32-bit architecture by libnss.
51 # See: https://bugzilla.mozilla.org/show_bug.cgi?id=1010730
52 ifeq ($(BR2_MIPS_NABI32
),)
53 LIBNSS_BUILD_VARS
+= USE_64
=1
57 define LIBNSS_BUILD_CMDS
58 $(TARGET_MAKE_ENV
) $(MAKE1
) -C
$(@D
)/nss coreconf \
59 SOURCE_MD_DIR
=$(@D
)/$(LIBNSS_DISTDIR
) \
60 DIST
=$(@D
)/$(LIBNSS_DISTDIR
) \
63 $(TARGET_MAKE_ENV
) $(MAKE1
) -C
$(@D
)/nss lib
/dbm
all \
64 SOURCE_MD_DIR
=$(@D
)/$(LIBNSS_DISTDIR
) \
65 DIST
=$(@D
)/$(LIBNSS_DISTDIR
) \
67 $(LIBNSS_BUILD_VARS
) TARGET_OPTIMIZER
="$(TARGET_CFLAGS)" \
68 NATIVE_FLAGS
="$(HOST_CFLAGS)"
71 define LIBNSS_INSTALL_STAGING_CMDS
72 $(INSTALL
) -m
755 -t
$(STAGING_DIR
)/usr
/lib
/ \
73 $(@D
)/$(LIBNSS_DISTDIR
)/lib
/*.so
74 $(INSTALL
) -m
755 -d
$(STAGING_DIR
)/usr
/include/nss
75 $(INSTALL
) -m
644 -t
$(STAGING_DIR
)/usr
/include/nss \
76 $(@D
)/$(LIBNSS_DISTDIR
)/public
/nss
/*
77 $(INSTALL
) -m
755 -t
$(STAGING_DIR
)/usr
/lib
/ \
78 $(@D
)/$(LIBNSS_DISTDIR
)/lib
/*.a
79 $(INSTALL
) -D
-m
0644 $(TOPDIR
)/package
/libnss
/nss.
pc.in \
80 $(STAGING_DIR
)/usr
/lib
/pkgconfig
/nss.
pc
81 $(SED
) 's/@VERSION@/$(LIBNSS_VERSION)/g;' \
82 $(STAGING_DIR
)/usr
/lib
/pkgconfig
/nss.
pc
85 define LIBNSS_INSTALL_TARGET_CMDS
86 $(INSTALL
) -m
755 -t
$(TARGET_DIR
)/usr
/lib
/ \
87 $(@D
)/$(LIBNSS_DISTDIR
)/lib
/*.so
88 $(INSTALL
) -m
755 -d
$(TARGET_DIR
)/usr
/include/nss
89 $(INSTALL
) -m
644 -t
$(TARGET_DIR
)/usr
/include/nss \
90 $(@D
)/$(LIBNSS_DISTDIR
)/public
/nss
/*
91 $(INSTALL
) -m
755 -t
$(TARGET_DIR
)/usr
/lib
/ \
92 $(@D
)/$(LIBNSS_DISTDIR
)/lib
/*.a
93 $(INSTALL
) -D
-m
0644 $(TOPDIR
)/package
/libnss
/nss.
pc.in \
94 $(TARGET_DIR
)/usr
/lib
/pkgconfig
/nss.
pc
95 $(SED
) 's/@VERSION@/$(LIBNSS_VERSION)/g;' \
96 $(TARGET_DIR
)/usr
/lib
/pkgconfig
/nss.
pc
99 $(eval
$(generic-package
))