From 7195f71b2e44e2119b1763fde02b2cf3f9371a6b Mon Sep 17 00:00:00 2001 From: Kevin Lo Date: Fri, 7 Jan 2022 15:46:02 +0800 Subject: Add OpenBSD/arm64 support. Signed-off-by: Kevin Lo Change-Id: I6f29bdb55caeec8893f128fdd50bdcc3d058cb3c Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/6905 Reviewed-by: Georgios Pinitas Reviewed-by: Pablo Marquez Tello Comments-Addressed: Pablo Marquez Tello Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins --- SConstruct | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'SConstruct') diff --git a/SConstruct b/SConstruct index 13f839b324..425c77643a 100644 --- a/SConstruct +++ b/SConstruct @@ -94,7 +94,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", "armv8r64", "x86")), EnumVariable("estate", "Execution State", "auto", allowed_values=("auto", "32", "64")), - EnumVariable("os", "Target OS", "linux", allowed_values=("linux", "android", "tizen", "macos", "bare_metal")), + EnumVariable("os", "Target OS", "linux", allowed_values=("linux", "android", "tizen", "macos", "bare_metal", "openbsd")), EnumVariable("build", "Build type", "cross_compile", allowed_values=("native", "cross_compile", "embed_only")), BoolVariable("examples", "Build example programs", True), BoolVariable("gemm_tuner", "Build gemm_tuner programs", True), @@ -207,8 +207,8 @@ env.Append(CXXFLAGS = ['-Wall','-DARCH_ARM', env.Append(CPPDEFINES = ['_GLIBCXX_USE_NANOSLEEP']) -default_cpp_compiler = 'g++' if env['os'] not in ['android', 'macos'] else 'clang++' -default_c_compiler = 'gcc' if env['os'] not in ['android', 'macos'] else 'clang' +default_cpp_compiler = 'g++' if env['os'] not in ['android', 'macos', 'openbsd'] else 'clang++' +default_c_compiler = 'gcc' if env['os'] not in ['android', 'macos', 'openbsd'] else 'clang' cpp_compiler = os.environ.get('CXX', default_cpp_compiler) c_compiler = os.environ.get('CC', default_c_compiler) @@ -427,6 +427,10 @@ if env['opencl']: if env["os"] not in ["android", "bare_metal"] and (env['opencl'] or env['cppthreads']): env.Append(LIBS = ['pthread']) +if env['os'] == 'openbsd': + env.Append(LIBS = ['c']) + env.Append(CXXFLAGS = ['-fPIC']) + if env['opencl']: if env['embed_kernels']: env.Append(CPPDEFINES = ['EMBEDDED_KERNELS']) -- cgit v1.2.1