mirror of
https://github.com/corda/corda.git
synced 2025-01-06 05:04:20 +00:00
Android toolchain
This commit is contained in:
parent
3a42db9f6f
commit
b1990ba55f
37
makefile
37
makefile
@ -357,13 +357,34 @@ ifeq ($(platform),android)
|
|||||||
asm = arm
|
asm = arm
|
||||||
pointer-size = 4
|
pointer-size = 4
|
||||||
no-psabi = -Wno-psabi
|
no-psabi = -Wno-psabi
|
||||||
toolchain = $(ANDROID_NDK)/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86/
|
use-lto = false
|
||||||
cflags = -std=gnu++0x -I$(ANDROID_NDK)/platforms/android-5/arch-arm/usr/include \
|
ifeq ($(build-platform),cygwin)
|
||||||
-I$(toolchain)/lib/gcc/arm-linux-androideabi/4.7/include $(common-cflags)
|
ndk = "$$(cygpath -u "$(ANDROID_NDK)")"
|
||||||
cflags += -marm $(no-psabi)
|
else
|
||||||
|
ndk = $(ANDROID_NDK)
|
||||||
|
endif
|
||||||
|
|
||||||
cxx = $(toolchain)/bin/arm-linux-androideabi-g++
|
build-cflags = $(common-cflags) -I$(src)
|
||||||
cc = $(toolchain)/bin/arm-linux-androideabi-gcc
|
ifeq ($(subst cygwin,windows,$(subst mingw32,windows,$(build-platform))),windows)
|
||||||
|
toolchain-host-platform = $(subst cygwin,windows,$(subst mingw32,windows,$(build-platform)))
|
||||||
|
build-system = windows
|
||||||
|
build-cxx = i686-w64-mingw32-g++
|
||||||
|
build-cc = i686-w64-mingw32-gcc
|
||||||
|
build-lflags = -lz -lpthread
|
||||||
|
sysroot = "$$(cygpath -w "$(ndk)/platforms/android-5/arch-arm")"
|
||||||
|
build-cflags += "-I$(JAVA_HOME)/include/win32"
|
||||||
|
else
|
||||||
|
toolchain-host-platform = $(subst cygwin,windows,$(subst mingw32,windows,$(build-platform)))-$(build-arch)
|
||||||
|
sysroot = $(ndk)/platforms/android-5/arch-arm
|
||||||
|
build-cflags += "-I$(JAVA_HOME)/include/linux"
|
||||||
|
endif
|
||||||
|
toolchain = $(ndk)/toolchains/arm-linux-androideabi-4.7/prebuilt/$(toolchain-host-platform)
|
||||||
|
cflags = "-I$(sysroot)/usr/include" "-I$(JAVA_HOME)/include/linux" $(common-cflags) "-I$(src)" -std=c++11 -marm $(no-psabi)
|
||||||
|
lflags = $(common-lflags) -ldl
|
||||||
|
use-lto = false
|
||||||
|
|
||||||
|
cxx = $(toolchain)/bin/arm-linux-androideabi-g++ --sysroot="$(sysroot)"
|
||||||
|
cc = $(toolchain)/bin/arm-linux-androideabi-gcc --sysroot="$(sysroot)"
|
||||||
ar = $(toolchain)/bin/arm-linux-androideabi-ar
|
ar = $(toolchain)/bin/arm-linux-androideabi-ar
|
||||||
ranlib = $(toolchain)/bin/arm-linux-androideabi-ranlib
|
ranlib = $(toolchain)/bin/arm-linux-androideabi-ranlib
|
||||||
strip = $(toolchain)/bin/arm-linux-androideabi-strip
|
strip = $(toolchain)/bin/arm-linux-androideabi-strip
|
||||||
@ -540,16 +561,20 @@ ifeq ($(mode),fast)
|
|||||||
else
|
else
|
||||||
optimization-cflags = -O3 -g3 -DNDEBUG
|
optimization-cflags = -O3 -g3 -DNDEBUG
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(use-lto),)
|
||||||
use-lto = true
|
use-lto = true
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
ifeq ($(mode),small)
|
ifeq ($(mode),small)
|
||||||
ifeq ($(use-clang),true)
|
ifeq ($(use-clang),true)
|
||||||
optimization-cflags = -Oz -g3 -DNDEBUG
|
optimization-cflags = -Oz -g3 -DNDEBUG
|
||||||
else
|
else
|
||||||
optimization-cflags = -Os -g3 -DNDEBUG
|
optimization-cflags = -Os -g3 -DNDEBUG
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(use-lto),)
|
||||||
use-lto = true
|
use-lto = true
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(use-lto),true)
|
ifeq ($(use-lto),true)
|
||||||
ifeq ($(use-clang),true)
|
ifeq ($(use-clang),true)
|
||||||
|
@ -98,6 +98,10 @@ loadMemoryBarrier()
|
|||||||
memoryBarrier();
|
memoryBarrier();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(__ANDROID__)
|
||||||
|
// http://code.google.com/p/android/issues/detail?id=1803
|
||||||
|
extern "C" void __clear_cache (void *beg __attribute__((__unused__)), void *end __attribute__((__unused__)));
|
||||||
|
#endif
|
||||||
inline void
|
inline void
|
||||||
syncInstructionCache(const void* start, unsigned size)
|
syncInstructionCache(const void* start, unsigned size)
|
||||||
{
|
{
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
# include "CoreFoundation/CoreFoundation.h"
|
# include "CoreFoundation/CoreFoundation.h"
|
||||||
# include "sys/ucontext.h"
|
# include "sys/ucontext.h"
|
||||||
# undef assert
|
# undef assert
|
||||||
#elif defined __ANDROID__
|
#elif defined(__ANDROID__)
|
||||||
# include <asm/sigcontext.h> /* for sigcontext */
|
# include <asm/sigcontext.h> /* for sigcontext */
|
||||||
# include <asm/signal.h> /* for stack_t */
|
# include <asm/signal.h> /* for stack_t */
|
||||||
typedef struct ucontext {
|
typedef struct ucontext {
|
||||||
|
Loading…
Reference in New Issue
Block a user