bbclass providing some level of scratchbox compatibility
Hi,
I am using OE to build binaries that can be run from within Maemo scratchbox.
The binaries I create are for the native architecture (the one of the host CPU) not the emulated one. Such binaries need a special rpath. What the bbclass does is simply putting that special rpath in LD_RUN_PATH before configuring and compiling. This has the effect that all built binaries have it in.
Together with a halfway compatible toolchain (CS gcc3.4.4, glibc2.3.x) that allows me to run those binaries in Maemo's scratchbox.
I am using this for Jalimo[0] and would like to push it upstream. I am open for suggestions.
File a bug?
Regards
Robert
[0] - http://jalimo.org/wiki/doku.php?id=doc:howto:cacaoandecjinscratchbox
# By adding this class to your build all binaries get the special rpath # "/scratchbox/host_shared/lib/:/scratchbox/tools/lib/"
# Doing so makes libraries and programs runnable inside the Scratchbox
# environment as native binaries (not for the CPU that Scratchbox is # emulating).
do_configure_prepend () {
export LD_RUN_PATH="/scratchbox/host_shared/lib:/scratchbox/tools/lib"
}
do_compile_prepend () {
export LD_RUN_PATH="/scratchbox/host_shared/lib:/scratchbox/tools/lib"
}