cannot find -lgcc

In the ppc460 environment, a compilation error “cannot find -lgcc” occurred when the Makefile was executed. I checked the Makefile many times at the beginning, and considered the reason why the path of the compilation chain was not added to the environment variable. After adding it, I checked the Makefile carefully and found the error Occurs in the linking stage, meaning that the Gcc support library libgcc.a is not found, and the file is found to exist in the directory. Later, the path in the Make file is located in the upper directory, that is, the library is not directly located, and executed success.
Here are several switch items of the following Gnu linker.

  • -lm represents that the linker will connect to the gcc math library libm.a
  • -lc means that the linker will connect to the standard C library libc.a of gcc
  • -lgcc means that the linker will connect to the gcc support library libgcc.a

Guess you like

Origin blog.csdn.net/qq_40996117/article/details/108696908