cross-compile and pkgconfig
JLM aka cityhunter
jlm_devel at laposte.net
Fri Sep 16 10:49:02 PDT 2005
Enrico Weigelt a écrit :
>* malet jean-luc alias cityhunter <jlm_devel at laposte.net> schrieb:
>>>For clean crosscompiling you should use a sysroot'ed toolchain.
>>>(crosstool is your friend for creating one).
>>this might be not a good idea..... because with crosstool you have only
>>one sysroot per compile chain.... but you often need lot more....
>That's easy to solve: simply multiple toolchains ...
yeah easy but space and time wasting (you have to recompile
gcc/binutils/linux/glibc for each new tree you're testing on)
>Yeah, this wastes some disk space. Perhaps we could run some process
>after building, which finds equal files and links them together.
>>work into a company you have to work with others.... there is often a
>>"reference tree" that contains the applications integrated, and
>>"development trees" (you can even have several devel trees if working on
>>lot of small functionalities that aren't related, or sharing some devel
>>trees...) that why often software are compiled with --nostdinc with
>>rights -I and -L.... it's personal experience I'm talking about....
>sysroot'ing is the only clean way I can imagine.
>The other ways are not really clean and reliable.
sysroot isn't clean though....my experience (it may have changed now)
shows that even with a sysroot the crosschain end seeking for includes
in /usr/include and for libs in /lib /usr/lib and so one if he can't
find it in SYSROOT/usr/include (....) for libs this isn't bothering
since elf contain information about the platform for which the libs has
been build.... but for headers this another story.... this caused me lot
of trouble having configure detecting things that aren't available on
the target but on the host.... and activating support and failling at
link time..... so the only way to have something clean is to not trust
gcc... and forceit to use your include dir using --nostdinc and -I
More information about the pkg-config