diff options
author | Tom Hughes <tomhughes@chromium.org> | 2021-08-30 17:42:00 +0000 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-08-31 16:56:01 +0000 |
commit | 5fa669005c3779b7310bf6bfe43f741a3d8ae871 (patch) | |
tree | 076327c058f14bf3dcfea811ca16fc0f1fc3c8e0 /core/riscv-rv32i | |
parent | 5a1a08381adff5caee99bdfea8fcb7ca30b31734 (diff) | |
download | chrome-ec-5fa669005c3779b7310bf6bfe43f741a3d8ae871.tar.gz |
builtin: Add math.h
Add a "math.h" to "builtin" and rename "math.h" in the "core"
directories to "fpu.h". "builtin" is the directory containing headers
that mirror those in the standard library and is used for device builds.
The host builds exclude the "builtin" directory and use the standard
library. Without this change, building host tools such as "ectool" and
attempting to include "math.h" would result in incorrectly picking up
the "math.h" from the device "core" directory, not the standard library
version.
BRANCH=none
BUG=b:144959033
TEST=make buildall
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Change-Id: Id6b2df42cb0ff5ec2cfc07aa8f29861da6804bdf
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3130625
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'core/riscv-rv32i')
-rw-r--r-- | core/riscv-rv32i/include/fpu.h (renamed from core/riscv-rv32i/include/math.h) | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/riscv-rv32i/include/math.h b/core/riscv-rv32i/include/fpu.h index f17144762a..25d83f228f 100644 --- a/core/riscv-rv32i/include/math.h +++ b/core/riscv-rv32i/include/fpu.h @@ -5,9 +5,9 @@ /* Math utility functions for RISC-V */ -#ifndef __CROS_EC_MATH_H -#define __CROS_EC_MATH_H +#ifndef __CROS_EC_FPU_H +#define __CROS_EC_FPU_H float sqrtf(float x); -#endif /* __CROS_EC_MATH_H */ +#endif /* __CROS_EC_FPU_H */ |