GCC should still build with GCC 4.8.3 or newer [1]
using C++03 by default. But a recent change in
RISC-V port introduced a C++11 feature "std::log2" [2].
Use log2 from the C header, without the namespace [3].
[1] https://gcc.gnu.org/install/prerequisites.html
[2] https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=
7caa1ae5e451e780fbc4746a54e3f19d4f4304dc
[3] https://stackoverflow.com/questions/
26733413/error-log2-is-not-a-member-of-std
Fixes:
https://gitlab.com/buildroot.org/toolchains-builder/-/jobs/
4202276589
gcc/ChangeLog:
* config/riscv/genrvv-type-indexer.cc: Use log2 from the C header, without
the namespace.
Signed-off-by: Romain Naour <romain.naour@gmail.com>
if (sew == eew)
elmul_log2 = lmul_log2;
else if (sew > eew)
- elmul_log2 = lmul_log2 - std::log2 (sew / eew);
+ elmul_log2 = lmul_log2 - log2 (sew / eew);
else /* sew < eew */
- elmul_log2 = lmul_log2 + std::log2 (eew / sew);
+ elmul_log2 = lmul_log2 + log2 (eew / sew);
if (float_p)
return floattype (eew, elmul_log2);