Version 24.8.3.2, tag libreoffice-24.8.3.2
[LibreOffice.git] / external / nss / nss-android.patch.1
blob707fcf99afe0b4d6fb9175ca034e8220c126852e
1 diff -ur nss.org/nspr/build/autoconf/config.sub nss/nspr/build/autoconf/config.sub
2 --- nss.org/nspr/build/autoconf/config.sub      2017-09-07 15:29:45.031246453 +0200
3 +++ nss/nspr/build/autoconf/config.sub  2017-09-07 15:32:13.087235423 +0200
4 @@ -110,6 +110,11 @@
5      exit 1;;
6  esac
7  
8 +if test $1 = "arm-unknown-linux-androideabi"; then echo $1; exit; fi
9 +if test $1 = "aarch64-unknown-linux-android"; then echo $1; exit; fi
10 +if test $1 = "i686-pc-linux-android"; then echo $1; exit; fi
11 +if test $1 = "x86_64-pc-linux-android"; then echo $1; exit; fi
13  # Split fields of configuration type
14  # shellcheck disable=SC2162
15  IFS="-" read field1 field2 field3 field4 <<EOF
16 diff -ur nss.org/nspr/configure nss/nspr/configure
17 --- nss.org/nspr/configure      2017-09-07 15:29:45.018246359 +0200
18 +++ nss/nspr/configure  2017-09-07 15:31:47.604075663 +0200
19 @@ -2728,18 +2728,15 @@
20      esac
22          AS="$android_toolchain"/bin/"$android_tool_prefix"-as
23 -    CC="$android_toolchain"/bin/"$android_tool_prefix"-gcc
24 -    CXX="$android_toolchain"/bin/"$android_tool_prefix"-g++
25 -    CPP="$android_toolchain"/bin/"$android_tool_prefix"-cpp
26 +    CC="$CC"
27 +    CXX="$CXX"
28 +    CPP="$CC" -E
29      LD="$android_toolchain"/bin/"$android_tool_prefix"-ld
30      AR="$android_toolchain"/bin/"$android_tool_prefix"-ar
31      RANLIB="$android_toolchain"/bin/"$android_tool_prefix"-ranlib
32      STRIP="$android_toolchain"/bin/"$android_tool_prefix"-strip
34      CPPFLAGS="-I$android_platform/usr/include $CPPFLAGS"
35 -    CFLAGS="-mandroid -I$android_platform/usr/include -fno-short-enums -fno-exceptions $CFLAGS"
36 -    CXXFLAGS="-mandroid -I$android_platform/usr/include -fpic -fno-short-enums -fno-exceptions $CXXFLAGS"
37 -    LDFLAGS="-mandroid -L$android_platform/usr/lib -Wl,-rpath-link=$android_platform/usr/lib --sysroot=$android_platform $LDFLAGS"
39      $as_echo "#define ANDROID 1" >>confdefs.h
41 diff -ur nss.org/nss/Makefile nss/nss/Makefile
42 --- nss.org/nss/Makefile        2017-09-07 15:29:44.933245745 +0200
43 +++ nss/nss/Makefile    2017-09-07 15:32:04.347181076 +0200
44 @@ -65,7 +65,7 @@
46  ifeq ($(OS_TARGET),Android)
47  NSPR_CONFIGURE_OPTS += --with-android-ndk=$(ANDROID_NDK) \
48 -                       --target=$(ANDROID_PREFIX) \
49 +                       --with-arch=toolchain-default \
50                         --with-android-version=$(OS_TARGET_RELEASE) \
51                         --with-android-toolchain=$(ANDROID_TOOLCHAIN) \
52                         --with-android-platform=$(ANDROID_SYSROOT)
53 --- nss/nss/Makefile.orig       2019-11-26 14:52:15.934561202 +0100
54 +++ nss/nss/Makefile    2019-11-26 14:52:20.538559612 +0100
55 @@ -140,7 +140,6 @@
57  build_nspr: $(NSPR_CONFIG_STATUS)
58         $(MAKE) -C $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME)
59 -       $(MAKE) -C $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME)/pr/tests
61  install_nspr: build_nspr
62         $(MAKE) -C $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME) install
63 --- nss/nss/lib/ckfw/builtins/manifest.mn.orig  2019-11-26 15:18:22.185985193 +0100
64 +++ nss/nss/lib/ckfw/builtins/manifest.mn       2019-11-26 15:18:29.281982387 +0100
65 @@ -5,7 +5,7 @@
67  CORE_DEPTH = ../../..
69 -DIRS = testlib
70 +DIRS =
72  MODULE = nss
74 diff -ur nss/nss/coreconf/arch.mk nss/nss/coreconf/arch.mk
75 --- nss/nss/coreconf/arch.mk    2019-11-01 10:29:44.933245745 +0100
76 +++ nss/nss/coreconf/arch.mk    2019-11-01 10:32:04.347181076 +0100
77 @@ -213,7 +213,15 @@
78  #
79  # this should be  configurable from the user
80  #
81 -   OS_TEST := arm
82 +   ifneq (,$(filter x86 x86_64,$(ANDROID_APP_ABI)))
83 +       OS_TEST := $(ANDROID_APP_ABI)
84 +   else
85 +       ifeq ($(USE_64),1)
86 +          OS_TEST := aarch64
87 +       else
88 +          OS_TEST := arm
89 +       endif
90 +   endif
91     OS_ARCH = Android
92     ifndef OS_TARGET_RELEASE
93         OS_TARGET_RELEASE := 8