aboutsummaryrefslogtreecommitdiffstats
path: root/make
diff options
context:
space:
mode:
authorAndreas Schwab <[email protected]>2022-02-06 22:17:18 +0100
committerAndreas Schwab <[email protected]>2022-02-06 22:17:18 +0100
commit953f594a00094362e0ed56553b16aecbee2b92f2 (patch)
tree8227d868df787ff44dd4fb34250457ccbcfcbd3a /make
parent0b441cfc14947b1c8cabdc87705ae95a0afec4d9 (diff)
Add support for riscv64 architecture
Diffstat (limited to 'make')
-rw-r--r--make/build.xml8
-rwxr-xr-xmake/gluegen-cpptasks-base.xml35
2 files changed, 40 insertions, 3 deletions
diff --git a/make/build.xml b/make/build.xml
index 396cc75..8cd6ea1 100644
--- a/make/build.xml
+++ b/make/build.xml
@@ -338,6 +338,12 @@
<property name="linker.cfg.id" value="linker.cfg.linux.ppc64le" />
</target>
+ <target name="declare.linux.riscv64" if="isLinuxRiscV64">
+ <echo message="Linux.riscv64" />
+ <property name="compiler.cfg.id" value="compiler.cfg.linux" />
+ <property name="linker.cfg.id" value="linker.cfg.linux.riscv64" />
+ </target>
+
<target name="declare.linux.s390" if="isLinuxs390">
<echo message="Linux.s390" />
<property name="compiler.cfg.id" value="compiler.cfg.linux" />
@@ -356,7 +362,7 @@
<property name="linker.cfg.id" value="linker.cfg.linux.sparc" />
</target>
- <target name="declare.linux" depends="declare.linux.x86,declare.linux.amd64,declare.linux.ia64,declare.linux.hppa,declare.linux.mips,declare.linux.mipsel,declare.linux.ppc,declare.linux.ppc64,declare.linux.ppc64le,declare.linux.s390,declare.linux.s390x,declare.linux.sparc,declare.linux.armv6,declare.linux.aarch64" if="isLinux" >
+ <target name="declare.linux" depends="declare.linux.x86,declare.linux.amd64,declare.linux.ia64,declare.linux.hppa,declare.linux.mips,declare.linux.mipsel,declare.linux.ppc,declare.linux.ppc64,declare.linux.ppc64le,declare.linux.riscv64,declare.linux.s390,declare.linux.s390x,declare.linux.sparc,declare.linux.armv6,declare.linux.aarch64" if="isLinux" >
<property name="c.src.dir.os" value="unix" />
</target>
diff --git a/make/gluegen-cpptasks-base.xml b/make/gluegen-cpptasks-base.xml
index 414a4de..30cadf3 100755
--- a/make/gluegen-cpptasks-base.xml
+++ b/make/gluegen-cpptasks-base.xml
@@ -51,6 +51,7 @@
- isLinuxPpc
- isLinuxPpc64
- isLinuxPpc64le
+ - isLinuxRiscV64
- isLinuxs390
- isLinuxs390x
- isLinuxSparc
@@ -147,6 +148,7 @@
- compiler.cfg.linux.ppc
- compiler.cfg.linux.ppc64
- compiler.cfg.linux.ppc64le
+ - compiler.cfg.linux.riscv64
- compiler.cfg.linux.s390
- compiler.cfg.linux.s390x
- compiler.cfg.linux.sparc
@@ -172,6 +174,7 @@
- linker.cfg.linux.mipsel
- linker.cfg.linux.ppc
- linker.cfg.linux.ppc64le
+ - linker.cfg.linux.riscv64
- linker.cfg.linux.s390
- linker.cfg.linux.s390x
- linker.cfg.linux.sparc
@@ -464,6 +467,15 @@
<condition property="ppc64le">
<os arch="ppc64le" />
</condition>
+ <condition property="isLinuxRiscV64">
+ <and>
+ <istrue value="${isLinux}" />
+ <os arch="riscv64" />
+ </and>
+ </condition>
+ <condition property="riscv64">
+ <os arch="riscv64" />
+ </condition>
<condition property="isLinuxs390">
<and>
<istrue value="${isLinux}" />
@@ -687,6 +699,10 @@
<property name="os.and.arch" value="linux-ppc64le" />
</target>
+ <target name="gluegen.cpptasks.detect.os.linux.riscv64" unless="gluegen.cpptasks.detected.os.2" if="isLinuxRiscV64">
+ <property name="os.and.arch" value="linux-riscv64" />
+ </target>
+
<target name="gluegen.cpptasks.detect.os.linux.s390" unless="gluegen.cpptasks.detected.os.2" if="isLinuxs390">
<property name="os.and.arch" value="linux-s390" />
</target>
@@ -715,7 +731,7 @@
<property name="os.and.arch" value="android-x86" />
</target>
- <target name="gluegen.cpptasks.detect.os.linux" depends="gluegen.cpptasks.detect.os.linux.amd64,gluegen.cpptasks.detect.os.linux.ia64,gluegen.cpptasks.detect.os.linux.x86,gluegen.cpptasks.detect.os.linux.armv6.armel,gluegen.cpptasks.detect.os.linux.armv6.armhf,gluegen.cpptasks.detect.os.android.armv6.armel,gluegen.cpptasks.detect.os.linux.aarch64,gluegen.cpptasks.detect.os.android.armv6.armhf,gluegen.cpptasks.detect.os.android.aarch64,gluegen.cpptasks.detect.os.android.x86,gluegen.cpptasks.detect.os.linux.alpha,gluegen.cpptasks.detect.os.linux.hppa,gluegen.cpptasks.detect.os.linux.mips,gluegen.cpptasks.detect.os.linux.mipsel,gluegen.cpptasks.detect.os.linux.ppc,gluegen.cpptasks.detect.os.linux.ppc64,gluegen.cpptasks.detect.os.linux.ppc64le,gluegen.cpptasks.detect.os.linux.s390,gluegen.cpptasks.detect.os.linux.s390x,gluegen.cpptasks.detect.os.linux.sparc" unless="gluegen.cpptasks.detected.os.2" />
+ <target name="gluegen.cpptasks.detect.os.linux" depends="gluegen.cpptasks.detect.os.linux.amd64,gluegen.cpptasks.detect.os.linux.ia64,gluegen.cpptasks.detect.os.linux.x86,gluegen.cpptasks.detect.os.linux.armv6.armel,gluegen.cpptasks.detect.os.linux.armv6.armhf,gluegen.cpptasks.detect.os.android.armv6.armel,gluegen.cpptasks.detect.os.linux.aarch64,gluegen.cpptasks.detect.os.android.armv6.armhf,gluegen.cpptasks.detect.os.android.aarch64,gluegen.cpptasks.detect.os.android.x86,gluegen.cpptasks.detect.os.linux.alpha,gluegen.cpptasks.detect.os.linux.hppa,gluegen.cpptasks.detect.os.linux.mips,gluegen.cpptasks.detect.os.linux.mipsel,gluegen.cpptasks.detect.os.linux.ppc,gluegen.cpptasks.detect.os.linux.ppc64,gluegen.cpptasks.detect.os.linux.ppc64le,gluegen.cpptasks.detect.os.linux.riscv64,gluegen.cpptasks.detect.os.linux.s390,gluegen.cpptasks.detect.os.linux.s390x,gluegen.cpptasks.detect.os.linux.sparc" unless="gluegen.cpptasks.detected.os.2" />
<target name="gluegen.cpptasks.detect.os.osx" unless="gluegen.cpptasks.detected.os.2" if="isOSX">
<property name="native.library.prefix" value="lib" />
@@ -859,6 +875,7 @@
<echo message="LinuxPpc=${isLinuxPpc}" />
<echo message="LinuxPpc64=${isLinuxPpc64}" />
<echo message="LinuxPpc64le=${isLinuxPpc64le}" />
+ <echo message="LinuxRiscV64=${isLinuxRiscV64}" />
<echo message="Linuxs390=${isLinuxs390}" />
<echo message="Linuxs390x=${isLinuxs390x}" />
<echo message="LinuxSparc=${isLinuxSparc}" />
@@ -1410,6 +1427,9 @@
<linker id="linker.cfg.linux.ppc64le" name="${gcc.compat.compiler}">
</linker>
+ <linker id="linker.cfg.linux.riscv64" name="${gcc.compat.compiler}">
+ </linker>
+
<linker id="linker.cfg.linux.s390" name="${gcc.compat.compiler}">
</linker>
@@ -1726,6 +1746,17 @@
<property name="java.lib.dir.platform" value="${java.home.dir}/lib"/> <!-- new default -->
</target>
+ <target name="gluegen.cpptasks.declare.compiler.linux.riscv64" if="isLinuxRiscV64">
+ <echo message="Linux.RiscV64" />
+ <property name="compiler.cfg.id.base" value="compiler.cfg.linux" />
+ <property name="linker.cfg.id.base" value="linker.cfg.linux" />
+ <available property="java.lib.dir.platform" value="${java.home.dir}/jre/lib/riscv64"
+ file="${java.home.dir}/jre/lib/riscv64/libjava.so"/>
+ <available property="java.lib.dir.platform" value="${java.home.dir}/lib/riscv64"
+ file="${java.home.dir}/lib/riscv64/libjava.so"/>
+ <property name="java.lib.dir.platform" value="${java.home.dir}/lib"/> <!-- new default -->
+ </target>
+
<target name="gluegen.cpptasks.declare.compiler.linux.s390" if="isLinuxs390">
<echo message="Linux.s390" />
<property name="compiler.cfg.id.base" value="compiler.cfg.linux" />
@@ -1759,7 +1790,7 @@
<property name="java.lib.dir.platform" value="${java.home.dir}/lib"/> <!-- new default -->
</target>
- <target name="gluegen.cpptasks.declare.compiler.linux" depends="gluegen.cpptasks.declare.compiler.linux.x86,gluegen.cpptasks.declare.compiler.linux.amd64,gluegen.cpptasks.declare.compiler.linux.ia64,gluegen.cpptasks.declare.compiler.linux.armv6,gluegen.cpptasks.declare.compiler.linux.aarch64,gluegen.cpptasks.declare.compiler.linux.alpha,gluegen.cpptasks.declare.compiler.linux.hppa,gluegen.cpptasks.declare.compiler.linux.mips,gluegen.cpptasks.declare.compiler.linux.mipsel,gluegen.cpptasks.declare.compiler.linux.ppc,gluegen.cpptasks.declare.compiler.linux.ppc64,gluegen.cpptasks.declare.compiler.linux.ppc64le,gluegen.cpptasks.declare.compiler.linux.s390,gluegen.cpptasks.declare.compiler.linux.s390x,gluegen.cpptasks.declare.compiler.linux.sparc" if="isLinux">
+ <target name="gluegen.cpptasks.declare.compiler.linux" depends="gluegen.cpptasks.declare.compiler.linux.x86,gluegen.cpptasks.declare.compiler.linux.amd64,gluegen.cpptasks.declare.compiler.linux.ia64,gluegen.cpptasks.declare.compiler.linux.armv6,gluegen.cpptasks.declare.compiler.linux.aarch64,gluegen.cpptasks.declare.compiler.linux.alpha,gluegen.cpptasks.declare.compiler.linux.hppa,gluegen.cpptasks.declare.compiler.linux.mips,gluegen.cpptasks.declare.compiler.linux.mipsel,gluegen.cpptasks.declare.compiler.linux.ppc,gluegen.cpptasks.declare.compiler.linux.ppc64,gluegen.cpptasks.declare.compiler.linux.ppc64le,gluegen.cpptasks.declare.compiler.linux.riscv64,gluegen.cpptasks.declare.compiler.linux.s390,gluegen.cpptasks.declare.compiler.linux.s390x,gluegen.cpptasks.declare.compiler.linux.sparc" if="isLinux">
<property name="java.includes.dir.platform" value="${java.includes.dir}/x11" />
</target>