]> xenbits.xensource.com Git - unikraft/libs/libcxx.git/commit
include/math.h: Add libcxx math.h header
authorStefan Jumarea <stefanjumarea02@gmail.com>
Fri, 4 Nov 2022 10:41:28 +0000 (12:41 +0200)
committerUnikraft <monkey@unikraft.io>
Sat, 19 Nov 2022 16:29:29 +0000 (16:29 +0000)
commite1bfc4dd6bef53a4353bdf98c17e2b22cfe429d8
tree6468ea7d057b949234c104c07b62b916e39acb77
parent26f1d702c861ea7646001e7771f278ee25b66027
include/math.h: Add libcxx math.h header

When building `libcxx` with musl, some undefined functions errors appear
because the musl math.h header is used.

`cmath` looks for some funtions defined in an anonymous namespace, but they
are defined as macros within the `musl` headers. This leads to errors since
the macros can not match the required functions.

The functions are defined in `libcxx` headers, but they are not processed
since the `musl` headers are prioritised. We cannot prioritise the `libcxx`
headers since it leads to a lot of issues similar to this one.

Signed-off-by: Stefan Jumarea <stefanjumarea02@gmail.com>
Reviewed-by: Maria Sfiraiala <maria.sfiraiala@gmail.com>
Reviewed-by: Razvan Deaconescu <razvand@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #22
include/support/musl/math.h [new file with mode: 0644]
patches/0010-Use-libcxx-math-header-file-when-building-with-musl.patch [new file with mode: 0644]