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
8 +if test $1 = "arm-unknown-linux-androideabi"; then echo $1; exit; fi
9 +if test $1 = "i686-pc-linux-android"; then echo $1; exit; fi
10 +if test $1 = "x86_64-pc-linux-android"; then echo $1; exit; fi
12 # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
13 # Here we must recognize all the valid KERNEL-OS combinations.
14 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
15 diff -ur nss.org/nspr/configure nss/nspr/configure
16 --- nss.org/nspr/configure 2017-09-07 15:29:45.018246359 +0200
17 +++ nss/nspr/configure 2017-09-07 15:31:47.604075663 +0200
18 @@ -2737,18 +2739,15 @@
21 AS="$android_toolchain"/bin/"$android_tool_prefix"-as
22 - CC="$android_toolchain"/bin/"$android_tool_prefix"-gcc
23 - CXX="$android_toolchain"/bin/"$android_tool_prefix"-g++
24 - CPP="$android_toolchain"/bin/"$android_tool_prefix"-cpp
28 LD="$android_toolchain"/bin/"$android_tool_prefix"-ld
29 AR="$android_toolchain"/bin/"$android_tool_prefix"-ar
30 RANLIB="$android_toolchain"/bin/"$android_tool_prefix"-ranlib
31 STRIP="$android_toolchain"/bin/"$android_tool_prefix"-strip
33 CPPFLAGS="-I$android_platform/usr/include $CPPFLAGS"
34 - CFLAGS="-mandroid -I$android_platform/usr/include -fno-short-enums -fno-exceptions $CFLAGS"
35 - CXXFLAGS="-mandroid -I$android_platform/usr/include -fpic -fno-short-enums -fno-exceptions $CXXFLAGS"
36 - LDFLAGS="-mandroid -L$android_platform/usr/lib -Wl,-rpath-link=$android_platform/usr/lib --sysroot=$android_platform $LDFLAGS"
38 $as_echo "#define ANDROID 1" >>confdefs.h
40 diff -ur nss.org/nss/Makefile nss/nss/Makefile
41 --- nss.org/nss/Makefile 2017-09-07 15:29:44.933245745 +0200
42 +++ nss/nss/Makefile 2017-09-07 15:32:04.347181076 +0200
44 ifeq ($(OS_TARGET),Android)
45 NSPR_CONFIGURE_OPTS += --with-android-ndk=$(ANDROID_NDK) \
46 - --target=$(ANDROID_PREFIX) \
47 + --with-arch=toolchain-default \
48 --with-android-version=$(OS_TARGET_RELEASE) \
49 --with-android-toolchain=$(ANDROID_TOOLCHAIN) \
50 --with-android-platform=$(ANDROID_SYSROOT)