I am compiling GCC 9.3.0 under FreeBSD 12.3 (i386). It is OK when I type
./configure
, but when I type
gmake
(BSD make is different from GNU Make, so I fetch one by typing
pkg install gmake
which is GNU make), the program throws the error output:
ld: error: unable to find library -lc
collect2: error: ld returned 1 exit status
gmake[3]: *** [Makefile:992: libgcc_s.so] Error 1
gmake[2]: *** [Makefile:18047: all-stage1-target-libgcc] Error 2
gmake[1]: *** [Makefile:23357: stage1-bubble] Error 2
gmake: *** [Makefile:991: all] Error 2
|
Therefore, I serched in Makefile for line 991, 18047, and 23357. They are the same command which is:
@r='${PWD_COMMAND}'; export r; \
After I saw the complaint of linker, I guess the error is because the Makefile didn't make the linker find
libc.so
. (By the way, this file is under
/usr/lib
directory.)
Overall, can I modify the command or the Makefile by some means to solve this problem?