I need to build a GCC and all necessary libraries (libc, libstdc++, etc.) against the Musl library. I'd been trying to build version 13 and the stable one (on 10.07.2023). Musl version 1.2.4 had been chosen. My final configuration of builds is
../configure --prefix=/usr/local/gcc-musl --target=x86_64-linux-musl --with-sysroot=/usr/local/musl --with-newlib --disable-nls --enable-languages=c,c++ --with-default-libstdcxx-abi=gcc4-compatible --disable-multilib --enable-bootstrap
Compilation (make all-gcc -j4) was successful and without any errors every time. But during the installation (sudo make install) every time I saw this:
/bin/sh: line 4: cd: ./c++tools: No such file or directory
make[1]: *** [Makefile:15533: install-c++tools] Error 1
make[1]: Leaving directory '/home/***/Tools/gcc-musl-13/build'
make: *** [Makefile:2624: install] Error 2
Also I had been trying to configure and build it from an original directory with source code, not just from created subdirectory called build with different parameters.
What can cause this problem?