FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo Embedded

 
 
LinkBack Thread Tools
 
Old 01-04-2011, 08:17 PM
Mike Frysinger
 
Default CBUILD= HOSTCC=-gcc

On Monday, January 03, 2011 07:17:35 Christoph Spielmann wrote:
> Am 03.01.2011 10:21, schrieb Kfir Lavi:
> > On Sun, Jan 2, 2011 at 9:31 PM, Mike Frysinger wrote:
> > On Sunday, January 02, 2011 13:59:43 Peter Stuge wrote:
> > > Kfir Lavi wrote:
> > > > crossdev i686-gentoo.edge-linux-gnu
> > > > CBUILD=i686-pc-linux-gnu
> > >
> > > I'm pretty sure you should use i686-pc-linux-gnu as the crossdev
> > > tuple then. I don't think making up arbitrary tuples works.
> >
> > (gentoo.edge)
> >
> > the vendor field is supposed to be arbitrary and the only char
> > that should
> > cause a split is a "-". not that we test every char though, so
> > there might be
> > bugs sitting around that most people dont notice.
> >
> > I tried it again running
> > crossdev i686-gentoo-linux-gnu
>
> Once again, wrong vendor field: It really should be i686-pc-linux-gnu as
> Mike suggested

mmm i didnt suggest that. there really isnt such a thing as "wrong" vendor
field -- it's supposed to be pretty flexible. we use "gentoo" for the vendor
field with all uclibc targets for example.
-mike
 
Old 01-05-2011, 07:21 AM
Christoph Spielmann
 
Default CBUILD= HOSTCC=-gcc

Am 04.01.2011 20:47, schrieb wireless:

On 01/03/11 16:11, Christoph Spielmann wrote:


Well in terms of crossdev i686-gentoo-linux-gnu-gcc is not a valid
target (just look at the output of crossdev --help). If you want to
build x86-code on a machine using a x86-compiler why would you want to
use a cross-compilation-environment anyway? The idea of using
cross-compilation is to build stuff for another target than the target
of the host-compiler... E.g. build arm-code on a x86-machine or compile
stuff for ppc on a x86-64-machine.


OK I agree with this answer, mostly.

I have a situation where a x86 (P4) Machine is built on i686 for
everything. However, I'm also going to chroot the machine and build
binaries for all sorts of i486/586 and old oddball processors such as
the Geode.

So isn't that a valid exception to what you have opined about?


Okey but all these things are in the end x86-processors. Some support
flags that other's won't but in the end they are basically all the same
arch. So my suggestion would've been: use a chroot-environment for such
a case.


In my eyes it only makes sense to use cross-compilation (including all
the hassles that you will come across by using it) if you need (or want)
to build stuff for another architecture or machine, that is not
powerfull enough for compilation tasks itself. E.g. arm5-code on a
x86_64-environment




curious,
James
 
Old 02-05-2011, 02:24 PM
Enrico Weigelt
 
Default CBUILD= HOSTCC=-gcc

* Christoph Spielmann <spielc@gmail.com> schrieb:

> Well in terms of crossdev i686-gentoo-linux-gnu-gcc is not a valid
> target (just look at the output of crossdev --help).

Somehow, I'm not surprised at all ... ;-o

> If you want to build x86-code on a machine using a x86-compiler
> why would you want to use a cross-compilation-environment anyway?

For isolated builds ? Eg. building for different ABIs, etc ?
Or to find stupid things like AC_TRY_RUN() more easily ?

> The idea of using cross-compilation is to build stuff for another
> target than the target of the host-compiler... E.g. build arm-code
> on a x86-machine or compile stuff for ppc on a x86-64-machine.

A target's binary/runtime environment is defined by way more
parameters than just CPU's instruction set.


BTW: I'm often building binpkgs for certain foreign x86 systems
(small or special purpose devices, ancient distros, etc, etc)
by - guess what - crosscompiling.


cu
--
----------------------------------------------------------------------
Enrico Weigelt, metux IT service -- http://www.metux.de/

phone: +49 36207 519931 email: weigelt@metux.de
mobile: +49 151 27565287 icq: 210169427 skype: nekrad666
----------------------------------------------------------------------
Embedded-Linux / Portierung / Opensource-QM / Verteilte Systeme
----------------------------------------------------------------------
 
Old 02-05-2011, 02:31 PM
Enrico Weigelt
 
Default CBUILD= HOSTCC=-gcc

* Christoph Spielmann <spielc@gmail.com> schrieb:

> Okey but all these things are in the end x86-processors. Some support
> flags that other's won't but in the end they are basically all the same
> arch. So my suggestion would've been: use a chroot-environment for such
> a case.

Well, these subarchs can be *very* different, especially when it
comes to things like fp or vector ops, etc. You definitively don't
want some package to be so "clever" to automatically build in
cpu-optimized or even cpu-specific code just because the configure
script sees it runs on that cpu (in recent years, I had many of
those cases). And you also don't want it to switch certain features
by existance/absence of certain devices, procfs or sysfs files.
(similarily you dont wan't implicit features switches introducing
certain dependencies just by the existence of certain libs).

In the end, the clean solution is always to crosscompile with an
(per-package) minimal sysroot.

> In my eyes it only makes sense to use cross-compilation (including all
> the hassles that you will come across by using it) if you need (or want)
> to build stuff for another architecture or machine, that is not
> powerfull enough for compilation tasks itself. E.g. arm5-code on a
> x86_64-environment

If you only look on the scope of one specific distro (and expect the
target system to be relatively up2date), yes. In generic case, no.


cu
--
----------------------------------------------------------------------
Enrico Weigelt, metux IT service -- http://www.metux.de/

phone: +49 36207 519931 email: weigelt@metux.de
mobile: +49 151 27565287 icq: 210169427 skype: nekrad666
----------------------------------------------------------------------
Embedded-Linux / Portierung / Opensource-QM / Verteilte Systeme
----------------------------------------------------------------------
 

Thread Tools




All times are GMT. The time now is 12:54 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org