This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


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: Toolchain has UID dependency


Rod, All,

On Wednesday 30 June 2010 18:55:54 Rod Nussbaumer wrote:
> Yann E. MORIN wrote:
> > So if the toolchain is configured with:
> >   --prefix=/home/foo/bar/tuple
> >   --with-sysroot=/home/foo/bar/tuple/tuple/sysroot
> To help us all understand, can you relate these settings to what appears 
> in the CT-NG .config?
> To me, it looks like --prefix=  derives from CT_PREFIX_DIR, yes? Makes 
> sense.

--prefix is exactly ${CT_PREFIX_DIR}

> And --with-sysroot= derives also from $CT_PREFIX_DIR, with a  
> tuple/sys-root appended

Almost right, see below. ;-)

> (BTW, my version 1.4.2 seems to add an extra 
> '/' (slash) between the second tuple and the sys-root).  Where does the 
> value of CT_SYSROOT_DIR_PREFIX fit into these?

You can see how --with-sysroot is constructed, if you look at the help
entry for CT_SYSROOT_DIR_PREFIX in the menuconfig. Here it is:

  ---8<---
  This string will be interpreted as a directory component to be added
  to the sysroot path, just before the actual sysroot directory.

  In fact, the sysroot path is constructed as:
    ${CT_PREFIX_DIR}/${CT_TARGET}/${CT_SYSROOT_DIR_PREFIX}/sys-root
  ---8<---

And by the way, the prompt for CT_SYSROOT_DIR_PREFIX clearly suggest
reading the help entry! :-P

By default CT_SYSROOT_DIR_PREFIX is empty. This creates the /standard/
sysroot layout.

Alongside with the sysroot, CT-NG also installs some target binaries (eg.
gdbserver). These are not really part of the toolchain, so get installed
in their own 'root', which crosstool-NG calls the debug-root (as opposed
to the sys-root, for system root). The user can simply copy the whole
content of the debug-root to its rootfs on the target, without pulling
all the system stuff (includes, static libs, locales...).

And I've seen a setup where the toolchain was not directly accessible to
the users (being on remote build servers with no shell access). For the
users to access the debug-root and sys-root, they had to be /exported/
on the network. Exporting two directories per toolchain was overkill, plus
it was not nice for the users, and simply giving access to prefix/tuple
was exposing other stuff.

So debug-root and sys-root had to be moved to their own sub-dir, which
could then be easily exported to the network. This sub-dir can be set
with CT_SYSROOT_DIR_PREFIX. If it is empty, you can see that a double
slash will be present in the path. Not clean, but totally innocuous.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'



--
For unsubscribe information see http://sourceware.org/lists.html#faq


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