Skip to content

Commit

Permalink
Merge pull request NeuronRobotics#218 from siepkes/freebsd-aarch64
Browse files Browse the repository at this point in the history
Added FreeBSD arm64 (AArch64) support.
  • Loading branch information
MrDOS authored Jun 16, 2021
2 parents 5d48a20 + d5577ad commit 7aa21d1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/main/c/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,13 @@ freebsd64: export platform := freebsd/x86_64
freebsd64:
$(MAKE) -f natives.mk

# Requires a FreeBSD host running on aarch64 (arm64) architecture.
freebsdarm64v8: export CFLAGS += -I$(JAVA_HOME)/include/freebsd
freebsdarm64v8: export platform := freebsd/ARM_64
freebsdarm64v8: export variant := v8
freebsdarm64v8:
$(MAKE) -f natives.mk

windows: windows32 windows64
# Don't embed the build timestamp into DLLs so the output is the same from one
# compile to the next for the same input source.
Expand Down
Binary file not shown.
4 changes: 3 additions & 1 deletion src/main/java/gnu/io/NativeResource.java
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,9 @@ private InputStream locateResource(String name) {
}
}
}else if(OSUtil.isFreeBSD()) {
if(OSUtil.is64Bit()) {
if(OSUtil.isARM() && OSUtil.is64Bit()) {
file="/native/freebsd/ARM_64/" + name;
}else if(OSUtil.is64Bit()) {
file="/native/freebsd/x86_64/" + name;
}else {
file="/native/freebsd/x86_32/" + name;
Expand Down

0 comments on commit 7aa21d1

Please sign in to comment.