diff options
author | Mark Hasemeyer <markhas@google.com> | 2022-11-21 21:40:47 -0700 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-11-29 18:29:51 +0000 |
commit | 1350988ef5d4b75366c8bd0bd54bfb7bf041c600 (patch) | |
tree | b7f596f93fd1fcb26c8b3fa40e4fcda54168c8da | |
parent | f8ac295d745a9316f087a3b8a991e80d10103764 (diff) | |
download | chrome-ec-1350988ef5d4b75366c8bd0bd54bfb7bf041c600.tar.gz |
test: math: Support native posix fpu tests
The floating point math tests fail to build if PLATFORM_EC_FPU is
enabled on a native posix board.
Include the math library to support fpu tests for native posix builds.
BUG=b:217926701
BRANCH=none
TEST=twister -T zephyr/test/math/
Signed-off-by: Mark Hasemeyer <markhas@google.com>
Change-Id: I2cc5d2c22d182d8b1f6ca66fff68c0a5da0c24cd
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4049381
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
Reviewed-by: Keith Short <keithshort@chromium.org>
-rw-r--r-- | zephyr/shim/include/fpu.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/zephyr/shim/include/fpu.h b/zephyr/shim/include/fpu.h index d1e4460827..02e6a7c5f4 100644 --- a/zephyr/shim/include/fpu.h +++ b/zephyr/shim/include/fpu.h @@ -55,6 +55,8 @@ static inline float fabsf(float v) __asm__("fabs.s %0, %1" : "=f"(abs) : "f"(v)); return abs; } +#elif CONFIG_BOARD_NATIVE_POSIX +#include <math.h> #else #error "Unsupported core: please add an implementation" #endif |