This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Compiling gcc with sysroot


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

> I've been reading the documentation for it, but quite don't
> understand. When gcc is compiled (and installed) with
> --with-sysroot=DIR (and prefix is set to the same) will that effect
> how gcc it self is built or the how the newly installed gcc will
> behave afterwords? or both?

The primary effect of the --with-sysroot option is on how gcc works
after it has been built and installed.  However, there is also an effect
on the build: if you use --with-sysroot, then when gcc is building
library code which runs on the target, it will use header files and
libraries from the specified sysroot.

See also --with-build-sysroot.

Note that you should normally only set --prefix and --with-sysroot to
the same directory when using a cross-compiler to build a native
compiler that runs on some other system.  You should not normally use it
when building a cross-compiler.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]