(0003099)
ikonst
12-11-07 14:50
|
This is not just the CC used for compilation. Very often, package build systems elect to link with using the CC as well, e.g.:
gcc one.o two.o three.o -L/somewhere -lfoobar -o someapp
In this case, the CC needs all linker flags. In my case, the -L linker flags were missing.
My case is an "external toolchain" case, and in this case, the -L flag is used to direct the linker (whether invoked directly as 'ld' or indirectly by the C compiler) to the libs in the staging dir.
Why do we need to specify the staging dir explicitly? Unlike a buildroot-built toolchain (an "internal" toolchain) which is precompiled to use STAGING_DIR/include and STAGING_DIR/lib as its system headers/libraries directories, an external toolchain will typically refer to its own system headers (containing only standard C library headers) and its own system libraries (containing only libc.so). |