diff options
author | kaie%kuix.de <devnull@localhost> | 2013-01-08 16:19:11 +0000 |
---|---|---|
committer | kaie%kuix.de <devnull@localhost> | 2013-01-08 16:19:11 +0000 |
commit | 68da1150e2fb30257e0d88234d79560395f66704 (patch) | |
tree | 8b3fa2665dd70c41eb6f5e13d6c5672a13c86823 /security/coreconf | |
parent | f7a7102f5757ba72e41af1d31030f27ff9647f69 (diff) | |
download | nss-hg-68da1150e2fb30257e0d88234d79560395f66704.tar.gz |
Bug 772144 - Run the NSS test suite on ARM/Android, Patch by rrelyea/kaie, r=kaie/rrelyea
Diffstat (limited to 'security/coreconf')
-rw-r--r-- | security/coreconf/Android.mk | 6 | ||||
-rw-r--r-- | security/coreconf/Linux.mk | 30 | ||||
-rw-r--r-- | security/coreconf/arch.mk | 11 | ||||
-rw-r--r-- | security/coreconf/config.mk | 2 |
4 files changed, 46 insertions, 3 deletions
diff --git a/security/coreconf/Android.mk b/security/coreconf/Android.mk new file mode 100644 index 000000000..415812a7e --- /dev/null +++ b/security/coreconf/Android.mk @@ -0,0 +1,6 @@ +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +include $(CORE_DEPTH)/coreconf/Linux.mk diff --git a/security/coreconf/Linux.mk b/security/coreconf/Linux.mk index 4417d1642..a586e5edb 100644 --- a/security/coreconf/Linux.mk +++ b/security/coreconf/Linux.mk @@ -8,7 +8,9 @@ include $(CORE_DEPTH)/coreconf/UNIX.mk # # The default implementation strategy for Linux is now pthreads # -USE_PTHREADS = 1 +ifneq ($(OS_TARGET),Android) + USE_PTHREADS = 1 +endif ifeq ($(USE_PTHREADS),1) IMPL_STRATEGY = _PTH @@ -20,6 +22,26 @@ RANLIB = ranlib DEFAULT_COMPILER = gcc +ifeq ($(OS_TARGET),Android) +ifndef ANDROID_NDK + $(error Must set ANDROID_NDK to the path to the android NDK first) +endif + ANDROID_PREFIX=$(OS_TEST)-linux-androideabi + ANDROID_TARGET=$(ANDROID_PREFIX)-4.4.3 + # should autodetect which linux we are on, currently android only + # supports linux-x86 prebuilts + ANDROID_TOOLCHAIN=$(ANDROID_NDK)/toolchains/$(ANDROID_TARGET)/prebuilt/linux-x86 + ANDROID_SYSROOT=$(ANDROID_NDK)/platforms/android-$(OS_TARGET_RELEASE)/arch-$(OS_TEST) + ANDROID_CC=$(ANDROID_TOOLCHAIN)/bin/$(ANDROID_PREFIX)-gcc +# internal tools need to be built with the native compiler +ifndef INTERNAL_TOOLS + CC = $(ANDROID_CC) --sysroot=$(ANDROID_SYSROOT) + DEFAULT_COMPILER=$(ANDROID_PREFIX)-gcc + ARCHFLAG = --sysroot=$(ANDROID_SYSROOT) + DEFINES += -DNO_SYSINFO -DNO_FORK_CHECK -DANDROID + CROSS_COMPILE = 1 +endif +endif ifeq ($(OS_TEST),ppc64) CPU_ARCH = ppc ifeq ($(USE_64),1) @@ -67,7 +89,9 @@ endif endif +ifneq ($(OS_TARGET),Android) LIBC_TAG = _glibc +endif ifeq ($(OS_RELEASE),2.0) OS_REL_CFLAGS += -DLINUX2_0 @@ -103,7 +127,7 @@ endif # Place -ansi and *_SOURCE before $(DSO_CFLAGS) so DSO_CFLAGS can override # -ansi on platforms like Android where the system headers are C99 and do # not build with -ansi. -STANDARDS_CFLAGS = -ansi -D_POSIX_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE +STANDARDS_CFLAGS = -D_POSIX_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE OS_CFLAGS = $(STANDARDS_CFLAGS) $(DSO_CFLAGS) $(OS_REL_CFLAGS) $(ARCHFLAG) -Wall -Werror-implicit-function-declaration -Wno-switch -pipe -DLINUX -Dlinux -DHAVE_STRERROR OS_LIBS = $(OS_PTHREAD) -ldl -lc @@ -141,12 +165,14 @@ CPU_TAG = _$(CPU_ARCH) # dependencies by default. Set FREEBL_NO_DEPEND to 0 in the environment to # override this. # +ifneq ($(OS_TARGET),Android) ifeq (2.6,$(firstword $(sort 2.6 $(OS_RELEASE)))) ifndef FREEBL_NO_DEPEND FREEBL_NO_DEPEND = 1 FREEBL_LOWHASH = 1 endif endif +endif USE_SYSTEM_ZLIB = 1 ZLIB_LIBS = -lz diff --git a/security/coreconf/arch.mk b/security/coreconf/arch.mk index 718fb64df..6557348b2 100644 --- a/security/coreconf/arch.mk +++ b/security/coreconf/arch.mk @@ -249,6 +249,17 @@ ifeq (MINGW32_NT,$(findstring MINGW32_NT,$(OS_ARCH))) endif endif +ifeq ($(OS_TARGET),Android) +# +# this should be configurable from the user +# + OS_TEST := arm + OS_ARCH = Android + ifndef OS_TARGET_RELEASE + OS_TARGET_RELEASE := 8 + endif +endif + ifndef OS_TARGET OS_TARGET = $(OS_ARCH) endif diff --git a/security/coreconf/config.mk b/security/coreconf/config.mk index 93a11d7c5..7694d3db3 100644 --- a/security/coreconf/config.mk +++ b/security/coreconf/config.mk @@ -31,7 +31,7 @@ endif ####################################################################### TARGET_OSES = FreeBSD BSD_OS NetBSD OpenUNIX OS2 QNX Darwin BeOS OpenBSD \ - AIX RISCOS WINNT WIN95 Linux + AIX RISCOS WINNT WIN95 Linux Android ifeq (,$(filter-out $(TARGET_OSES),$(OS_TARGET))) include $(CORE_DEPTH)/coreconf/$(OS_TARGET).mk |