[oe] Gstreamer and rpath

Stanislav Brabec utx at penguin.cz
Mon Aug 6 10:15:10 UTC 2007


Michael Krelin wrote:
> >> A random idea:
> >>
> >> Define TARGET_ROOT_MAP, which may use similar syntax like overlay
> >> filesystems have. It will allow to construct sysroot by these
> >> filesystems on fly as well, e. g. for use with emulators.
> > 
> > That would be a much nicer solution. Staging could them have its own
> > mapping and it should solve most of the problems we see. Have you any
> > idea how difficult that would be to implement?
> 
> I don't see how this random idea could be easily implemented (well, I
> have to admit I haven't really given it a thought), but it serves a
> perfect explanation why we can't go for sysroot at the moment and
> probably anytime soon... Unfortunately, I think I'm convinced.

Instead of defining
CC="my-platform-gcc"
we can define
CC="wrap-compile-time-paths my-platform-gcc"

All OE recipes already handle CC. We will only change cross-CC (and
similar) values. If recipes don't use buggy quoting, it will work out of
the box. Autoconf and friends handle CC string with spaces without any
problems.

Writing of wrap-compile-time-paths should be easy - I guess no more than
30 lines of bash code. Maybe I would prefer pure Bourne shell + sed or C
to make such code acceptable for upstream autoconf.

It looks like gcc implementation of sysroot does following things:
- Search some compiler stuff in sysroot.
- Add sysroot to all includes paths including default system paths
- Add sysroot to all library paths including default system paths
- Pass it to the linker, if it supports it.

Linker uses sysroot as well - it is able to strip it from certain paths.
Its use may be platform specific there.

I am still not sure, how correct will be binaries created by upper
mentioned wrappers, but it will be for sure better than the
libtool-level hack. And it's easy to catch remaining references by QA
scripts.

-- 
Stanislav Brabec
http://www.penguin.cz/~utx/zaurus





More information about the Openembedded-devel mailing list