From a2a2b220325261794a6c627617e4806cf4d9168d Mon Sep 17 00:00:00 2001 From: weidongxing Date: Mon, 7 Nov 2016 21:58:32 -0800 Subject: [PATCH 1/3] Add support for Linux ARM64 (aarch64) --- leveldbjni-all/pom.xml | 7 ++ leveldbjni-linux64-aarch64/pom.xml | 113 ++++++++++++++++++ leveldbjni/src/main/native-package/configure | 6 + .../src/main/native-package/m4/libtool.m4 | 6 + pom.xml | 7 ++ 5 files changed, 139 insertions(+) create mode 100644 leveldbjni-linux64-aarch64/pom.xml diff --git a/leveldbjni-all/pom.xml b/leveldbjni-all/pom.xml index 517610a..7e3532f 100755 --- a/leveldbjni-all/pom.xml +++ b/leveldbjni-all/pom.xml @@ -108,6 +108,12 @@ 99-master-SNAPSHOT provided + + org.fusesource.leveldbjni + leveldbjni-linux64-aarch64 + 99-master-SNAPSHOT + provided + @@ -148,6 +154,7 @@ META-INF/native/sunos64/sparcv9/libleveldbjni.so;osname=SunOS;processor=sparcv9, META-INF/native/freebsd64/libleveldbjni.so;osname=FreeBSD;processor=x86-64, META-INF/native/linux64/ppc64le/libleveldbjni.so;osname=Linux;processor=ppc64le + META-INF/native/linux64/aarch64/libleveldbjni.so;osname=Linux;processor=aarch64 diff --git a/leveldbjni-linux64-aarch64/pom.xml b/leveldbjni-linux64-aarch64/pom.xml new file mode 100644 index 0000000..1b535b2 --- /dev/null +++ b/leveldbjni-linux64-aarch64/pom.xml @@ -0,0 +1,113 @@ + + + + + 4.0.0 + + org.fusesource.leveldbjni + leveldbjni-project + 99-master-SNAPSHOT + + + org.fusesource.leveldbjni + leveldbjni-linux64-aarch64 + 99-master-SNAPSHOT + + ${project.artifactId} + The leveldbjni linux 64 native libraries on aarch64 machines + + + + org.fusesource.leveldbjni + leveldbjni + 99-master-SNAPSHOT + + + + + ${basedir}/../leveldbjni/src/test/java + + + + org.apache.maven.plugins + maven-jar-plugin + 2.3.1 + + ${basedir}/target/generated-sources/hawtjni/lib + + + + org.fusesource.hawtjni + maven-hawtjni-plugin + ${hawtjni-version} + + + + build + + + + + linux64/aarch64 + leveldbjni + false + + org.fusesource.leveldbjni + leveldbjni + ${project.version} + native-src + zip + + + --with-leveldb=${env.LEVELDB_HOME} + --with-snappy=${env.SNAPPY_HOME} + CFLAGS=-m64 + CXXFLAGS=-m64 + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.4.3 + + true + once + -d64 -ea + false + ${project.build.directory} + + **/*Test.java + + + + + + + diff --git a/leveldbjni/src/main/native-package/configure b/leveldbjni/src/main/native-package/configure index 51cb267..3e035e1 100755 --- a/leveldbjni/src/main/native-package/configure +++ b/leveldbjni/src/main/native-package/configure @@ -6265,6 +6265,9 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) ppc64le-*linux*|powerpc64le-*linux*) LD="${LD-ld} -m elf32lppclinux" ;; + aarch64-*linux*) + LD="${LD-ld} -m aarch64linux32" + ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; @@ -6287,6 +6290,9 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) ppc64le-*linux*|powerpc64le-*linux*) LD="${LD-ld} -m elf64lppc" ;; + aarch64-*linux*) + LD="${LD-ld} -m aarch64linux" + ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; diff --git a/leveldbjni/src/main/native-package/m4/libtool.m4 b/leveldbjni/src/main/native-package/m4/libtool.m4 index 702c597..9bfe493 100644 --- a/leveldbjni/src/main/native-package/m4/libtool.m4 +++ b/leveldbjni/src/main/native-package/m4/libtool.m4 @@ -1332,6 +1332,9 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) ppc64le-*linux*|powerpc64le-*linux*) LD="${LD-ld} -m elf32lppclinux" ;; + aarch64-*linux*) + LD="${LD-ld} -m aarch64linux32" + ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; @@ -1354,6 +1357,9 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) ppc64le-*linux*|powerpc64le-*linux*) LD="${LD-ld} -m elf64lppc" ;; + aarch64-*linux*) + LD="${LD-ld} -m aarch64linux" + ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; diff --git a/pom.xml b/pom.xml index 7140521..b0f21ae 100755 --- a/pom.xml +++ b/pom.xml @@ -252,6 +252,7 @@ leveldbjni-sunos64-amd64 leveldbjni-sunos64-sparcv9 leveldbjni-linux64-ppc64le + leveldbjni-linux64-aarch64 leveldbjni-all @@ -330,6 +331,12 @@ leveldbjni-linux64-ppc64le + + linux64-aarch64 + + leveldbjni-linux64-aarch64 + + From 43f036b8694fae7bfe07fc293366f0e00454ab1f Mon Sep 17 00:00:00 2001 From: weidongxing Date: Tue, 8 Nov 2016 01:10:14 -0800 Subject: [PATCH 2/3] Add support for Linux ARM64 (aarch64) second --- leveldbjni-all/pom.xml | 4 ++++ leveldbjni/src/main/native-package/autotools/config.guess | 2 +- pom.xml | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/leveldbjni-all/pom.xml b/leveldbjni-all/pom.xml index 7e3532f..663e772 100755 --- a/leveldbjni-all/pom.xml +++ b/leveldbjni-all/pom.xml @@ -108,12 +108,14 @@ 99-master-SNAPSHOT provided + @@ -154,7 +156,9 @@ META-INF/native/sunos64/sparcv9/libleveldbjni.so;osname=SunOS;processor=sparcv9, META-INF/native/freebsd64/libleveldbjni.so;osname=FreeBSD;processor=x86-64, META-INF/native/linux64/ppc64le/libleveldbjni.so;osname=Linux;processor=ppc64le + diff --git a/leveldbjni/src/main/native-package/autotools/config.guess b/leveldbjni/src/main/native-package/autotools/config.guess index b79252d..03a1f09 100755 --- a/leveldbjni/src/main/native-package/autotools/config.guess +++ b/leveldbjni/src/main/native-package/autotools/config.guess @@ -884,7 +884,7 @@ EOF echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo ${UNAME_MACHINE}-linux-${LIBC} exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be diff --git a/pom.xml b/pom.xml index b0f21ae..04c8c54 100755 --- a/pom.xml +++ b/pom.xml @@ -252,7 +252,9 @@ leveldbjni-sunos64-amd64 leveldbjni-sunos64-sparcv9 leveldbjni-linux64-ppc64le + leveldbjni-all @@ -331,12 +333,14 @@ leveldbjni-linux64-ppc64le + From 4ac54aec61b46b47b5ec3dc76c6a09e0ef455800 Mon Sep 17 00:00:00 2001 From: weidongxing Date: Sun, 8 Jan 2017 21:48:31 -0500 Subject: [PATCH 3/3] Supported aarch64 --- leveldbjni-all/pom.xml | 4 ---- pom.xml | 4 ---- 2 files changed, 8 deletions(-) diff --git a/leveldbjni-all/pom.xml b/leveldbjni-all/pom.xml index 663e772..7e3532f 100755 --- a/leveldbjni-all/pom.xml +++ b/leveldbjni-all/pom.xml @@ -108,14 +108,12 @@ 99-master-SNAPSHOT provided - @@ -156,9 +154,7 @@ META-INF/native/sunos64/sparcv9/libleveldbjni.so;osname=SunOS;processor=sparcv9, META-INF/native/freebsd64/libleveldbjni.so;osname=FreeBSD;processor=x86-64, META-INF/native/linux64/ppc64le/libleveldbjni.so;osname=Linux;processor=ppc64le - diff --git a/pom.xml b/pom.xml index 04c8c54..b0f21ae 100755 --- a/pom.xml +++ b/pom.xml @@ -252,9 +252,7 @@ leveldbjni-sunos64-amd64 leveldbjni-sunos64-sparcv9 leveldbjni-linux64-ppc64le - leveldbjni-all @@ -333,14 +331,12 @@ leveldbjni-linux64-ppc64le -