Answer the question
In order to leave comments, you need to log in
What should be the -L options for the gcc linker if the sysroot option is used?
I need to cross compile a C++ project.
For gcc, the --sysroot=/home/me/mysysroot/ parameter is passed.
But there are also -L parameters that tell the linker the path to individual libraries.
So the question is -L should the path be the full path in my host machine where cross compilation is performed or the path relative to the path specified in the sysroot parameter?
Answer the question
In order to leave comments, you need to log in
-L must the path be the full path on my host machine where the cross compilation is being done, or a path relative to the path specified in the sysroot parameter?
=
or a string $SYSROOT
($SYSROOT must not be interpreted by the shell and must be in the compiler arguments as such), it is interpreted relative to sysroot. Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question