Files
Caolán McNamara f4de60d1b7 skip nspr's test programs on windows and macOS too
nss has had its own NSS_DISABLE_NSPR_TESTS switch since 2024,
https://bugzilla.mozilla.org/show_bug.cgi?id=1904404, so pass that
instead of patching the line out for iOS and Android and skip
the test programs universally.

On windows that skips 161 of nspr's 253 compiled objects and 159 linked test
executables.

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I743c3827e33a927961156ee2b3b0f24e5c625b36
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/12846
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 5d38d32be65951c2f4cc59df68e2a96c0bac4b61)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211108
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-18 16:16:09 +02:00

84 lines
3.2 KiB
Groff

diff -ur nss.org/nspr/build/autoconf/config.sub nss/nspr/build/autoconf/config.sub
--- nss.org/nspr/build/autoconf/config.sub 2017-09-07 15:29:45.031246453 +0200
+++ nss/nspr/build/autoconf/config.sub 2017-09-07 15:32:13.087235423 +0200
@@ -110,6 +110,11 @@
exit 1;;
esac
+if test $1 = "arm-unknown-linux-androideabi"; then echo $1; exit; fi
+if test $1 = "aarch64-unknown-linux-android"; then echo $1; exit; fi
+if test $1 = "i686-pc-linux-android"; then echo $1; exit; fi
+if test $1 = "x86_64-pc-linux-android"; then echo $1; exit; fi
+
# Split fields of configuration type
# shellcheck disable=SC2162
IFS="-" read field1 field2 field3 field4 <<EOF
diff -ur nss.org/nspr/configure nss/nspr/configure
--- nss.org/nspr/configure 2017-09-07 15:29:45.018246359 +0200
+++ nss/nspr/configure 2017-09-07 15:31:47.604075663 +0200
@@ -3253,18 +3253,15 @@
esac
AS="$android_toolchain"/bin/"$android_tool_prefix"-as
- CC="$android_toolchain"/bin/"$android_tool_prefix"-gcc
- CXX="$android_toolchain"/bin/"$android_tool_prefix"-g++
- CPP="$android_toolchain"/bin/"$android_tool_prefix"-cpp
+ CC="$CC"
+ CXX="$CXX"
+ CPP="$CC" -E
LD="$android_toolchain"/bin/"$android_tool_prefix"-ld
AR="$android_toolchain"/bin/"$android_tool_prefix"-ar
RANLIB="$android_toolchain"/bin/"$android_tool_prefix"-ranlib
STRIP="$android_toolchain"/bin/"$android_tool_prefix"-strip
CPPFLAGS="-I$android_platform/usr/include $CPPFLAGS"
- CFLAGS="-mandroid -I$android_platform/usr/include -fno-short-enums -fno-exceptions $CFLAGS"
- CXXFLAGS="-mandroid -I$android_platform/usr/include -fpic -fno-short-enums -fno-exceptions $CXXFLAGS"
- LDFLAGS="-mandroid -L$android_platform/usr/lib -Wl,-rpath-link=$android_platform/usr/lib --sysroot=$android_platform $LDFLAGS"
printf "%s\n" "#define ANDROID 1" >>confdefs.h
diff -ur nss.org/nss/Makefile nss/nss/Makefile
--- nss.org/nss/Makefile 2017-09-07 15:29:44.933245745 +0200
+++ nss/nss/Makefile 2017-09-07 15:32:04.347181076 +0200
@@ -67,7 +67,7 @@
ifeq ($(OS_TARGET),Android)
NSPR_CONFIGURE_OPTS += --with-android-ndk=$(ANDROID_NDK) \
- --target=$(ANDROID_PREFIX) \
+ --with-arch=toolchain-default \
--with-android-version=$(OS_TARGET_RELEASE) \
--with-android-toolchain=$(ANDROID_TOOLCHAIN) \
--with-android-platform=$(ANDROID_SYSROOT)
--- nss/nss/lib/ckfw/builtins/manifest.mn.orig 2019-11-26 15:18:22.185985193 +0100
+++ nss/nss/lib/ckfw/builtins/manifest.mn 2019-11-26 15:18:29.281982387 +0100
@@ -5,7 +5,7 @@
CORE_DEPTH = ../../..
-DIRS = testlib
+DIRS =
MODULE = nss
diff -ur nss/nss/coreconf/arch.mk nss/nss/coreconf/arch.mk
--- nss/nss/coreconf/arch.mk 2019-11-01 10:29:44.933245745 +0100
+++ nss/nss/coreconf/arch.mk 2019-11-01 10:32:04.347181076 +0100
@@ -213,7 +213,15 @@
#
# this should be configurable from the user
#
- OS_TEST := arm
+ ifneq (,$(filter x86 x86_64,$(ANDROID_APP_ABI)))
+ OS_TEST := $(ANDROID_APP_ABI)
+ else
+ ifeq ($(USE_64),1)
+ OS_TEST := aarch64
+ else
+ OS_TEST := arm
+ endif
+ endif
OS_ARCH = Android
ifndef OS_TARGET_RELEASE
OS_TARGET_RELEASE := 8