public inbox for gentoo-embedded@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-embedded] crossdev-20100620 uses wrong gcc
@ 2010-09-23 14:37 Joakim Tjernlund
  2010-09-23 15:27 ` Peter Stuge
  2010-09-24  2:33 ` Mike Frysinger
  0 siblings, 2 replies; 8+ messages in thread
From: Joakim Tjernlund @ 2010-09-23 14:37 UTC (permalink / raw
  To: gentoo-embedded


Trying to add support for e300c2 in glibc/ports I got another error.
when crossdev is building cross-glibc-headers it uses the hosts gcc
instead of the cross compiler and glibc configure fails:

configure:7498: checking for compiler option for CPU variant
configure:7506: gcc -march=e300c2 -xc /dev/null -S -o /dev/null
/dev/null:1: error: bad value (e300c2) for -march= switch
/dev/null:1: error: bad value (e300c2) for -mtune= switch
configure:7509: $? = 1
configure:7506: gcc -mcpu=e300c2 -xc /dev/null -S -o /dev/null
`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
/dev/null:1: error: bad value (e300c2) for -mtune= switch
configure:7509: $? = 1
configure:7516: result: no
configure:7519: error: gcc does not support e300c2


Here is the configure log snippet when it finds the hosts gcc:

configure:2028: checking build system type
configure:2046: result: i686-pc-linux-gnu
configure:2068: checking host system type
configure:2083: result: powerpc-e300c2_softfloat-linux-gnu
configure:2114: checking for powerpc-e300c2_softfloat-linux-gnu-gcc
configure:2141: result: gcc
configure:2413: checking for C compiler version
configure:2421: gcc --version >&5
gcc (Gentoo 4.4.3-r2 p1.2) 4.4.3
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.




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

* Re: [gentoo-embedded] crossdev-20100620 uses wrong gcc
  2010-09-23 14:37 [gentoo-embedded] crossdev-20100620 uses wrong gcc Joakim Tjernlund
@ 2010-09-23 15:27 ` Peter Stuge
  2010-09-23 17:12   ` Joakim Tjernlund
  2010-09-24  2:33 ` Mike Frysinger
  1 sibling, 1 reply; 8+ messages in thread
From: Peter Stuge @ 2010-09-23 15:27 UTC (permalink / raw
  To: gentoo-embedded

Joakim Tjernlund wrote:
> configure:2068: checking host system type
> configure:2083: result: powerpc-e300c2_softfloat-linux-gnu
> configure:2114: checking for powerpc-e300c2_softfloat-linux-gnu-gcc
> configure:2141: result: gcc

Is powerpc-e300c2_softfloat-linux-gnu-gcc in PATH?

And at least for ARM, softfloat is surrounded by - and never _ but I
don't know if that's significant.


//Peter



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

* Re: [gentoo-embedded] crossdev-20100620 uses wrong gcc
  2010-09-23 15:27 ` Peter Stuge
@ 2010-09-23 17:12   ` Joakim Tjernlund
  0 siblings, 0 replies; 8+ messages in thread
From: Joakim Tjernlund @ 2010-09-23 17:12 UTC (permalink / raw
  To: gentoo-embedded

Peter Stuge <peter@stuge.se> wrote on 2010/09/23 17:27:16:
>
> Joakim Tjernlund wrote:
> > configure:2068: checking host system type
> > configure:2083: result: powerpc-e300c2_softfloat-linux-gnu
> > configure:2114: checking for powerpc-e300c2_softfloat-linux-gnu-gcc
> > configure:2141: result: gcc
>
> Is powerpc-e300c2_softfloat-linux-gnu-gcc in PATH?

No, because crossdev hasn't added it yet. I am asking crossdev
to build powerpc-e300c2_softfloat-linux-gnu and that includes the
compiler too.

>
> And at least for ARM, softfloat is surrounded by - and never _ but I
> don't know if that's significant.

It is OK with _ too. See crossdev -t help




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

* Re: [gentoo-embedded] crossdev-20100620 uses wrong gcc
  2010-09-23 14:37 [gentoo-embedded] crossdev-20100620 uses wrong gcc Joakim Tjernlund
  2010-09-23 15:27 ` Peter Stuge
@ 2010-09-24  2:33 ` Mike Frysinger
  2010-09-24  8:55   ` Joakim Tjernlund
  1 sibling, 1 reply; 8+ messages in thread
From: Mike Frysinger @ 2010-09-24  2:33 UTC (permalink / raw
  To: gentoo-embedded; +Cc: Joakim Tjernlund

[-- Attachment #1: Type: Text/Plain, Size: 388 bytes --]

On Thursday, September 23, 2010 10:37:47 Joakim Tjernlund wrote:
> Trying to add support for e300c2 in glibc/ports I got another error.
> when crossdev is building cross-glibc-headers it uses the hosts gcc
> instead of the cross compiler and glibc configure fails:

by design.  look at toolchain-glibc_headers_compile() in gentoo-x86/sys-
libs/glibc/files/eblits/src_compile.eblit.
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: [gentoo-embedded] crossdev-20100620 uses wrong gcc
  2010-09-24  2:33 ` Mike Frysinger
@ 2010-09-24  8:55   ` Joakim Tjernlund
  2010-09-24 14:30     ` Mike Frysinger
  0 siblings, 1 reply; 8+ messages in thread
From: Joakim Tjernlund @ 2010-09-24  8:55 UTC (permalink / raw
  To: Mike Frysinger; +Cc: gentoo-embedded

Mike Frysinger <vapier@gentoo.org> wrote on 2010/09/24 04:33:05:
>
> On Thursday, September 23, 2010 10:37:47 Joakim Tjernlund wrote:
> > Trying to add support for e300c2 in glibc/ports I got another error.
> > when crossdev is building cross-glibc-headers it uses the hosts gcc
> > instead of the cross compiler and glibc configure fails:
>
> by design.  look at toolchain-glibc_headers_compile() in gentoo-x86/sys-
> libs/glibc/files/eblits/src_compile.eblit.

hmm, if I were to guess one needs to add
libc_cv_cc_submachine=xxx, possibly with xxx=no
to toolchain-glibc_headers_compile() ?

    Jocke




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

* Re: [gentoo-embedded] crossdev-20100620 uses wrong gcc
  2010-09-24  8:55   ` Joakim Tjernlund
@ 2010-09-24 14:30     ` Mike Frysinger
  2010-09-24 15:48       ` Joakim Tjernlund
  0 siblings, 1 reply; 8+ messages in thread
From: Mike Frysinger @ 2010-09-24 14:30 UTC (permalink / raw
  To: Joakim Tjernlund; +Cc: gentoo-embedded

[-- Attachment #1: Type: Text/Plain, Size: 782 bytes --]

On Friday, September 24, 2010 04:55:27 Joakim Tjernlund wrote:
> Mike Frysinger wrote on 2010/09/24 04:33:05:
> > On Thursday, September 23, 2010 10:37:47 Joakim Tjernlund wrote:
> > > Trying to add support for e300c2 in glibc/ports I got another error.
> > > when crossdev is building cross-glibc-headers it uses the hosts gcc
> > 
> > > instead of the cross compiler and glibc configure fails:
> > by design.  look at toolchain-glibc_headers_compile() in gentoo-x86/sys-
> > libs/glibc/files/eblits/src_compile.eblit.
> 
> hmm, if I were to guess one needs to add
> libc_cv_cc_submachine=xxx, possibly with xxx=no
> to toolchain-glibc_headers_compile() ?

you need to export the cache var to skip the sanity checks, not the "force a 
specific machine type"
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: [gentoo-embedded] crossdev-20100620 uses wrong gcc
  2010-09-24 14:30     ` Mike Frysinger
@ 2010-09-24 15:48       ` Joakim Tjernlund
  2010-09-24 16:58         ` Mike Frysinger
  0 siblings, 1 reply; 8+ messages in thread
From: Joakim Tjernlund @ 2010-09-24 15:48 UTC (permalink / raw
  To: Mike Frysinger; +Cc: gentoo-embedded

Mike Frysinger <vapier@gentoo.org> wrote on 2010/09/24 16:30:35:
>
> On Friday, September 24, 2010 04:55:27 Joakim Tjernlund wrote:
> > Mike Frysinger wrote on 2010/09/24 04:33:05:
> > > On Thursday, September 23, 2010 10:37:47 Joakim Tjernlund wrote:
> > > > Trying to add support for e300c2 in glibc/ports I got another error.
> > > > when crossdev is building cross-glibc-headers it uses the hosts gcc
> > >
> > > > instead of the cross compiler and glibc configure fails:
> > > by design.  look at toolchain-glibc_headers_compile() in gentoo-x86/sys-
> > > libs/glibc/files/eblits/src_compile.eblit.
> >
> > hmm, if I were to guess one needs to add
> > libc_cv_cc_submachine=xxx, possibly with xxx=no
> > to toolchain-glibc_headers_compile() ?
>
> you need to export the cache var to skip the sanity checks, not the "force a
> specific machine type"

yeah, that was what I did(export libc_cv_cc_submachine="-mcpu=e300c2")

I was aiming for a more general solution, but I can't find one short of
actually use the cross compiler.

 Jocke




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

* Re: [gentoo-embedded] crossdev-20100620 uses wrong gcc
  2010-09-24 15:48       ` Joakim Tjernlund
@ 2010-09-24 16:58         ` Mike Frysinger
  0 siblings, 0 replies; 8+ messages in thread
From: Mike Frysinger @ 2010-09-24 16:58 UTC (permalink / raw
  To: Joakim Tjernlund; +Cc: gentoo-embedded

[-- Attachment #1: Type: Text/Plain, Size: 1294 bytes --]

On Friday, September 24, 2010 11:48:48 Joakim Tjernlund wrote:
> Mike Frysinger wrote on 2010/09/24 16:30:35:
> > On Friday, September 24, 2010 04:55:27 Joakim Tjernlund wrote:
> > > Mike Frysinger wrote on 2010/09/24 04:33:05:
> > > > On Thursday, September 23, 2010 10:37:47 Joakim Tjernlund wrote:
> > > > > Trying to add support for e300c2 in glibc/ports I got another
> > > > > error. when crossdev is building cross-glibc-headers it uses the
> > > > > hosts gcc
> > > > 
> > > > > instead of the cross compiler and glibc configure fails:
> > > > by design.  look at toolchain-glibc_headers_compile() in
> > > > gentoo-x86/sys- libs/glibc/files/eblits/src_compile.eblit.
> > > 
> > > hmm, if I were to guess one needs to add
> > > libc_cv_cc_submachine=xxx, possibly with xxx=no
> > > to toolchain-glibc_headers_compile() ?
> > 
> > you need to export the cache var to skip the sanity checks, not the
> > "force a specific machine type"
> 
> yeah, that was what I did(export libc_cv_cc_submachine="-mcpu=e300c2")
> 
> I was aiming for a more general solution, but I can't find one short of
> actually use the cross compiler.

general solution would be to introduce a "headers" configure option to glibc 
to tell it to skip all the useless compiler checks
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

end of thread, other threads:[~2010-09-24 17:07 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-23 14:37 [gentoo-embedded] crossdev-20100620 uses wrong gcc Joakim Tjernlund
2010-09-23 15:27 ` Peter Stuge
2010-09-23 17:12   ` Joakim Tjernlund
2010-09-24  2:33 ` Mike Frysinger
2010-09-24  8:55   ` Joakim Tjernlund
2010-09-24 14:30     ` Mike Frysinger
2010-09-24 15:48       ` Joakim Tjernlund
2010-09-24 16:58         ` Mike Frysinger

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