diff --git a/README.md b/README.md
index 03936fc02c..e01b3584dc 100644
--- a/README.md
+++ b/README.md
@@ -77,6 +77,7 @@ Pre-build binaries are generated with the following security / good coding pract
- macOS®
- Tizen™
- QNX® (Experimental)
+- FreeBSD® (Experimental)
@@ -164,3 +165,5 @@ Tizen is a registered trademark of The Linux Foundation.
Windows® is a trademark of the Microsoft group of companies.
QNX® is a trademark of QNX, a division of BlackBerry.
+
+FreeBSD® is a registered trademark of The FreeBSD Foundation.
diff --git a/SConscript b/SConscript
index 5a0cff7f5c..b48ec48c48 100644
--- a/SConscript
+++ b/SConscript
@@ -399,7 +399,7 @@ arm_compute_env = env.Clone()
version_file = arm_compute_env.Command("src/core/arm_compute_version.embed", "", action=create_version_file)
arm_compute_env.AlwaysBuild(version_file)
-default_cpp_compiler = 'g++' if env['os'] not in ['android', 'macos', 'openbsd'] else 'clang++'
+default_cpp_compiler = 'g++' if env['os'] not in ['android', 'macos', 'openbsd', 'freebsd'] else 'clang++'
cpp_compiler = os.environ.get('CXX', default_cpp_compiler)
# Generate embed files
diff --git a/SConstruct b/SConstruct
index 39c0ffdea3..6b78133739 100644
--- a/SConstruct
+++ b/SConstruct
@@ -103,7 +103,7 @@ vars.AddVariables(
allowed_values=("armv7a", "armv7a-hf", "arm64-v8a", "arm64-v8.2-a", "arm64-v8.2-a-sve", "arm64-v8.2-a-sve2", "x86_32", "x86_64",
"armv8a", "armv8.2-a", "armv8.2-a-sve", "armv8.6-a", "armv8.6-a-sve", "armv8.6-a-sve2", "armv8.6-a-sve2-sme2", "armv8r64", "x86")),
EnumVariable("estate", "Execution State", "auto", allowed_values=("auto", "32", "64")),
- EnumVariable("os", "Target OS. With bare metal selected, only Arm® Neon™ (not OpenCL) can be used, static libraries get built and Neon™'s multi-threading support is disabled.", "linux", allowed_values=("linux", "android", "tizen", "macos", "bare_metal", "openbsd","windows", "qnx")),
+ EnumVariable("os", "Target OS. With bare metal selected, only Arm® Neon™ (not OpenCL) can be used, static libraries get built and Neon™'s multi-threading support is disabled.", "linux", allowed_values=("linux", "android", "tizen", "macos", "bare_metal", "openbsd", "freebsd","windows", "qnx")),
EnumVariable("build", "Either build directly on your device (native) or cross compile from your desktop machine (cross-compile). In both cases make sure the compiler is available in your path.", "cross_compile", allowed_values=("native", "cross_compile", "embed_only")),
BoolVariable("examples", "Build example programs", True),
BoolVariable("gemm_tuner", "Build gemm_tuner programs", True),
@@ -282,11 +282,11 @@ if env['profile']:
cpp_tool = {'linux': 'g++', 'android' : 'clang++',
'tizen': 'g++', 'macos':'clang++',
- 'bare_metal':'g++', 'openbsd':'g++','windows':'clang-cl', 'qnx':'qcc -Vgcc_ntoaarch64le'}
+ 'bare_metal':'g++', 'openbsd':'g++', 'freebsd':'clang++', 'windows':'clang-cl', 'qnx':'qcc -Vgcc_ntoaarch64le'}
c_tool = {'linux':'gcc', 'android': 'clang', 'tizen':'gcc',
'macos':'clang','bare_metal':'gcc',
- 'openbsd':'gcc','windows':'clang-cl', 'qnx':'qcc -Vgcc_ntoaarch64le'}
+ 'openbsd':'gcc', 'freebsd':'clang++', 'windows':'clang-cl', 'qnx':'qcc -Vgcc_ntoaarch64le'}
default_cpp_compiler = cpp_tool[env['os']]
default_c_compiler = c_tool[env['os']]
@@ -567,7 +567,7 @@ if env['opencl']:
if env["os"] not in ["windows","android", "bare_metal", "qnx"] and (env['opencl'] or env['cppthreads']):
env.Append(LIBS = ['pthread'])
-if env['os'] == 'openbsd':
+if env['os'] == 'openbsd' or 'freebsd':
env.Append(LIBS = ['c'])
env.Append(CCFLAGS = ['-fPIC'])
diff --git a/arm_compute/core/utils/misc/Utility.h b/arm_compute/core/utils/misc/Utility.h
index e5d0a03f9d..44d7c9bfa2 100644
--- a/arm_compute/core/utils/misc/Utility.h
+++ b/arm_compute/core/utils/misc/Utility.h
@@ -36,6 +36,7 @@
#include
#include
#include
+#include
namespace arm_compute
{
diff --git a/src/common/cpuinfo/CpuInfo.cpp b/src/common/cpuinfo/CpuInfo.cpp
index 67e2906f06..91fb337918 100644
--- a/src/common/cpuinfo/CpuInfo.cpp
+++ b/src/common/cpuinfo/CpuInfo.cpp
@@ -31,6 +31,8 @@
#include