Mailing List Archive

CBUILD= HOSTCC=-gcc
Hi,
Did crossdev for a
crossdev i686-gentoo.edge-linux-gnu

The make.conf has empty entries: (right side is what should be written)
CBUILD= |
CBUILD=i686-pc-linux-gnu
ARCH=x86 |
ARCH=x86
|
HOSTCC=-gcc |
HOSTCC=i686-pc-linux-gnu-gcc

Why is that?

Thanks,
Kfir
Re: CBUILD= HOSTCC=-gcc [ In reply to ]
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)


//Peter
Re: CBUILD= HOSTCC=-gcc [ In reply to ]
Hi,

Am 02.01.2011 18:40, schrieb Kfir Lavi:
> Hi,
> Did crossdev for a
> crossdev i686-gentoo.edge-linux-gnu
From crossdev-manpage:

...
Target (-t) takes a tuple ARCH-VENDOR-OS-LIBC; see 'crossdev -t help'

I assume that the '.' is not a valid character and thus you don't get
valid entries in cross-root's make.conf
>
> The make.conf has empty entries: (right side is what should be written)
> CBUILD=
> | CBUILD=i686-pc-linux-gnu
> ARCH=x86
> | ARCH=x86
> |
> HOSTCC=-gcc
> | HOSTCC=i686-pc-linux-gnu-gcc
>
> Why is that?
>
> Thanks,
> Kfir
Re: CBUILD= HOSTCC=-gcc [ In reply to ]
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.
-mike
Re: CBUILD= HOSTCC=-gcc [ In reply to ]
On Sun, Jan 2, 2011 at 9:31 PM, Mike Frysinger <vapier@gentoo.org> 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.
> -mike
>
I tried it again running
crossdev i686-gentoo-linux-gnu
and got the same results.

What can be wrong with my setup?

Thanks,
Kfir
Re: CBUILD= HOSTCC=-gcc [ In reply to ]
Hi,

Am 03.01.2011 10:21, schrieb Kfir Lavi:
>
>
> On Sun, Jan 2, 2011 at 9:31 PM, Mike Frysinger <vapier@gentoo.org
> <mailto:vapier@gentoo.org>> 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.
> -mike
>
> 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

> and got the same results.
>
> What can be wrong with my setup?
>
> Thanks,
> Kfir
Re: CBUILD= HOSTCC=-gcc [ In reply to ]
On Mon, Jan 3, 2011 at 2:17 PM, Christoph Spielmann <spielc@gmail.com>wrote:

> Hi,
>
> Am 03.01.2011 10:21, schrieb Kfir Lavi:
>
>
>
> On Sun, Jan 2, 2011 at 9:31 PM, Mike Frysinger <vapier@gentoo.org> 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.
>> -mike
>>
> 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
>
>
> and got the same results.
>
> What can be wrong with my setup?
>
> Thanks,
> Kfir
>
>
> What I did is funny:
CBUILD=i686-pc-linux-gnu
HOSTCC=i686-pc-linux-gnu-gcc

So it seems I'm using my native compiler?!
And I'm not using my i686-gentoo-linux-gnu-gcc

Can I see which compiler is really working if I change CBUILD to
i686-gentoo-linux-gnu?

Thanks,
Kfir
Re: CBUILD= HOSTCC=-gcc [ In reply to ]
Hi,

Am 03.01.2011 16:33, schrieb Kfir Lavi:
>
>
> On Mon, Jan 3, 2011 at 2:17 PM, Christoph Spielmann <spielc@gmail.com
> <mailto:spielc@gmail.com>> wrote:
>
> Hi,
>
> Am 03.01.2011 10:21, schrieb Kfir Lavi:
>>
>>
>> On Sun, Jan 2, 2011 at 9:31 PM, Mike Frysinger <vapier@gentoo.org
>> <mailto:vapier@gentoo.org>> 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.
>> -mike
>>
>> 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
>
>
>> and got the same results.
>>
>> What can be wrong with my setup?
>>
>> Thanks,
>> Kfir
>
> What I did is funny:
> CBUILD=i686-pc-linux-gnu
> HOSTCC=i686-pc-linux-gnu-gcc
>
> So it seems I'm using my native compiler?!
> And I'm not using my i686-gentoo-linux-gnu-gcc
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.
>
> Can I see which compiler is really working if I change CBUILD to
> i686-gentoo-linux-gnu?
>
> Thanks,
> Kfir
Re: CBUILD= HOSTCC=-gcc [ In reply to ]
On Mon, Jan 3, 2011 at 11:11 PM, Christoph Spielmann <spielc@gmail.com>wrote:

> Hi,
>
> Am 03.01.2011 16:33, schrieb Kfir Lavi:
>
>
>
> On Mon, Jan 3, 2011 at 2:17 PM, Christoph Spielmann <spielc@gmail.com>wrote:
>
>> Hi,
>>
>> Am 03.01.2011 10:21, schrieb Kfir Lavi:
>>
>>
>>
>> On Sun, Jan 2, 2011 at 9:31 PM, Mike Frysinger <vapier@gentoo.org> 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.
>>> -mike
>>>
>> 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
>>
>>
>> and got the same results.
>>
>> What can be wrong with my setup?
>>
>> Thanks,
>> Kfir
>>
>>
>> What I did is funny:
> CBUILD=i686-pc-linux-gnu
> HOSTCC=i686-pc-linux-gnu-gcc
>
> So it seems I'm using my native compiler?!
> And I'm not using my i686-gentoo-linux-gnu-gcc
>
> 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.
>

You are right, but what I'm aming for is a very easy deviation from Intel to
Arm or other platform.
I had my problems that where solved when cross compiling, so those problems
are solved for another cross platform compilation.
For example, ACE would not compile crossed, so fixing this problem with an
ebuild, I'm now prepared for changing platform.
I also learning how to use crossdev. As you see, it is a bit problematic for
me.

Kfir

>
> Can I see which compiler is really working if I change CBUILD to
> i686-gentoo-linux-gnu?
>
> Thanks,
> Kfir
>
>
>
Re: CBUILD= HOSTCC=-gcc [ In reply to ]
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?


curious,
James
Re: CBUILD= HOSTCC=-gcc [ In reply to ]
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
Re: CBUILD= HOSTCC=-gcc [ In reply to ]
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
>
>
>
Re: CBUILD= HOSTCC=-gcc [ In reply to ]
* 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
----------------------------------------------------------------------
Re: CBUILD= HOSTCC=-gcc [ In reply to ]
* 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
----------------------------------------------------------------------