[Buildroot] Issue for the integration of Codesourcery external toolchains

Yann E. MORIN yann.morin.1998 at anciens.enib.fr
Tue Jan 12 22:09:41 UTC 2010


Hello Thomas,
All,

On Tuesday 12 January 2010 11:52:28 Thomas Petazzoni wrote:
> So maybe our solution of using --sysroot is ugly and we should fall
> back to the solution where the toolchain sysroot is kept in its
> original location and we just use -L/-I to indicate where our staging
> directory is (solution which has proved in the past to be fairly
> difficult to stabilize).

Well, for what it's worth, here's an (embrio of an) idea:

1) do not copy the sysroot to staging, trust gcc to find it properly
2) add a kind of wrapper to gcc (et al.) that basically does the following:

---8<---
#!/bin/sh
exec real-gcc -L "${STAGING_DIR}"{,/usr}/lib    \
                  -I "${STAGING_DIR}"/usr/include   \
                  "$@"
---8<---

That way, we always have out staging/lib and staging/usr/lib in the library
search path; ditto for the include search path.

It should work with whatever toolchain we're using, internaly-built or
external. And that means a single way of handling things.

Finally, when the staging is full, we can /overlay/ with a copy of the
original sysroot libs we get from gcc --print-sysroot

Of course, that's far from being complete!

HTH...

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.  |
`------------------------------^-------^------------------^--------------------'




More information about the buildroot mailing list