sdk-ng
sdk-ng copied to clipboard
_GLIBCXX_USE_C99_MATH_TR1 is undefined for some architectures
_GLIBCXX_USE_C99_MATH_TR1
is undefined for some architectures (e.g. in aarch64-zephyr-elf
toolchain), leading to build issues with cmath
such as:
/Users/cfriedt/workspace/gsoc-2022-thrift/.upstream/lib/cpp/src/thrift/transport/TBufferTransports.cpp: In member function 'void apache::thrift::transport::TMemoryBuffer::ensureCanWrite(uint32_t)':
/Users/cfriedt/workspace/gsoc-2022-thrift/.upstream/lib/cpp/src/thrift/transport/TBufferTransports.cpp:374:45: error: 'exp2' is not a member of 'std'
374 | const double suggested_buffer_size = std::exp2(std::ceil(std::log2(required_buffer_size)));
| ^~~~
/Users/cfriedt/workspace/gsoc-2022-thrift/.upstream/lib/cpp/src/thrift/transport/TBufferTransports.cpp:374:55: error: 'ceil' is not a member of 'std'
374 | const double suggested_buffer_size = std::exp2(std::ceil(std::log2(required_buffer_size)));
| ^~~~
/Users/cfriedt/workspace/gsoc-2022-thrift/.upstream/lib/cpp/src/thrift/transport/TBufferTransports.cpp:374:65: error: 'log2' is not a member of 'std'
374 | const double suggested_buffer_size = std::exp2(std::ceil(std::log2(required_buffer_size)));
Related discussion on Discord: https://discord.com/channels/720317445772017664/883444430676324382/1025865109286948943