mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-07-30 07:18:37 -09:00
Add OpenBSD support for x86_64 and arm_64.
This commit is contained in:
@@ -84,6 +84,8 @@ model {
|
||||
targetPlatform "mac_arm_64"
|
||||
targetPlatform "freebsd_x86_64"
|
||||
targetPlatform "freebsd_arm_64"
|
||||
targetPlatform "openbsd_x86_64"
|
||||
targetPlatform "openbsd_arm_64"
|
||||
sources {
|
||||
c {
|
||||
source {
|
||||
@@ -108,6 +110,8 @@ model {
|
||||
targetPlatform "mac_arm_64"
|
||||
targetPlatform "freebsd_x86_64"
|
||||
targetPlatform "freebsd_arm_64"
|
||||
targetPlatform "openbsd_x86_64"
|
||||
targetPlatform "openbsd_arm_64"
|
||||
sources {
|
||||
c {
|
||||
source {
|
||||
|
||||
@@ -49,6 +49,10 @@ model {
|
||||
gcc(Gcc).target(current)
|
||||
clang(Clang).target(current)
|
||||
}
|
||||
if (isOpenBSD(current)) {
|
||||
gcc(Gcc).target(current)
|
||||
clang(Clang).target(current)
|
||||
}
|
||||
if (isWindows(current) && VISUAL_STUDIO_INSTALL_DIR) {
|
||||
// https://github.com/gradle/gradle-native/issues/617#issuecomment-575735288
|
||||
visualCpp(VisualCpp) {
|
||||
|
||||
@@ -27,7 +27,9 @@ project.ext.PLATFORMS = [
|
||||
[name: "mac_x86_64", os: "osx", arch: "x86_64"],
|
||||
[name: "mac_arm_64", os: "osx", arch: "arm64"],
|
||||
[name: "freebsd_x86_64", os: "freebsd", arch: "x86_64"],
|
||||
[name: "freebsd_arm_64", os: "freebsd", arch: "arm64"]
|
||||
[name: "freebsd_arm_64", os: "freebsd", arch: "arm64"],
|
||||
[name: "openbsd_x86_64", os: "openbsd", arch: "x86_64"],
|
||||
[name: "openbsd_arm_64", os: "openbsd", arch: "arm64"]
|
||||
]
|
||||
|
||||
/*********************************************************************************
|
||||
@@ -57,6 +59,9 @@ ext.getCurrentPlatformName = {
|
||||
case ~/FreeBSD.*/:
|
||||
os = "freebsd"
|
||||
break
|
||||
case ~/OpenBSD.*/:
|
||||
os = "openbsd"
|
||||
break
|
||||
default:
|
||||
throw new GradleException("Unrecognized platform operating system: $os")
|
||||
}
|
||||
@@ -132,6 +137,20 @@ ext.isCurrentFreeBSD = {
|
||||
return isFreeBSD(getCurrentPlatformName())
|
||||
}
|
||||
|
||||
/*********************************************************************************
|
||||
* Returns true if the given platform is OpenBSD.
|
||||
*********************************************************************************/
|
||||
ext.isOpenBSD = { platform_name ->
|
||||
return platform_name.startsWith("openbsd")
|
||||
}
|
||||
|
||||
/*********************************************************************************
|
||||
* Returns true if the current platform is OpenBSD.
|
||||
*********************************************************************************/
|
||||
ext.isCurrentOpenBSD = {
|
||||
return isOpenBSD(getCurrentPlatformName())
|
||||
}
|
||||
|
||||
/*********************************************************************************
|
||||
* Returns true if the given platform is Windows.
|
||||
*********************************************************************************/
|
||||
|
||||
Reference in New Issue
Block a user