Commit Graph

6 Commits

Author SHA1 Message Date
Alex Richardson
231f58903b [make][clang] Do not add unsupported warning flags
Currently, clang does not support the -Wno-nonnull-compare and
-Wmaybe-uninitialized warning flags so this adds lots of unknown warning
flag output for each compile job when not using GCC.
This commit adds a makefile macro to check for supported warning flags
and only adds them if the compiler actually supports them.
2023-06-01 17:50:50 -07:00
Travis Geiselbrecht
6462cbf51c [arch][fpu] add ability to specify per file or module if code needs fpu
Have the arch define additional compiler flags to explicit support or
not support a floating point unit.

Add ability for modules to per file or for the whole module mark code
as needing floating point support.

Add default flags for arm64, riscv, and x86 toolchains.

Needed because gcc 12 is getting much more aggressive about using vector
instructions for non float code, so getting away with avoiding it was
no longer working.

Still not perfect: printf code is being compiled with float, so it's
possible to use floating point instructions inside core kernel or
interrupt handling code if a printf is used.

Possibly will have problems on architectures where mixing float and non
float code at the linker generates issues, but so far seems to be okay.
2022-07-17 16:32:24 -07:00
Travis Geiselbrecht
3ba03f7def [external][libm] add -Wno-maybe-uninitialized
Some older code triggers this warning on gcc 12.1.
2022-05-12 20:04:42 -07:00
Travis Geiselbrecht
ba530722f5 [warning] add -Wdouble-promotion
Mostly just a few warnings where things are promoted via passing floats to
printf. Those we should generally remove anyway because they're just
benchmarking code. Most things LK runs on either doesn't have float or
doesn't have double sized floats.
2020-07-25 17:16:22 -07:00
cstout
5f050a570a [lib][libm] Add floorf and ceilf
Needed by skia.

R=travisg@gmail.com

Review URL: https://codereview.chromium.org/1734733002 .
2016-02-24 10:17:21 -08:00
Travis Geiselbrecht
5e14990dbd [lib][libm] move to external/ 2016-02-20 11:31:51 -08:00