public inbox for gentoo-embedded@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-embedded] Building Crosscompiler for Embedded System
@ 2006-03-06  9:35 Lutz Schönemann
  2006-03-06 14:16 ` Mike Frysinger
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Lutz Schönemann @ 2006-03-06  9:35 UTC (permalink / raw
  To: gentoo-embedded

Hi,
I've problems building an working Cross-Compiler to use it for an i386 
embedded system. Until now I've tried the following two things:

- Using crossdev:
The crossdev script worked fine and installed the whole toolchain 
(stage4: binutils, gcc, linux-headers, etc.). The trouble is that when I 
want to merge a packege with this compiler (e.g.: CFLAGS="-arch=i386" 
ROOT=/tmp/cross/ CHOST=i386-unknown-linux-gnu emerge sys-boot/syslinux) 
it ends up with the message that the compiler is unable to build 
executables.

- Building toolchain manually:
I tried to build a crosscompile-toolchain manually following this HOWTO:
http://dev.gentoo.org/~vapier/CROSS-COMPILE-HOWTO
I have done every step and no errors until step 5. The merge process 
terminated with this message:

grep: ${top_srcdir}/../gcc/version.c: No such file or directory
/usr/i386-unknown-linux-gnu/bin/ld: crt1.o: No such file: No such file 
or directory
collect2: ld returned 1 exit status
configure: error: unknown endianess - sorry

All the Warnings/Errors I have pasted at: 
http://nopaste.easy-coding.de/?id=404


Thanks for help

Lutz Schönemann

-- 
gentoo-embedded@gentoo.org mailing list



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

* Re: [gentoo-embedded] Building Crosscompiler for Embedded System
  2006-03-06  9:35 [gentoo-embedded] Building Crosscompiler for Embedded System Lutz Schönemann
@ 2006-03-06 14:16 ` Mike Frysinger
  2006-03-06 14:43   ` Lutz Schönemann
  2006-03-06 19:14 ` Kevin F. Quinn (Gentoo)
  2006-03-07 16:27 ` Stanisław Raczyński
  2 siblings, 1 reply; 8+ messages in thread
From: Mike Frysinger @ 2006-03-06 14:16 UTC (permalink / raw
  To: gentoo-embedded; +Cc: Lutz Schönemann

On Monday 06 March 2006 04:35, Lutz Schönemann wrote:
> - Building toolchain manually:

building the toolchain manually wont solve any problems you mentioned when 
using crossdev, so dont waste your time
-mike

-- 
gentoo-embedded@gentoo.org mailing list



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

* Re: [gentoo-embedded] Building Crosscompiler for Embedded System
  2006-03-06 14:16 ` Mike Frysinger
@ 2006-03-06 14:43   ` Lutz Schönemann
  2006-03-06 14:50     ` Mike Frysinger
  0 siblings, 1 reply; 8+ messages in thread
From: Lutz Schönemann @ 2006-03-06 14:43 UTC (permalink / raw
  To: Mike Frysinger; +Cc: gentoo-embedded

Have you any hints how to solve the problem that the configure-script 
returns the error-msg that the gcc isn't able to create executables?

Lutz

Mike Frysinger wrote:
> On Monday 06 March 2006 04:35, Lutz Schönemann wrote:
> 
>>- Building toolchain manually:
> 
> 
> building the toolchain manually wont solve any problems you mentioned when 
> using crossdev, so dont waste your time
> -mike
> 


-- 
Lutz Schönemann

Addr:	Fraunhofer Institut für Sichere Informations Technologie SIT
	Rheinstrasse 75, 64295 Darmstadt, Germany
WWW:	http://www.sit.fraunhofer.de

Zertifizierungen in der FhG: http://pki.fraunhofer.de
-- 
gentoo-embedded@gentoo.org mailing list



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

* Re: [gentoo-embedded] Building Crosscompiler for Embedded System
  2006-03-06 14:43   ` Lutz Schönemann
@ 2006-03-06 14:50     ` Mike Frysinger
  0 siblings, 0 replies; 8+ messages in thread
From: Mike Frysinger @ 2006-03-06 14:50 UTC (permalink / raw
  To: Lutz Schönemann; +Cc: gentoo-embedded

On Monday 06 March 2006 09:43, Lutz Schönemann wrote:
> Have you any hints how to solve the problem that the configure-script
> returns the error-msg that the gcc isn't able to create executables?

you said it worked when you used crossdev right ?
-mike

-- 
gentoo-embedded@gentoo.org mailing list



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

* Re: [gentoo-embedded] Building Crosscompiler for Embedded System
  2006-03-06  9:35 [gentoo-embedded] Building Crosscompiler for Embedded System Lutz Schönemann
  2006-03-06 14:16 ` Mike Frysinger
@ 2006-03-06 19:14 ` Kevin F. Quinn (Gentoo)
  2006-03-07 12:42   ` Lutz Schönemann
  2006-03-07 16:27 ` Stanisław Raczyński
  2 siblings, 1 reply; 8+ messages in thread
From: Kevin F. Quinn (Gentoo) @ 2006-03-06 19:14 UTC (permalink / raw
  To: gentoo-embedded

[-- Attachment #1: Type: text/plain, Size: 1121 bytes --]

On Mon, 06 Mar 2006 10:35:10 +0100
Lutz Schönemann <lutz.schoenemann@sit.fraunhofer.de> wrote:

> Hi,
> I've problems building an working Cross-Compiler to use it for an
> i386 embedded system. Until now I've tried the following two things:
> 
> - Using crossdev:
> The crossdev script worked fine and installed the whole toolchain 
> (stage4: binutils, gcc, linux-headers, etc.). The trouble is that
> when I want to merge a packege with this compiler (e.g.:
> CFLAGS="-arch=i386" ROOT=/tmp/cross/ CHOST=i386-unknown-linux-gnu
> emerge sys-boot/syslinux) it ends up with the message that the
> compiler is unable to build executables.

Just in case that wasn't a typo in transcription - you need
CFLAGS="-march=i386" (with an 'm').  You should look at the config.log
etc to find out exactly why the compiler couldn't build executables.

BTW again just in case - if your host is an x86 system, you don't need a
cross-compiler as your host compiler can build for all x86 variants -
it's enough to get the CFLAGS right; e.g.

CFLAGS="-march=i386" ROOT=/tmp/cross emerge <pkg>

-- 
Kevin F. Quinn

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 191 bytes --]

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

* Re: [gentoo-embedded] Building Crosscompiler for Embedded System
  2006-03-06 19:14 ` Kevin F. Quinn (Gentoo)
@ 2006-03-07 12:42   ` Lutz Schönemann
  0 siblings, 0 replies; 8+ messages in thread
From: Lutz Schönemann @ 2006-03-07 12:42 UTC (permalink / raw
  To: gentoo-embedded

Oh, okay, that worked. But I'm not shure if the created code is realy 
for use with i386 CPUs. I compiled syslinux and GRUB and nothing seems 
to work on the used system (e.g. GRUB only shows up his name at power on 
and nothing more happens).

Lutz

Kevin F. Quinn (Gentoo) wrote:
> On Mon, 06 Mar 2006 10:35:10 +0100
> Lutz Schönemann <lutz.schoenemann@sit.fraunhofer.de> wrote:
> 
> 
>>Hi,
>>I've problems building an working Cross-Compiler to use it for an
>>i386 embedded system. Until now I've tried the following two things:
>>
>>- Using crossdev:
>>The crossdev script worked fine and installed the whole toolchain 
>>(stage4: binutils, gcc, linux-headers, etc.). The trouble is that
>>when I want to merge a packege with this compiler (e.g.:
>>CFLAGS="-arch=i386" ROOT=/tmp/cross/ CHOST=i386-unknown-linux-gnu
>>emerge sys-boot/syslinux) it ends up with the message that the
>>compiler is unable to build executables.
> 
> 
> Just in case that wasn't a typo in transcription - you need
> CFLAGS="-march=i386" (with an 'm').  You should look at the config.log
> etc to find out exactly why the compiler couldn't build executables.
> 
> BTW again just in case - if your host is an x86 system, you don't need a
> cross-compiler as your host compiler can build for all x86 variants -
> it's enough to get the CFLAGS right; e.g.
> 
> CFLAGS="-march=i386" ROOT=/tmp/cross emerge <pkg>
> 


-- 
Lutz Schönemann

Addr:	Fraunhofer Institut für Sichere Informations Technologie SIT
	Rheinstrasse 75, 64295 Darmstadt, Germany
WWW:	http://www.sit.fraunhofer.de

Zertifizierungen in der FhG: http://pki.fraunhofer.de
-- 
gentoo-embedded@gentoo.org mailing list



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

* Re: [gentoo-embedded] Building Crosscompiler for Embedded System
  2006-03-06  9:35 [gentoo-embedded] Building Crosscompiler for Embedded System Lutz Schönemann
  2006-03-06 14:16 ` Mike Frysinger
  2006-03-06 19:14 ` Kevin F. Quinn (Gentoo)
@ 2006-03-07 16:27 ` Stanisław Raczyński
  2006-03-08  5:31   ` Mike Frysinger
  2 siblings, 1 reply; 8+ messages in thread
From: Stanisław Raczyński @ 2006-03-07 16:27 UTC (permalink / raw
  To: gentoo-embedded

You might want to read a small howto I've created as documentation to my 
group project at a university 
(http://www.eti.pg.gda.pl/katedry/ksa/pracownicy/Stanislaw.Raczynski//embedded_gentoo_on_kb92xx_howto.pdf), 
sections 2, 3 and appendices. Perhaps it will give you some ideas. 
Beware though, it is incomplete and a bit chaotic.

Best wishes,
Stanislaw Raczynski

Lutz Schönemann wrote:

> Hi,
> I've problems building an working Cross-Compiler to use it for an i386 
> embedded system. Until now I've tried the following two things:
>
> - Using crossdev:
> The crossdev script worked fine and installed the whole toolchain 
> (stage4: binutils, gcc, linux-headers, etc.). The trouble is that when 
> I want to merge a packege with this compiler (e.g.: 
> CFLAGS="-arch=i386" ROOT=/tmp/cross/ CHOST=i386-unknown-linux-gnu 
> emerge sys-boot/syslinux) it ends up with the message that the 
> compiler is unable to build executables.
>
> - Building toolchain manually:
> I tried to build a crosscompile-toolchain manually following this HOWTO:
> http://dev.gentoo.org/~vapier/CROSS-COMPILE-HOWTO
> I have done every step and no errors until step 5. The merge process 
> terminated with this message:
>
> grep: ${top_srcdir}/../gcc/version.c: No such file or directory
> /usr/i386-unknown-linux-gnu/bin/ld: crt1.o: No such file: No such file 
> or directory
> collect2: ld returned 1 exit status
> configure: error: unknown endianess - sorry
>
> All the Warnings/Errors I have pasted at: 
> http://nopaste.easy-coding.de/?id=404
>
>
> Thanks for help
>
> Lutz Schönemann
>

-- 
gentoo-embedded@gentoo.org mailing list



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

* Re: [gentoo-embedded] Building Crosscompiler for Embedded System
  2006-03-07 16:27 ` Stanisław Raczyński
@ 2006-03-08  5:31   ` Mike Frysinger
  0 siblings, 0 replies; 8+ messages in thread
From: Mike Frysinger @ 2006-03-08  5:31 UTC (permalink / raw
  To: gentoo-embedded; +Cc: Stanisław Raczyński

On Tuesday 07 March 2006 11:27, Stanisław Raczyński wrote:
> You might want to read a small howto I've created as documentation to my
> group project at a university

1.1: you dont actually need a Gentoo host ... you could do it all in a chroot 
using an os that supports linux emulation (or more commonly, another linux 
distro)

2: the text explaining crossdev's -t option scrolls off the page for me ... 
maybe just bum font ... also, small grammar corrections:
"though it still haven't" -> "though it still hasn't"
"To create full" -> "To create a full"

3: "packages into target root" -> "packages into the target root"
"several variables more" -> "several more variables"
"You can tweak" -> "You should tweak" (often host CFLAGS contains invalid 
-march/-mcpu settings for the target)

4.3: you should advise people to change CROSS_COMPILE to whatever they set 
their CHOST to and whatever they passed to crossdev (plus the trailing -)

5.1.4: the dietlibc example is screwed up

5.3: if you have people add 'noman nodoc noinfo' to their FEATURES in aemerge, 
that'll automatically cut out a lot of documentation
the staging dir is mentioned as "/opt/arm/stage" when earlier you said it was 
"/var/tmp/cross/arm"

hope that helps
-mike

-- 
gentoo-embedded@gentoo.org mailing list



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

end of thread, other threads:[~2006-03-08  5:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-06  9:35 [gentoo-embedded] Building Crosscompiler for Embedded System Lutz Schönemann
2006-03-06 14:16 ` Mike Frysinger
2006-03-06 14:43   ` Lutz Schönemann
2006-03-06 14:50     ` Mike Frysinger
2006-03-06 19:14 ` Kevin F. Quinn (Gentoo)
2006-03-07 12:42   ` Lutz Schönemann
2006-03-07 16:27 ` Stanisław Raczyński
2006-03-08  5:31   ` Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox