Missing pthread_once

When compiling riscv-gnu-toolchain, I encountered this error:

/usr/bin/ld: /usr/lib64/gcc/x86_64-generic-linux/10/…/…/…/…/lib64/libstdc++.a(locale.o): reference to undefined symbol « pthread_once@@GLIBC_2.2.5 »

/usr/bin/ld : /usr/lib64/libpthread.so.0 : error while adding symbols: DSO missing from the command line collect2: error: ld returned 1 exit status make[2]: *** […/…/./riscv-gcc/gcc/c/Make-lang.in:85 : cc1] Erreur 1

devpkg-libpthread-stubs is installed, but pthread_once is missing.

Do you have any ideas for a solution?