commit
c975c27495
|
@ -42,7 +42,7 @@ endif
|
||||||
|
|
||||||
# os=Default is meant to be generic unix/linux
|
# os=Default is meant to be generic unix/linux
|
||||||
|
|
||||||
known_os_archs := Linux-x86 Linux-x86_64 Linux-arm Linux-armhf Linux-ppc Linux-ppc64 Linux-s390 Linux-s390x Mac-x86 Mac-x86_64 FreeBSD-x86_64 Windows-x86 Windows-x86_64 SunOS-x86 SunOS-sparc SunOS-x86_64 AIX-ppc AIX-ppc64
|
known_os_archs := Linux-x86 Linux-x86_64 Linux-arm Linux-armhf Linux-aarch64 Linux-ppc Linux-ppc64 Linux-s390 Linux-s390x Mac-x86 Mac-x86_64 FreeBSD-x86_64 Windows-x86 Windows-x86_64 SunOS-x86 SunOS-sparc SunOS-x86_64 AIX-ppc AIX-ppc64
|
||||||
os_arch := $(OS_NAME)-$(OS_ARCH)
|
os_arch := $(OS_NAME)-$(OS_ARCH)
|
||||||
IBM_JDK_7 := $(findstring IBM, $(shell $(JAVA) -version 2>&1 | grep IBM | grep "JRE 1.7"))
|
IBM_JDK_7 := $(findstring IBM, $(shell $(JAVA) -version 2>&1 | grep IBM | grep "JRE 1.7"))
|
||||||
|
|
||||||
|
@ -200,6 +200,13 @@ Linux-armhf_LINKFLAGS := -shared -static-libgcc
|
||||||
Linux-armhf_LIBNAME := libsnappyjava.so
|
Linux-armhf_LIBNAME := libsnappyjava.so
|
||||||
Linux-armhf_SNAPPY_FLAGS:=
|
Linux-armhf_SNAPPY_FLAGS:=
|
||||||
|
|
||||||
|
Linux-aarch64_CXX := $(CROSS_PREFIX)g++
|
||||||
|
Linux-aarch64_STRIP := $(CROSS_PREFIX)strip
|
||||||
|
Linux-aarch64_CXXFLAGS := -include lib/inc_linux/jni_md.h -I$(JAVA_HOME)/include -O2 -fPIC -fvisibility=hidden
|
||||||
|
Linux-aarch64_LINKFLAGS := -shared -static-libgcc
|
||||||
|
Linux-aarch64_LIBNAME := libsnappyjava.so
|
||||||
|
Linux-aarch64_SNAPPY_FLAGS:=
|
||||||
|
|
||||||
Mac-x86_CXX := g++ -arch i386
|
Mac-x86_CXX := g++ -arch i386
|
||||||
Mac-x86_STRIP := strip -x
|
Mac-x86_STRIP := strip -x
|
||||||
Mac-x86_CXXFLAGS := -Ilib/inc_mac -I$(JAVA_HOME)/include -O2 -fPIC -mmacosx-version-min=10.4 -fvisibility=hidden
|
Mac-x86_CXXFLAGS := -Ilib/inc_mac -I$(JAVA_HOME)/include -O2 -fPIC -mmacosx-version-min=10.4 -fvisibility=hidden
|
||||||
|
|
|
@ -146,7 +146,7 @@ Older snapshots of snappy contain a buggy config.h.in that does not work properl
|
||||||
## Cross-compiling for other platforms
|
## Cross-compiling for other platforms
|
||||||
The Makefile contains rules for cross-compiling the native library for other platforms so that the snappy-java JAR can support multiple platforms. For example, to build the native libraries for x86 Linux, x86 and x86-64 Windows, and soft- and hard-float ARM:
|
The Makefile contains rules for cross-compiling the native library for other platforms so that the snappy-java JAR can support multiple platforms. For example, to build the native libraries for x86 Linux, x86 and x86-64 Windows, and soft- and hard-float ARM:
|
||||||
|
|
||||||
$ make linux32 win32 win64 linux-arm linux-armhf
|
$ make linux32 win32 win64 linux-arm linux-armhf linux-aarch64
|
||||||
|
|
||||||
If you append `snappy` to the line above, it will also build the native library for the current platform and then build the snappy-java JAR (containing all native libraries built so far).
|
If you append `snappy` to the line above, it will also build the native library for the current platform and then build the snappy-java JAR (containing all native libraries built so far).
|
||||||
|
|
||||||
|
@ -157,6 +157,7 @@ Of course, you must first have the necessary cross-compilers and development lib
|
||||||
* win64: `sudo apt-get install g++-mingw-w64-x86-64`
|
* win64: `sudo apt-get install g++-mingw-w64-x86-64`
|
||||||
* arm: `sudo apt-get install g++-arm-linux-gnueabi`
|
* arm: `sudo apt-get install g++-arm-linux-gnueabi`
|
||||||
* armhf: `sudo apt-get install g++-arm-linux-gnueabihf`
|
* armhf: `sudo apt-get install g++-arm-linux-gnueabihf`
|
||||||
|
* aarch64: `sudo apt-get install g++-aarch64-linux`
|
||||||
|
|
||||||
Unfortunately, cross-compiling for Mac OS X is not currently possible; you must compile within OS X.
|
Unfortunately, cross-compiling for Mac OS X is not currently possible; you must compile within OS X.
|
||||||
|
|
||||||
|
|
|
@ -45,6 +45,7 @@ public class OSInfo
|
||||||
public static final String PPC64 = "ppc64";
|
public static final String PPC64 = "ppc64";
|
||||||
public static final String IBMZ = "s390";
|
public static final String IBMZ = "s390";
|
||||||
public static final String IBMZ_64 = "s390x";
|
public static final String IBMZ_64 = "s390x";
|
||||||
|
public static final String AARCH_64 = "aarch64";
|
||||||
|
|
||||||
static {
|
static {
|
||||||
// x86 mappings
|
// x86 mappings
|
||||||
|
@ -88,6 +89,9 @@ public class OSInfo
|
||||||
|
|
||||||
// IBM z 64-bit mappings
|
// IBM z 64-bit mappings
|
||||||
archMapping.put(IBMZ_64, IBMZ_64);
|
archMapping.put(IBMZ_64, IBMZ_64);
|
||||||
|
|
||||||
|
// Aarch64 mappings
|
||||||
|
archMapping.put(AARCH_64, AARCH_64);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args)
|
public static void main(String[] args)
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue