Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Gentoo: Embedded

crossdev-20100620 uses wrong gcc

 

 

Gentoo embedded RSS feed   Index | Next | Previous | View Threaded


joakim.tjernlund at transmode

Sep 23, 2010, 7:37 AM

Post #1 of 8 (1216 views)
Permalink
crossdev-20100620 uses wrong gcc

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.


peter at stuge

Sep 23, 2010, 8:27 AM

Post #2 of 8 (1163 views)
Permalink
Re: crossdev-20100620 uses wrong gcc [In reply to]

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


joakim.tjernlund at transmode

Sep 23, 2010, 10:12 AM

Post #3 of 8 (1169 views)
Permalink
Re: crossdev-20100620 uses wrong gcc [In reply to]

Peter Stuge <peter [at] stuge> 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


vapier at gentoo

Sep 23, 2010, 7:33 PM

Post #4 of 8 (1165 views)
Permalink
Re: crossdev-20100620 uses wrong gcc [In reply to]

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
Attachments: signature.asc (0.82 KB)


joakim.tjernlund at transmode

Sep 24, 2010, 1:55 AM

Post #5 of 8 (1152 views)
Permalink
Re: crossdev-20100620 uses wrong gcc [In reply to]

Mike Frysinger <vapier [at] gentoo> 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


vapier at gentoo

Sep 24, 2010, 7:30 AM

Post #6 of 8 (1151 views)
Permalink
Re: crossdev-20100620 uses wrong gcc [In reply to]

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
Attachments: signature.asc (0.82 KB)


joakim.tjernlund at transmode

Sep 24, 2010, 8:48 AM

Post #7 of 8 (1150 views)
Permalink
Re: crossdev-20100620 uses wrong gcc [In reply to]

Mike Frysinger <vapier [at] gentoo> 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


vapier at gentoo

Sep 24, 2010, 9:58 AM

Post #8 of 8 (1154 views)
Permalink
Re: crossdev-20100620 uses wrong gcc [In reply to]

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
Attachments: signature.asc (0.82 KB)

Gentoo embedded RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.