Compiled on RPI3B with 6.1.25-piCore-v7 Compile Flags: # must be passed as CC CXX CC='gcc -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -L/usr/local/lib -Os -pipe -flto -fuse-linker-plugin -fno-exceptions' CXX='g++ -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -L/usr/local/lib -Os -pipe -flto -fuse-linker-plugin -fno-exceptions -fno-rtti' LDFLAGS='-Wl,-rpath=/usr/local/lib -Wl,-O1' export CC CXX LDFLAGS Dependencies: compiletc perl5 nspr-dev sqlite3-dev llvm-bin Commands: cd /tmp wget https://archive.mozilla.org/pub/security/nss/releases/NSS_3_92_RTM/src/nss-3.92.tar.gz wget https://www.linuxfromscratch.org/patches/blfs/svn/nss-3.92-standalone-1.patch tar -xf nss-3.92.tar.gz cd nss-3.92/nss/ patch -Np2 < ../../nss-3.92-standalone-1.patch # checking # find . -name Makefile -exec grep --color '\-g' {} + # find . -name Linux.mk -exec grep --color '\-O[0-9]' {} + find . -name Makefile -type f -exec sed -i 's/ -g//g' {} \; find . -name Makefile -type f -exec sed -i 's/ -O2//g' {} \; find . -name Linux.mk -type f -exec sed -i 's/ -O2//g' {} \; time make -j4 BUILD_OPT=1 NSPR_INCLUDE_DIR=/usr/local/include/nspr USE_SYSTEM_ZLIB=1 ZLIB_LIBS=-lz NSS_ENABLE_WERROR=0 NSS_USE_SYSTEM_SQLITE=1 real 1h 47m 56s user 2h 57m 05s sys 3m 14.08s # nss-3.92/dist cd ../dist # dev mkdir -p /tmp/packing-nss-dev/usr/local/lib/pkgconfig install -m644 Linux*/lib/libcrmf.a /tmp/packing-nss-dev/usr/local/lib/ install -m644 Linux*/lib/pkgconfig/nss.pc /tmp/packing-nss-dev/usr/local/lib/pkgconfig/ install -Dm755 Linux*/bin/nss-config -t /tmp/packing-nss-dev/usr/local/bin/ mkdir -p /tmp/packing-nss-dev/usr/local/include/nss install -m644 public/nss/* /tmp/packing-nss-dev/usr/local/include/nss/ install -m644 private/nss/* /tmp/packing-nss-dev/usr/local/include/nss/ # main # https://bugzilla.redhat.com/show_bug.cgi?id=173537 # make sure *chk and *so are in the same directory mkdir -p /tmp/packing-nss/usr/local/lib install -m775 Linux*/lib/*so /tmp/packing-nss/usr/local/lib/ install -m644 Linux*/lib/*chk /tmp/packing-nss-dev/usr/local/lib/ install -Dm775 Linux*/bin/certutil -t /tmp/packing-nss/usr/local/bin/ install -Dm775 Linux*/bin/pk12util -t /tmp/packing-nss/usr/local/bin/ # edit nss.pc # prefix=/usr/local sed -i '/^prefix=/ c prefix=/usr/local' /tmp/packing-nss-dev/usr/local/lib/pkgconfig/nss.pc # nss-config sed -i '/^prefix=/ c prefix=/usr/local' /tmp/packing-nss-dev/usr/local/bin/nss-config # strip find /tmp/packing-nss -type f -exec file {} ';' | grep ELF | cut -d : -f 1 | xargs strip --strip-unneeded llvm-strip --strip-debug /tmp/packing-nss-dev/usr/local/lib/libcrmf.a