All of lore.kernel.org
 help / color / mirror / Atom feed
* gcc-cross-kernel problems
@ 2011-06-25 20:38 Koen Kooi
  2011-06-26  2:30 ` Khem Raj
  0 siblings, 1 reply; 13+ messages in thread
From: Koen Kooi @ 2011-06-25 20:38 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

Hi,

I was spending some spare cycles on https://github.com/koenkooi/meta-archos 
  and wanted to build the 2.6.22 vendor kernel first before trying to  
the 3.0rc working and I need to use csl 2007q3 as gcc-cross-kernel due  
to bugs in the kernel.

I imported the 2008q1 recipes from OE-core, then changed the SRC_URI  
to have the patches from the 2007q3 recipe in OE classic. It uses  
the .inc files from OE-core. It builds and gives me:

koen@dominion:/OE/tentacle/build/tmp-angstrom_2010_x-eglibc/work/ 
armv7a-angstrom-linux-gnueabi/gcc-cross-kernel-4.2.1-4.2.1+csl- 
arm-2007q3-53-r0/image$ find . | grep bin
./OE/tentacle/build/tmp-angstrom_2010_x-eglibc/sysroots/x86_64-linux/ 
usr/bin
./OE/tentacle/build/tmp-angstrom_2010_x-eglibc/sysroots/x86_64-linux/ 
usr/bin/armv7a-angstrom-linux-gnueabi.gcc-cross-kernel-4.2.1
./OE/tentacle/build/tmp-angstrom_2010_x-eglibc/sysroots/x86_64-linux/ 
usr/bin/armv7a-angstrom-linux-gnueabi.gcc-cross-kernel-4.2.1/arm- 
angstrom-linux-gnueabi-gcov
./OE/tentacle/build/tmp-angstrom_2010_x-eglibc/sysroots/x86_64-linux/ 
usr/bin/armv7a-angstrom-linux-gnueabi.gcc-cross-kernel-4.2.1/arm- 
angstrom-linux-gnueabi-gccbug
./OE/tentacle/build/tmp-angstrom_2010_x-eglibc/sysroots/x86_64-linux/ 
usr/bin/arm-angstrom-linux-gnueabi-gcc-4.2.1+csl-arm-2007q3-53

But when I do 'MACHINE=archos5 bitbake virtual/kernel -c compile' I get:

| + make -j4 zImage 'CC=ccache arm-angstrom-linux-gnueabi- 
gcc-4.2.1+csl-arm-2007q3-53  -mno-thumb-interwork -mno-thumb -- 
sysroot=/OE/tentacle/build/tmp-angstrom_2010_x-eglibc/sysroots/ 
archos5' 'LD=arm-angstrom-linux-gnueabi-ld --sysroot=/OE/tentacle/ 
build/tmp-angstrom_2010_x-eglibc/sysroots/archos5  --sysroot=/OE/ 
tentacle/build/tmp-angstrom_2010_x-eglibc/sysroots/archos5'
| arm-angstrom-linux-gnueabi-gcc-4.2.1+csl-arm-2007q3-53: No such file  
or directory

And I can't find arm-angstrom-linux-gnueabi-gcc-4.2.1+csl- 
arm-2007q3-53 in sysroots.  When looking at WORKDIR for the gcc:

koen@dominion:/OE/tentacle/build/tmp-angstrom_2010_x-eglibc/work/ 
armv7a-angstrom-linux-gnueabi/gcc-cross-kernel-4.2.1-4.2.1+csl- 
arm-2007q3-53-r0$ find sysroot-destdir/ | grep bin
sysroot-destdir/OE/tentacle/build/tmp-angstrom_2010_x-eglibc/sysroots/ 
x86_64-linux/usr/bin
sysroot-destdir/OE/tentacle/build/tmp-angstrom_2010_x-eglibc/sysroots/ 
x86_64-linux/usr/bin/armv7a-angstrom-linux-gnueabi.gcc-cross- 
kernel-4.2.1
sysroot-destdir/OE/tentacle/build/tmp-angstrom_2010_x-eglibc/sysroots/ 
x86_64-linux/usr/bin/armv7a-angstrom-linux-gnueabi.gcc-cross- 
kernel-4.2.1/arm-angstrom-linux-gnueabi-gcov
sysroot-destdir/OE/tentacle/build/tmp-angstrom_2010_x-eglibc/sysroots/ 
x86_64-linux/usr/bin/armv7a-angstrom-linux-gnueabi.gcc-cross- 
kernel-4.2.1/arm-angstrom-linux-gnueabi-gccbug

So that's missing the arm-angstrom-linux-gnueabi-gcc-4.2.1+csl- 
arm-2007q3-53 that's actually needed. Does anyone (RP?) know if gcc- 
cross-kernel.inc has been kept upto date with all the toolchain changes?

regards,

Koen



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: gcc-cross-kernel problems
  2011-06-25 20:38 gcc-cross-kernel problems Koen Kooi
@ 2011-06-26  2:30 ` Khem Raj
  2011-06-26  9:18   ` Khem Raj
  2011-06-26 15:05   ` Khem Raj
  0 siblings, 2 replies; 13+ messages in thread
From: Khem Raj @ 2011-06-26  2:30 UTC (permalink / raw)
  To: openembedded-core

On 6/25/2011 1:38 PM, Koen Kooi wrote:
> Hi,
>
> I was spending some spare cycles on
> https://github.com/koenkooi/meta-archos and wanted to build the 2.6.22
> vendor kernel first before trying to the 3.0rc working and I need to use
> csl 2007q3 as gcc-cross-kernel due to bugs in the kernel.
>
> I imported the 2008q1 recipes from OE-core, then changed the SRC_URI to
> have the patches from the 2007q3 recipe in OE classic. It uses the .inc
> files from OE-core. It builds and gives me:
>
> koen@dominion:/OE/tentacle/build/tmp-angstrom_2010_x-eglibc/work/armv7a-angstrom-linux-gnueabi/gcc-cross-kernel-4.2.1-4.2.1+csl-arm-2007q3-53-r0/image$
> find . | grep bin
> ./OE/tentacle/build/tmp-angstrom_2010_x-eglibc/sysroots/x86_64-linux/usr/bin
>
> ./OE/tentacle/build/tmp-angstrom_2010_x-eglibc/sysroots/x86_64-linux/usr/bin/armv7a-angstrom-linux-gnueabi.gcc-cross-kernel-4.2.1
>
> ./OE/tentacle/build/tmp-angstrom_2010_x-eglibc/sysroots/x86_64-linux/usr/bin/armv7a-angstrom-linux-gnueabi.gcc-cross-kernel-4.2.1/arm-angstrom-linux-gnueabi-gcov
>
> ./OE/tentacle/build/tmp-angstrom_2010_x-eglibc/sysroots/x86_64-linux/usr/bin/armv7a-angstrom-linux-gnueabi.gcc-cross-kernel-4.2.1/arm-angstrom-linux-gnueabi-gccbug
>
> ./OE/tentacle/build/tmp-angstrom_2010_x-eglibc/sysroots/x86_64-linux/usr/bin/arm-angstrom-linux-gnueabi-gcc-4.2.1+csl-arm-2007q3-53
>
>
> But when I do 'MACHINE=archos5 bitbake virtual/kernel -c compile' I get:
>
> | + make -j4 zImage 'CC=ccache
> arm-angstrom-linux-gnueabi-gcc-4.2.1+csl-arm-2007q3-53
> -mno-thumb-interwork -mno-thumb
> --sysroot=/OE/tentacle/build/tmp-angstrom_2010_x-eglibc/sysroots/archos5' 'LD=arm-angstrom-linux-gnueabi-ld
> --sysroot=/OE/tentacle/build/tmp-angstrom_2010_x-eglibc/sysroots/archos5
> --sysroot=/OE/tentacle/build/tmp-angstrom_2010_x-eglibc/sysroots/archos5'
> | arm-angstrom-linux-gnueabi-gcc-4.2.1+csl-arm-2007q3-53: No such file
> or directory
>
> And I can't find arm-angstrom-linux-gnueabi-gcc-4.2.1+csl-arm-2007q3-53
> in sysroots. When looking at WORKDIR for the gcc:
>
> koen@dominion:/OE/tentacle/build/tmp-angstrom_2010_x-eglibc/work/armv7a-angstrom-linux-gnueabi/gcc-cross-kernel-4.2.1-4.2.1+csl-arm-2007q3-53-r0$
> find sysroot-destdir/ | grep bin
> sysroot-destdir/OE/tentacle/build/tmp-angstrom_2010_x-eglibc/sysroots/x86_64-linux/usr/bin
>
> sysroot-destdir/OE/tentacle/build/tmp-angstrom_2010_x-eglibc/sysroots/x86_64-linux/usr/bin/armv7a-angstrom-linux-gnueabi.gcc-cross-kernel-4.2.1
>
> sysroot-destdir/OE/tentacle/build/tmp-angstrom_2010_x-eglibc/sysroots/x86_64-linux/usr/bin/armv7a-angstrom-linux-gnueabi.gcc-cross-kernel-4.2.1/arm-angstrom-linux-gnueabi-gcov
>
> sysroot-destdir/OE/tentacle/build/tmp-angstrom_2010_x-eglibc/sysroots/x86_64-linux/usr/bin/armv7a-angstrom-linux-gnueabi.gcc-cross-kernel-4.2.1/arm-angstrom-linux-gnueabi-gccbug
>
>
> So that's missing the
> arm-angstrom-linux-gnueabi-gcc-4.2.1+csl-arm-2007q3-53 that's actually
> needed.

in oe-core we munge CROSS_TARGET_SYS_DIR and append PN to it, this 
should be considered in gcc-cross-kernel.inc

you need couple of changes

change the install command like below in gcc-cross-kernel.inc

install -m 0755 xgcc 
${D}${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}gcc-${PV}

secondly you need to inform kernel recipe of this new location of toolchain

so in you kernel recipe somewhere patch the below code

PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}.gcc-cross-kernel:"

Thanks

-Khem



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: gcc-cross-kernel problems
  2011-06-26  2:30 ` Khem Raj
@ 2011-06-26  9:18   ` Khem Raj
  2011-06-26 10:16     ` Koen Kooi
  2011-06-26 15:05   ` Khem Raj
  1 sibling, 1 reply; 13+ messages in thread
From: Khem Raj @ 2011-06-26  9:18 UTC (permalink / raw)
  To: openembedded-core

On Sat, Jun 25, 2011 at 7:30 PM, Khem Raj <raj.khem@gmail.com> wrote:
> change the install command like below in gcc-cross-kernel.inc
>
> install -m 0755 xgcc
> ${D}${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}gcc-${PV}
>
>

here probably

install -m 0755 xgcc  ${D}${bindir}/${TARGET_PREFIX}gcc-${PV}

is needed instead



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: gcc-cross-kernel problems
  2011-06-26  9:18   ` Khem Raj
@ 2011-06-26 10:16     ` Koen Kooi
  0 siblings, 0 replies; 13+ messages in thread
From: Koen Kooi @ 2011-06-26 10:16 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer


Op 26 jun 2011, om 11:18 heeft Khem Raj het volgende geschreven:

> On Sat, Jun 25, 2011 at 7:30 PM, Khem Raj <raj.khem@gmail.com> wrote:
>> change the install command like below in gcc-cross-kernel.inc
>> 
>> install -m 0755 xgcc
>> ${D}${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}gcc-${PV}
>> 
>> 
> 
> here probably
> 
> install -m 0755 xgcc  ${D}${bindir}/${TARGET_PREFIX}gcc-${PV}
> 
> is needed instead

Thanks, that gets it into sysroots:

koen@dominion:/OE/tentacle/build/tmp-angstrom_2010_x-eglibc/deploy$ find ../sysroots/ | grep 2007q3
../sysroots/x86_64-linux/usr/bin/armv7a-angstrom-linux-gnueabi.gcc-cross-kernel-4.2.1/arm-angstrom-linux-gnueabi-gcc-4.2.1+csl-arm-2007q3-53

It isn't in PATH yet, but it's progress :)


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: gcc-cross-kernel problems
  2011-06-26  2:30 ` Khem Raj
  2011-06-26  9:18   ` Khem Raj
@ 2011-06-26 15:05   ` Khem Raj
  2011-06-27  9:32     ` Koen Kooi
  1 sibling, 1 reply; 13+ messages in thread
From: Khem Raj @ 2011-06-26 15:05 UTC (permalink / raw)
  To: openembedded-core

On 06/25/2011 07:30 PM, Khem Raj wrote:
> so in you kernel recipe somewhere patch the below code
>
> PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}.gcc-cross-kernel:"

I guess it has 4.2.1 in the path for you as I see so you might need

PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}.gcc-cross-kernel-4.2.1:"

-Khem



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: gcc-cross-kernel problems
  2011-06-26 15:05   ` Khem Raj
@ 2011-06-27  9:32     ` Koen Kooi
  2011-06-27  9:42       ` Phil Blundell
  0 siblings, 1 reply; 13+ messages in thread
From: Koen Kooi @ 2011-06-27  9:32 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer


Op 26 jun 2011, om 17:05 heeft Khem Raj het volgende geschreven:

> On 06/25/2011 07:30 PM, Khem Raj wrote:
>> so in you kernel recipe somewhere patch the below code
>> 
>> PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}.gcc-cross-kernel:"
> 
> I guess it has 4.2.1 in the path for you as I see so you might need
> 
> PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}.gcc-cross-kernel-4.2.1:"

I did it a bit differently and symlinked it into the regular toolchain bin and I not get an 'as' error about '-EL' not being a valid option.It looks like gcc is calling an unprefixed 'as'. Is this due to gcc-cross-kernel being bitrotted, the recipe missing patches or something else?

regards,

Koen





^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: gcc-cross-kernel problems
  2011-06-27  9:32     ` Koen Kooi
@ 2011-06-27  9:42       ` Phil Blundell
  2011-06-27 10:07         ` Koen Kooi
  0 siblings, 1 reply; 13+ messages in thread
From: Phil Blundell @ 2011-06-27  9:42 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Mon, 2011-06-27 at 11:32 +0200, Koen Kooi wrote:
> Op 26 jun 2011, om 17:05 heeft Khem Raj het volgende geschreven:
> 
> > On 06/25/2011 07:30 PM, Khem Raj wrote:
> >> so in you kernel recipe somewhere patch the below code
> >> 
> >> PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}.gcc-cross-kernel:"
> > 
> > I guess it has 4.2.1 in the path for you as I see so you might need
> > 
> > PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}.gcc-cross-kernel-4.2.1:"
> 
> I did it a bit differently and symlinked it into the regular toolchain bin and I not get an 'as' error about '-EL' not being a valid option.It looks like gcc is calling an unprefixed 'as'. Is this due to gcc-cross-kernel being bitrotted, the recipe missing patches or something else?

That usually means that the cross as hasn't been installed/symlinked
into the place where gcc expects to find it.  The way the gcc driver
locates the assembler is by searching for "as" in various different
directories.  In particular, despite what you might expect it doesn't
ever look for $TARGET_SYS-as in $bindir or anywhere else.

Usually it will expect to find as in
$libexecdir/gcc/$TARGET_SYS/4.2.1/as or some such path.  The symlinks in
that directory are created as part of the gcc installation process.  You
can strace gcc to find out where it's actually looking.

p.





^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: gcc-cross-kernel problems
  2011-06-27  9:42       ` Phil Blundell
@ 2011-06-27 10:07         ` Koen Kooi
  2011-06-27 10:20           ` Phil Blundell
  0 siblings, 1 reply; 13+ messages in thread
From: Koen Kooi @ 2011-06-27 10:07 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer


Op 27 jun 2011, om 11:42 heeft Phil Blundell het volgende geschreven:

> On Mon, 2011-06-27 at 11:32 +0200, Koen Kooi wrote:
>> Op 26 jun 2011, om 17:05 heeft Khem Raj het volgende geschreven:
>> 
>>> On 06/25/2011 07:30 PM, Khem Raj wrote:
>>>> so in you kernel recipe somewhere patch the below code
>>>> 
>>>> PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}.gcc-cross-kernel:"
>>> 
>>> I guess it has 4.2.1 in the path for you as I see so you might need
>>> 
>>> PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}.gcc-cross-kernel-4.2.1:"
>> 
>> I did it a bit differently and symlinked it into the regular toolchain bin and I not get an 'as' error about '-EL' not being a valid option.It looks like gcc is calling an unprefixed 'as'. Is this due to gcc-cross-kernel being bitrotted, the recipe missing patches or something else?
> 
> That usually means that the cross as hasn't been installed/symlinked
> into the place where gcc expects to find it.  The way the gcc driver
> locates the assembler is by searching for "as" in various different
> directories.  In particular, despite what you might expect it doesn't
> ever look for $TARGET_SYS-as in $bindir or anywhere else.
> 
> Usually it will expect to find as in
> $libexecdir/gcc/$TARGET_SYS/4.2.1/as or some such path.  The symlinks in
> that directory are created as part of the gcc installation process.  You
> can strace gcc to find out where it's actually looking.

It seems to be looking at these directories:

stat("/OE/tentacle/build/tmp-angstrom_2010_x-eglibc/sysroots/x86_64-linux/usr/libexec/armv7a-angstrom-linux-gnueabi.gcc-cross-kernel/gcc/arm-angstrom-linux-gnueabi/4.2.1/as", 0x7fff13f2f110) = -1 ENOENT (No such file or directory)
stat("/OE/tentacle/build/tmp-angstrom_2010_x-eglibc/sysroots/x86_64-linux/usr/libexec/armv7a-angstrom-linux-gnueabi.gcc-cross-kernel/gcc/arm-angstrom-linux-gnueabi/4.2.1/as", 0x7fff13f2f110) = -1 ENOENT (No such file or directory)
stat("/OE/tentacle/build/tmp-angstrom_2010_x-eglibc/sysroots/x86_64-linux/usr/libexec/armv7a-angstrom-linux-gnueabi.gcc-cross-kernel/gcc/arm-angstrom-linux-gnueabi/as", 0x7fff13f2f110) = -1 ENOENT (No such file or directory)
stat("/OE/tentacle/build/tmp-angstrom_2010_x-eglibc/sysroots/x86_64-linux/usr/lib/armv7a-angstrom-linux-gnueabi.gcc-cross-kernel/gcc/arm-angstrom-linux-gnueabi/4.2.1/as", 0x7fff13f2f110) = -1 ENOENT (No such file or directory)
stat("/OE/tentacle/build/tmp-angstrom_2010_x-eglibc/sysroots/x86_64-linux/usr/lib/armv7a-angstrom-linux-gnueabi.gcc-cross-kernel/gcc/arm-angstrom-linux-gnueabi/as", 0x7fff13f2f110) = -1 ENOENT (No such file or directory)
stat("/OE/tentacle/build/tmp-angstrom_2010_x-eglibc/sysroots/x86_64-linux/usr/lib/armv7a-angstrom-linux-gnueabi.gcc-cross-kernel/gcc/arm-angstrom-linux-gnueabi/4.2.1/../../../../../arm-angstrom-linux-gnueabi/bin/arm-angstrom-linux-gnueabi/4.2.1/as", 0x7fff13f2f110) = -1 ENOENT (No such file or directory)
stat("/OE/tentacle/build/tmp-angstrom_2010_x-eglibc/sysroots/x86_64-linux/usr/lib/armv7a-angstrom-linux-gnueabi.gcc-cross-kernel/gcc/arm-angstrom-linux-gnueabi/4.2.1/../../../../../arm-angstrom-linux-gnueabi/bin/as", 0x7fff13f2f110) = -1 ENOENT (No such file or directory)

In the first one only cc1 and collect are present. What would be the best way to fix this?





^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: gcc-cross-kernel problems
  2011-06-27 10:07         ` Koen Kooi
@ 2011-06-27 10:20           ` Phil Blundell
  2011-06-27 15:35             ` Koen Kooi
  2011-06-27 20:15             ` Khem Raj
  0 siblings, 2 replies; 13+ messages in thread
From: Phil Blundell @ 2011-06-27 10:20 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Mon, 2011-06-27 at 12:07 +0200, Koen Kooi wrote:
> In the first one only cc1 and collect are present. What would be the best way to fix this?

It seems that gcc-package-cross.inc is doing this by steam for the
regular cross compiler.  See this code from do_install():

	# Insert symlinks into libexec so when tools without a prefix are searched for, the correct ones are
	# found. These need to be relative paths so they work in different locations.
	dest=${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/
	install -d $dest
	for t in ar as ld nm objcopy objdump ranlib strip g77 gcc cpp gfortran; do
		ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t $dest$t
		ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t ${dest}${TARGET_PREFIX}$t
	done

So I guess you could copy that into gcc-cross-kernel or arrange for the
two recipes to share more stuff.  Really, the only difference between
gcc-cross-kernel and regular gcc-cross should be that the former doesn't
install itself as ${TARGET_SYS}-gcc in the sysroot bindir.

p.





^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: gcc-cross-kernel problems
  2011-06-27 10:20           ` Phil Blundell
@ 2011-06-27 15:35             ` Koen Kooi
  2011-06-27 20:15             ` Khem Raj
  1 sibling, 0 replies; 13+ messages in thread
From: Koen Kooi @ 2011-06-27 15:35 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer


Op 27 jun 2011, om 12:20 heeft Phil Blundell het volgende geschreven:

> On Mon, 2011-06-27 at 12:07 +0200, Koen Kooi wrote:
>> In the first one only cc1 and collect are present. What would be the best way to fix this?
> 
> It seems that gcc-package-cross.inc is doing this by steam for the
> regular cross compiler.  See this code from do_install():
> 
> 	# Insert symlinks into libexec so when tools without a prefix are searched for, the correct ones are
> 	# found. These need to be relative paths so they work in different locations.
> 	dest=${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/
> 	install -d $dest
> 	for t in ar as ld nm objcopy objdump ranlib strip g77 gcc cpp gfortran; do
> 		ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t $dest$t
> 		ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t ${dest}${TARGET_PREFIX}$t
> 	done
> 
> So I guess you could copy that into gcc-cross-kernel or arrange for the
> two recipes to share more stuff.  Really, the only difference between
> gcc-cross-kernel and regular gcc-cross should be that the former doesn't
> install itself as ${TARGET_SYS}-gcc in the sysroot bindir.

That, combined with PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}.gcc-cross-kernel-4.2.1:" in the recipe makes it work, thanks! I"ll send an updated patch for gcc-cross-kernel.inc soon.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: gcc-cross-kernel problems
  2011-06-27 10:20           ` Phil Blundell
  2011-06-27 15:35             ` Koen Kooi
@ 2011-06-27 20:15             ` Khem Raj
  2011-06-27 20:41               ` Phil Blundell
  1 sibling, 1 reply; 13+ messages in thread
From: Khem Raj @ 2011-06-27 20:15 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Mon, Jun 27, 2011 at 3:20 AM, Phil Blundell <pb@pbcl.net> wrote:
> On Mon, 2011-06-27 at 12:07 +0200, Koen Kooi wrote:
>> In the first one only cc1 and collect are present. What would be the best way to fix this?
>
> It seems that gcc-package-cross.inc is doing this by steam for the
> regular cross compiler.  See this code from do_install():
>
>        # Insert symlinks into libexec so when tools without a prefix are searched for, the correct ones are
>        # found. These need to be relative paths so they work in different locations.
>        dest=${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/
>        install -d $dest
>        for t in ar as ld nm objcopy objdump ranlib strip g77 gcc cpp gfortran; do
>                ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t $dest$t
>                ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t ${dest}${TARGET_PREFIX}$t
>        done
>
> So I guess you could copy that into gcc-cross-kernel or arrange for the
> two recipes to share more stuff.  Really, the only difference between
> gcc-cross-kernel and regular gcc-cross should be that the former doesn't
> install itself as ${TARGET_SYS}-gcc in the sysroot bindir.

you need to include gcc-package-cross.inc using

require gcc-package-cross.inc

in the newly added gcc-cross-kernel_csl-arm-2007q3.bb
and all should be set.

>
> p.
>
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: gcc-cross-kernel problems
  2011-06-27 20:15             ` Khem Raj
@ 2011-06-27 20:41               ` Phil Blundell
  2011-06-27 21:09                 ` Khem Raj
  0 siblings, 1 reply; 13+ messages in thread
From: Phil Blundell @ 2011-06-27 20:41 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Mon, 2011-06-27 at 13:15 -0700, Khem Raj wrote:
> you need to include gcc-package-cross.inc using
> 
> require gcc-package-cross.inc
> 
> in the newly added gcc-cross-kernel_csl-arm-2007q3.bb
> and all should be set.

That'll cause it to install "gcc" into the sysroot though, right?  I
guess you could use a do_install_append to blow it away again, maybe
that wouldn't be so awful.

p.





^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: gcc-cross-kernel problems
  2011-06-27 20:41               ` Phil Blundell
@ 2011-06-27 21:09                 ` Khem Raj
  0 siblings, 0 replies; 13+ messages in thread
From: Khem Raj @ 2011-06-27 21:09 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Mon, Jun 27, 2011 at 1:41 PM, Phil Blundell <pb@pbcl.net> wrote:
> On Mon, 2011-06-27 at 13:15 -0700, Khem Raj wrote:
>> you need to include gcc-package-cross.inc using
>>
>> require gcc-package-cross.inc
>>
>> in the newly added gcc-cross-kernel_csl-arm-2007q3.bb
>> and all should be set.
>
> That'll cause it to install "gcc" into the sysroot though, right?  I
> guess you could use a do_install_append to blow it away again, maybe
> that wouldn't be so awful.

hmm the purpose of gcc-cross-kernel.inc is to override do_install
thats in gcc-package-cross.inc
I was trying to avoid duplication of code but you are right if the
symlinking part is done in do_install_append() then we can avoid the
duplication and still provide special do_install for
gcc-cross-kernel. But I think now a days gcc-cross-kernel is out of fashion

So I am ok with the patch Koen proposed based on your suggestion.

>
> p.
>
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>



^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2011-06-27 21:13 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-25 20:38 gcc-cross-kernel problems Koen Kooi
2011-06-26  2:30 ` Khem Raj
2011-06-26  9:18   ` Khem Raj
2011-06-26 10:16     ` Koen Kooi
2011-06-26 15:05   ` Khem Raj
2011-06-27  9:32     ` Koen Kooi
2011-06-27  9:42       ` Phil Blundell
2011-06-27 10:07         ` Koen Kooi
2011-06-27 10:20           ` Phil Blundell
2011-06-27 15:35             ` Koen Kooi
2011-06-27 20:15             ` Khem Raj
2011-06-27 20:41               ` Phil Blundell
2011-06-27 21:09                 ` Khem Raj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.