diff options
author | jiyong.min <jiyong.min@samsung.com> | 2022-04-22 08:58:51 +0900 |
---|---|---|
committer | jiyong.min <jiyong.min@samsung.com> | 2022-04-22 09:06:43 +0900 |
commit | fc34a039a3e7a0586c1cdf8ab03ca0831de9c024 (patch) | |
tree | c61bf7f89fff77abca74cdf96614caa1a099d817 | |
parent | b7b77a1c0d314360e977f8466fb31ab8dc521b72 (diff) | |
download | libjxl-fc34a039a3e7a0586c1cdf8ab03ca0831de9c024.tar.gz libjxl-fc34a039a3e7a0586c1cdf8ab03ca0831de9c024.tar.bz2 libjxl-fc34a039a3e7a0586c1cdf8ab03ca0831de9c024.zip |
Fix build error when '__ARM_FP' is 0x02submit/tizen/20220422.024303accepted/tizen/unified/20220422.133441
- When '__ARM_FP' is 0x02(fpu support), '__fp16' or '_Float16' needs for 'float16_t'.
But '__fp16' and '_Float16' are not declared in tizen.
So we add 'float16_t' for tizen.
Change-Id: I248119d666c6c30cf5609bfc9a050c93cbfa6257
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | third_party/highway/hwy/base.h | 7 |
2 files changed, 9 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c2790ab..3d54d56 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -213,6 +213,8 @@ add_definitions( -D__DATE__="redacted" -D__TIMESTAMP__="redacted" -D__TIME__="redacted" + # To avoid build error in tizen, add define for submodules + -D__TIZEN__ ) # Avoid log spam from fopen etc. diff --git a/third_party/highway/hwy/base.h b/third_party/highway/hwy/base.h index 009373f..c9e0d0c 100644 --- a/third_party/highway/hwy/base.h +++ b/third_party/highway/hwy/base.h @@ -231,10 +231,17 @@ static constexpr HWY_MAYBE_UNUSED size_t kMaxVectorSize = 16; #if defined(HWY_EMULATE_SVE) using float16_t = FarmFloat16; #elif HWY_NATIVE_FLOAT16 +// Avoid "'__fp16' and '_Float16' not declared" build error +#if defined(__TIZEN__) +struct float16_t { + uint16_t bits; +}; +#else using float16_t = __fp16; // Clang does not allow __fp16 arguments, but scalar.h requires LaneType // arguments, so use a wrapper. // TODO(janwas): replace with _Float16 when that is supported? +#endif #else struct float16_t { uint16_t bits; |