Joined: 24 Jun 2004
|Posted: Mon Feb 19, 2007 1:01 pm Post subject: Confussed.. What happens when cross emerging libs?
I posted this on the Gentoo Embedded Mailing list a few weeks back and have not got a response, so I thought I'd try the forums instead.
I'm currently working on porting Gentoo to gumstix modules. (www.gumstix.com).
I'm putting together my own profile based on full-blown baselayout, but using busybox to replace a lot of coreutils etc.
Although I'm using baselayout, I still don't want a toolchain (or portage) on the target, so I've used crossdev to generate an arm-softfloat-linux-uclibc toolchain based on gcc 3.4.6.
Everything was going (reasonably) well until I got to module-init-tools. This package requires zlib. Now, zlib emerges fine, however it puts its headers in $ROOT/usr/include, which doesn't seem to be in the include search path when emerging module-init-tools. Ergo, module-init-tools fails when compiling.
Now, this can be easily fixed by simply copying across the headers or adding it to the search path. However, the crux of the problem is that neither the headers, nor the static library (libz.a) should be installed on the target. Only the dynamic library should be installed onto the target.
In my mind, there's 2 ways of doing this: You could pass extra params when emerging zlib to give it the dir of the toolchain to install into. Or, you could extend crossdev to support emerging of arbitrary libraries into the toolchain dir. Or it should work a completely different way I've not thought of/don't know about.
I'm pretty early into the port and am worried more libraries are going to have the same problem. How _should_ this work?
I'm leaning towards giving crossdev the ability to install any library into the toolchain. However, that then breaks when a dynamic library is needed on the target. Perhaps there should be another directory tree for target-specific headers and static libraries? I.e. You have your toolchain tree, your target's root fs tree AND an "additional libraries" tree associated with the target's root fs and managed by the portage database for the target.