Skip to content

Commit

Permalink
Build for loongarch64-Linux
Browse files Browse the repository at this point in the history
We currently use openEuler-24.03-LTS for release builds.

Also see commit 3d4553e for a
workaround necessary at the C language level.

#161
  • Loading branch information
kohlschuetter committed Sep 5, 2024
1 parent 3d4553e commit 54576d6
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 0 deletions.
9 changes: 9 additions & 0 deletions junixsocket-native-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,15 @@
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.kohlschutter.junixsocket</groupId>
<artifactId>junixsocket-native</artifactId>
<version>${project.version}</version>
<type>nar</type>
<classifier>loongarch64-Linux-clang-llvm-jni</classifier>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.kohlschutter.junixsocket</groupId>
<artifactId>junixsocket-native</artifactId>
Expand Down
50 changes: 50 additions & 0 deletions junixsocket-native-cross/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -791,6 +791,40 @@
</properties>
</configuration>
</execution>
<execution>
<id>crosscompile-loongarch64-Linux-clang</id>
<goals>
<goal>run</goal>
</goals>
<configuration>
<skipInvocation>${junixsocket.cross.disabled}</skipInvocation>
<noLog>true</noLog>
<streamLogs>true</streamLogs>
<goals>
<goal>clean</goal>
<goal>install</goal>
</goals>
<projectsDirectory>${project.basedir}/../</projectsDirectory>
<pomIncludes>
<pomInclude>junixsocket-native</pomInclude>
</pomIncludes>
<profiles>
<profile>llvm</profile>
</profiles>
<properties>
<junixsocket.native.aol.llvm>loongarch64-Linux-clang</junixsocket.native.aol.llvm>
<junixsocket.install.skip>true</junixsocket.install.skip>
<junixsocket.build.directory>${project.build.directory}/junixsocket-native-loongarch64-Linux-clang-llvm</junixsocket.build.directory>
<junixsocket.native.llvm.target>loongarch64-openEuler-linux</junixsocket.native.llvm.target>
<junixsocket.native.jnilib.extension>so</junixsocket.native.jnilib.extension>
<junixsocket.common.classifier.linux.s390x>loongarch64-Linux-clang-llvm-jni</junixsocket.common.classifier.linux.s390x>
<ignorant>${ignorant}</ignorant>
<gpgkeyname>${gpgkeyname}</gpgkeyname>
<gpg.executable>${gpg.executable}</gpg.executable>
<retrolambda>${retrolambda}</retrolambda>
</properties>
</configuration>
</execution>
<execution>
<id>crosscompile-riscv64-Linux-clang</id>
<goals>
Expand Down Expand Up @@ -1202,6 +1236,22 @@
<generatePom>false</generatePom>
</configuration>
</execution>
<execution>
<id>install-loongarch64-Linux-clang</id>
<phase>${junixsocket.cross.install-phase}</phase>
<goals>
<goal>install-file</goal>
</goals>
<configuration>
<file>${project.build.directory}/junixsocket-native-loongarch64-Linux-clang-llvm/junixsocket-native-${project.version}-loongarch64-Linux-clang-jni.nar</file>
<groupId>${project.groupId}</groupId>
<artifactId>junixsocket-native</artifactId>
<version>${project.version}</version>
<packaging>nar</packaging>
<classifier>loongarch64-Linux-clang-llvm-jni</classifier>
<generatePom>false</generatePom>
</configuration>
</execution>
<execution>
<id>install-riscv64-Linux-clang</id>
<phase>${junixsocket.cross.install-phase}</phase>
Expand Down
22 changes: 22 additions & 0 deletions junixsocket-native/src/main/nar/aol.properties
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,28 @@ s390x.Linux.clang.cpp.options=${junixsocket.native.clang.cpp.options} -target ${
s390x.Linux.clang.cpp.includes=${junixsocket.native.default.cpp.includes}
s390x.Linux.clang.cpp.excludes=

loongarch64.Linux.clang.linker.name=clang
loongarch64.Linux.clang.linker.options=${junixsocket.native.default.linker.options} -Xcrossclang-with-and-without-lc -target ${junixsocket.native.llvm.target}
loongarch64.Linux.clang.c.compiler=clang
loongarch64.Linux.clang.c.defines=_GNU_SOURCE
loongarch64.Linux.clang.c.options=${junixsocket.native.clang.c.options} -Xcrossclang-with-and-without-lc -I${project.basedir}/src/main/c/jni -target ${junixsocket.native.llvm.target}
loongarch64.Linux.clang.c.includes=${junixsocket.native.default.c.includes}
loongarch64.Linux.clang.c.excludes=
loongarch64.Linux.clang.java.include=
loongarch64.Linux.clang.java.runtimeDirectory=IGNORED
loongarch64.Linux.clang.lib.prefix=lib
loongarch64.Linux.clang.shared.prefix=lib
loongarch64.Linux.clang.static.extension=a
loongarch64.Linux.clang.shared.extension=so
loongarch64.Linux.clang.plugin.extension=so
loongarch64.Linux.clang.jni.extension=so
loongarch64.Linux.clang.executable.extension=
loongarch64.Linux.clang.cpp.compiler=clang++
loongarch64.Linux.clang.cpp.defines=_GNU_SOURCE
loongarch64.Linux.clang.cpp.options=${junixsocket.native.clang.cpp.options} -target ${junixsocket.native.llvm.target}
loongarch64.Linux.clang.cpp.includes=${junixsocket.native.default.cpp.includes}
loongarch64.Linux.clang.cpp.excludes=

riscv64.Linux.clang.linker.name=clang
riscv64.Linux.clang.linker.options=${junixsocket.native.default.linker.options} -Xcrossclang-with-and-without-lc -target ${junixsocket.native.llvm.target} -Xcrossclang-llvm-name llvm
riscv64.Linux.clang.c.compiler=clang
Expand Down

0 comments on commit 54576d6

Please sign in to comment.