Skip to contentSkip to conversation

what is the expected STAGING_INCDIR for cross packages?

DISCUSSION Leon Woestenberg 3 participants 7 messages Nov 23, 2009 – Nov 24, 2009

lore
Share & tools
lore
#0 lore raw

Hello,

what is the expected STAGING_INCDIR for -cross packages?

Our STAGING_INCDIR for -cross packages contains two concatenated absolute paths, one based of CROSS_DIR, one based of STAGING_DIR.

Both are absolute, based against TMPDIR.

Is that correct?

i.e.

CROSS_DIR = ${TMPDIR}/cross/$BASE_PACKAGE_ARCH
prefix = ${CROSS_DIR}
exec_prefix = ${prefix}
includedir = ${exec_prefix}/include

STAGING_DIR = ${TMPDIR}/staging BASEPKG_HOST_SYS=${HOST_ARCH}${HOST_VENDOR}-${HOST_OS} STAGING_DIR_HOST=${STAGIG_DIR}/$BASEPKG_HOST_SYS}

which are then concatenated for -cross packages as:

STAGING_INCDIR = "${STAGING_DIR_HOST}${includedir}"

Regards,

Signature · 1 line
Leon
#1 lore raw
Quoted 9 lines · Leon Woestenberg

what is the expected STAGING_INCDIR for -cross packages?

Our STAGING_INCDIR for -cross packages contains two concatenated absolute paths, one based of CROSS_DIR, one based of STAGING_DIR.

Both are absolute, based against TMPDIR.

Is that correct?

Cross recipes are tricky. Half the time variables refer to the "host" and half the time they refer to the "target". This sounds like a case where the two have combined in a rather unfortunate way.

Where is this used and what kind of problem is occurring?

Quoted 4 lines

CROSS_DIR = ${TMPDIR}/cross/$BASE_PACKAGE_ARCH
prefix = ${CROSS_DIR}
exec_prefix = ${prefix}
includedir = ${exec_prefix}/include

These all look correct. Cross packages are installed into "/" under ${prefix} which puts them in the correctly place

Quoted 7 lines

STAGING_DIR = ${TMPDIR}/staging BASEPKG_HOST_SYS=${HOST_ARCH}${HOST_VENDOR}-${HOST_OS} STAGING_DIR_HOST=${STAGIG_DIR}/$BASEPKG_HOST_SYS}

which are then concatenated for -cross packages as:

STAGING_INCDIR = "${STAGING_DIR_HOST}${includedir}"

So I'd guess that cross.bbclass should be setting STAGING_DIR_HOST = "/" like native.bbclass does and then ${includedir} will map to the correct place.

I have to wonder what other side effects that would have of course (although there aren't that may -cross recipes to break comparatively speaking).

Cheers,

Richard

#2 lore raw

Hello Richard,

Quoted 5 lines · Richard Purdie
Quoted 1 line · Leon Woestenberg

what is the expected STAGING_INCDIR for -cross packages?

Where is this used and what kind of problem is occurring?

It's in binutils-cross.

I'm adding a new architecture (nios2) which has additional staging steps in which it brings out a few binutils build-host specifics, in order for the following "elf2flt" tool to build.

Up-to-current binutils-cross did not stage anything, so we never saw this there.

(I'm aware this should fold into install with your packaged-staging cleanup, but I don't dare to move the binutils to the new approach just yet).

Regards,

Signature · 1 line
Leon
#3 lore raw
Quoted 14 lines · Leon Woestenberg

Hello Richard,

Quoted 5 lines · Richard Purdie
Quoted 1 line · Leon Woestenberg

what is the expected STAGING_INCDIR for -cross packages?

Where is this used and what kind of problem is occurring?

It's in binutils-cross.

I'm adding a new architecture (nios2) which has additional staging steps in which it brings out a few binutils build-host specifics, in order for the following "elf2flt" tool to build.

Quoted 5 lines

Up-to-current binutils-cross did not stage anything, so we never saw this there.

(I'm aware this should fold into install with your packaged-staging cleanup, but I don't dare to move the binutils to the new approach just yet).

Take a look at what cross.bbclass looks like in Poky. There are things like ${target_includedir} defined there for exactly this kind of problem.

Cheers,

Richard

#4 lore raw

Hello,

Quoted 9 lines · Richard Purdie
Quoted 3 lines · Leon Woestenberg
Quoted 2 lines · Richard Purdie
Quoted 1 line · Leon Woestenberg

what is the expected STAGING_INCDIR for -cross packages?

Take a look at what cross.bbclass looks like in Poky. There are things like ${target_includedir} defined there for exactly this kind of problem.

This seems the right approach.

Emptying STAGING_DIR_HOST opened another can of worms (/shlibs related).

Groeten,

Signature · 1 line
Leon
#5 lore raw
In reply to Leon Woestenberg
Quoted 3 lines · Leon Woestenberg

I'm adding a new architecture (nios2) which has additional staging steps in which it brings out a few binutils build-host specifics, in order for the following "elf2flt" tool to build.

elf2flt brings back nasty uclinux memories here ;)

regards,

Koen

#6 lore raw

Hello Koen, all,

Quoted 8 lines · Koen Kooi
Quoted 3 lines · Leon Woestenberg

I'm adding a new architecture (nios2) which has additional staging steps in which it brings out a few binutils build-host specifics, in order for the following "elf2flt" tool to build.

elf2flt brings back nasty uclinux memories here ;)

Yes, happily, the nios2 now has a mmu-full variant as well.

Not that their toolchains don't suck, I have the feeling I'm opening another can of worms.

Regards,

Signature · 1 line
Leon