Re: Would it make sense to have sysroot come from an environment variable?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Bryan Ischo <bryan@xxxxxxxxx> writes:

> I'm still trying to get my head around all of the search paths that
> the GNU toolchain uses and when it uses them and how it gets them.
> I'm wondering if it makes any sense at all for the toolchain to accept
> sysroot via an environment variable; for the purposes of this
> discussion I would propose that this variable be SYSROOT.
>
> I suggest this only because I'm trying to create a fairly
> self-contained build of the compiler toolchain that is as
> relocatable' as possible, and one problem is that I can put libraries
> and headers (for gcc, glibc, and the kernel) into a sysroot directory
> of my choosing that I can move around as I need to, but then making
> the toolchain use that sysroot requires passing --sysroot flags to the
> appropriate tool at the appropriate time; and it seems like since the
> sysroot would be a fixed value that would be used identically for all
> tools in the toolchain, getting this value from an environment
> variable would be much more convenient and seamless.
>
> Would it make any sense to do this?  If so, would it be as simple as
> patching the tools to look at a SYSROOT environment variable to get
> their sysroot if none has been specified on the command line?

If you configure gcc using --with-sysroot=DIR, then you should be able to
move around DIR and have everything continue to work seamlessly.  You
will run DIR/bin/gcc and gcc will figure out everything from there.

Ian


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux