aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGöthel Software <[email protected]>2023-05-24 14:00:11 +0200
committerGitHub <[email protected]>2023-05-24 14:00:11 +0200
commit0cc17dbd7b9c2e88a3d55dff98867d46fb1e104f (patch)
treeeeaa68b735d5772eff776aaa680b7c9bc4740f80
parent6a74d16a805a4204093972bb91361b2aa633065c (diff)
parent953f594a00094362e0ed56553b16aecbee2b92f2 (diff)
Merge pull request #34 from andreas-schwab/master
Add support for riscv64 architecture
-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 44dfed5..a4afadb 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 8410ec9..746f9cc 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
@@ -454,6 +457,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}" />
@@ -677,6 +689,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>
@@ -705,7 +721,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" />
@@ -850,6 +866,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}" />
@@ -1400,6 +1417,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>
@@ -1714,6 +1734,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" />
@@ -1747,7 +1778,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>