diff --git a/GPL/DemanglerGnu/build.gradle b/GPL/DemanglerGnu/build.gradle
index 255fd56a5c..174747549f 100644
--- a/GPL/DemanglerGnu/build.gradle
+++ b/GPL/DemanglerGnu/build.gradle
@@ -81,6 +81,7 @@ model {
targetPlatform "linux_arm_64"
targetPlatform "mac_x86_64"
targetPlatform "mac_arm_64"
+ targetPlatform "freebsd_x86_64"
sources {
c {
source {
@@ -102,6 +103,7 @@ model {
targetPlatform "linux_arm_64"
targetPlatform "mac_x86_64"
targetPlatform "mac_arm_64"
+ targetPlatform "freebsd_x86_64"
sources {
c {
source {
diff --git a/GPL/nativeBuildProperties.gradle b/GPL/nativeBuildProperties.gradle
index 5e9c33f4eb..6ba0409b6a 100644
--- a/GPL/nativeBuildProperties.gradle
+++ b/GPL/nativeBuildProperties.gradle
@@ -52,6 +52,11 @@ model {
}
}
}
+ if (isCurrentFreeBSD()) {
+ gcc(Gcc) {
+ target("freebsd_x86_64")
+ }
+ }
if (isCurrentWindows() && VISUAL_STUDIO_INSTALL_DIR) {
// specify installDir because Gradle doesn't find VS Build Tools.
// See https://github.com/gradle/gradle-native/issues/617#issuecomment-575735288
diff --git a/GPL/nativePlatforms.gradle b/GPL/nativePlatforms.gradle
index a75cf48a5d..24d540f10a 100644
--- a/GPL/nativePlatforms.gradle
+++ b/GPL/nativePlatforms.gradle
@@ -24,7 +24,8 @@ project.ext.PLATFORMS = [
[name: "linux_x86_64", os: "linux", arch: "x86_64"],
[name: "linux_arm_64", os: "linux", arch: "arm64"],
[name: "mac_x86_64", os: "osx", arch: "x86_64"],
- [name: "mac_arm_64", os: "osx", arch: "arm64"]
+ [name: "mac_arm_64", os: "osx", arch: "arm64"],
+ [name: "freebsd_x86_64", os: "freebsd", arch: "x86_64"]
]
/*********************************************************************************
@@ -51,6 +52,9 @@ ext.getCurrentPlatformName = {
case ~/Mac OS X.*/:
os = "mac"
break
+ case ~/FreeBSD.*/:
+ os = "freebsd"
+ break
default:
throw new GradleException("Unrecognized platform operating system: $os")
}
@@ -112,6 +116,20 @@ ext.isCurrentMac = {
return isMac(getCurrentPlatformName())
}
+/*********************************************************************************
+ * Returns true if the given platform is FreeBSD.
+ *********************************************************************************/
+ext.isFreeBSD = { platform_name ->
+ return platform_name.startsWith("freebsd")
+}
+
+/*********************************************************************************
+ * Returns true if the current platform is FreeBSD.
+ *********************************************************************************/
+ext.isCurrentFreeBSD = {
+ return isFreeBSD(getCurrentPlatformName())
+}
+
/*********************************************************************************
* Returns true if the given platform is Windows.
*********************************************************************************/
diff --git a/Ghidra/Features/Decompiler/buildNatives.gradle b/Ghidra/Features/Decompiler/buildNatives.gradle
index 9cf660e915..25a90a11e9 100644
--- a/Ghidra/Features/Decompiler/buildNatives.gradle
+++ b/Ghidra/Features/Decompiler/buildNatives.gradle
@@ -43,6 +43,7 @@ model {
targetPlatform "linux_arm_64"
targetPlatform "mac_x86_64"
targetPlatform "mac_arm_64"
+ targetPlatform "freebsd_x86_64"
sources {
cpp {
// NOTE: The bison/flex generated files are assumed to be up-to-date.
@@ -148,6 +149,7 @@ model {
targetPlatform "linux_arm_64"
targetPlatform "mac_x86_64"
targetPlatform "mac_arm_64"
+ targetPlatform "freebsd_x86_64"
sources {
cpp {
// NOTE: The bison/flex generated files are assumed to be up-to-date.
diff --git a/Ghidra/Framework/Generic/src/main/java/ghidra/framework/Platform.java b/Ghidra/Framework/Generic/src/main/java/ghidra/framework/Platform.java
index 562ca606af..68f5d476fb 100644
--- a/Ghidra/Framework/Generic/src/main/java/ghidra/framework/Platform.java
+++ b/Ghidra/Framework/Generic/src/main/java/ghidra/framework/Platform.java
@@ -65,6 +65,11 @@ public enum Platform {
*/
MAC_ARM_64(OperatingSystem.MAC_OS_X, Architecture.ARM_64, "mac_arm_64", ".dylib", ""),
+ /**
+ * Identifies a FreeBSD x86 64-bit OS.
+ */
+ FREEBSD_X86_64(OperatingSystem.FREE_BSD, Architecture.X86_64, "freebsd_x86_64", ".so", ""),
+
/**
* Identifies an unsupported OS.
*/
@@ -199,7 +204,8 @@ public enum Platform {
*/
public List
-The installation information provided is effective as of Ghidra 10.2 and is subject to change with
+The installation information provided is effective as of Ghidra 11.1 and is subject to change with
future releases.
Ghidra Installation Guide
Ghidra supports running on the following additional platforms with user-built native binaries:
In order to build native binaries for your platform, you will need the following installed on your system: