Compiling gcc with sysroot

Ian Lance Taylor iant@google.com
Tue Dec 6 00:15:00 GMT 2011


Christer Solskogen <christer.solskogen@gmail.com> writes:

>> You should not normally use it
>> when building a cross-compiler.
>>
>
> Can you elaborate on why?

The "it" in the quoted sense refers to using the same value for --prefix
and --with-sysroot.  The reason that is not normally done for a
cross-compiler is that --with-sysroot refers to the root tree of a
target system, directories like /usr/bin and /usr/include.  The programs
found in /usr/bin are programs that run on the target system.  It does
not make sense to install a (normally built) cross-compiler there,
because the cross-compiler would not run on the target system.

Ian



More information about the Gcc-help mailing list