[oe] [PATCH] cross.bbclass: Override STAGING_* paths to match cross installation

Khem Raj raj.khem at gmail.com
Mon Aug 9 15:48:06 UTC 2010


On Mon, Aug 9, 2010 at 4:12 AM, Richard Purdie <rpurdie at rpsys.net> wrote:
> Hi Khem,
>
> On Sun, 2010-08-08 at 23:44 -0700, Khem Raj wrote:
>> Signed-off-by: Khem Raj <raj.khem at gmail.com>
>> ---
>>  classes/cross.bbclass |    8 ++++++++
>>  1 files changed, 8 insertions(+), 0 deletions(-)
>>
>> diff --git a/classes/cross.bbclass b/classes/cross.bbclass
>> index cf14db1..64f7902 100644
>> --- a/classes/cross.bbclass
>> +++ b/classes/cross.bbclass
>> @@ -50,6 +50,14 @@ exec_prefix = "${prefix}"
>>  base_sbindir = "${base_prefix}/bin"
>>  sbindir = "${exec_prefix}/bin"
>>
>> +# staging should be special for cross
>> +STAGING_BINDIR = "${bindir}"
>> +STAGING_LIBDIR = "${libdir}"
>> +STAGING_INCDIR = "${includedir}"
>> +STAGING_ETCDIR = "${sysconfdir}"
>> +STAGING_DATADIR = "${datadir}"
>> +STAGING_SBINDIR = "${sbindir}"
>> +
>>  do_install () {
>>       oe_runmake 'DESTDIR=${D}' install
>>  }
>
> Can you explain a bit more about why is this needed?

yes. for cross packages prefix is set in cross.bbclass to be
${base_prefix}${prefix_native}/${BASE_PACKAGE_ARCH}
which already points into native sysroot and bindir, datadir etc are
defined based on prefix in bitbake.conf so
for cross packages datadir already points to where it is in the final
install location of the cross packages.

but STAGING_* dirs are then defined like below

STAGING_DIR_HOST = "${STAGING_DIR}/${BASEPKG_HOST_SYS}"
STAGING_BINDIR = "${STAGING_DIR_HOST}${bindir}"

where
STAGING_DIR_HOST expands to <native sysroot> in the case of cross
packages because for them BASEPKG_HOST_SYS
is the build system itself. I think this is a the reason why we have
NATIVE_STAGING_* vars defined separately.
probably we should have the same set defined for cross too may be
something like CROSS_STAGING_* is one solution.

and now all these STAGING_* defines create another native sysroot
directory insise the existing one.
so I get /scratch/oe/sysroot/x86_64-linux/scrarch/oe/sysroot/x86_64-linux/usr/armv5te/shared/
etc. paths while
building binutils-cross

because STAGING_* variables are used in autotools.bbclass

Thats why this patch

Thanks
-Khem

>
> Cheers,
>
> Richard
>
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel at lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>




More information about the Openembedded-devel mailing list