public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* compiling gcc 4.1.1 for AVR
@ 2006-09-27  4:03 alee
  2006-09-27  6:31 ` Kai Ruottu
  0 siblings, 1 reply; 5+ messages in thread
From: alee @ 2006-09-27  4:03 UTC (permalink / raw)
  To: gcc-help

Hi,
I'm trying to compile gcc 4.1.1 for the AVR platorm.
I compiled binutils 2.17 for the AVR platorm already and when I try to 
compile gcc, I get the following error:

...
checking for avr-gcc... 
/linux_source/gcc-4.1.1/host-i686-pc-linux-gnu/gcc/xgcc 
-B/linux_source/gcc-4.1.1/host-i686-pc-linux-gnu/gcc/ 
-B/opt/avr/avr/bin/ -B/opt/avr/avr/lib/ -isystem /opt/avr/avr/include 
-isystem /opt/avr/avr/sys-include
checking for C compiler default output file name... configure: error: C 
compiler cannot create executables
See `config.log' for more details.
make[1]: *** [configure-target-libssp] Error 1
make[1]: Leaving directory `/linux_source/gcc-4.1.1'
make: *** [all] Error 2
....

The config.log file shows the following:
...
configure:2275: checking for correct version of gmp.h
configure:2288: gcc -c -g -O2   conftest.c 1>&5
configure:2278:17: gmp.h: No such file or directory
configure: In function `main':
configure:2282: error: `choke' undeclared (first use in this function)
configure:2282: error: (Each undeclared identifier is reported only once
configure:2282: error: for each function it appears in.)
configure:2282: error: parse error before "me"
configure: failed program was:
#line 2277 "configure"
#include "confdefs.h"
#include "gmp.h"
...

Where do I get gmp.h?  Do I need it? What else can be wrong?
The following options were used to compile binutils 2.17:
    ./configure --prefix=/opt/avr --target=avr
My path is set to include /opt/avr then I tried to compile gcc 4.1.1
The following options were used to compile gcc 4.1.1:
    ./configure --prefix=/opt/avr --target=avr --enable-languages=c 
--disable-nls

Thanks.
Aaron.


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

* Re: compiling gcc 4.1.1 for AVR
  2006-09-27  4:03 compiling gcc 4.1.1 for AVR alee
@ 2006-09-27  6:31 ` Kai Ruottu
  2006-09-27  9:37   ` alee
  0 siblings, 1 reply; 5+ messages in thread
From: Kai Ruottu @ 2006-09-27  6:31 UTC (permalink / raw)
  To: alee; +Cc: gcc-help

alee wrote:
> I'm trying to compile gcc 4.1.1 for the AVR platorm.

You seem to have achieved your goal already!

> I compiled binutils 2.17 for the AVR platorm already and when I try to 
> compile gcc,

Can you in any way imagine that the subdirectory 'gcc' in the GCC 
sources could be that
'GCC' ?  So when it is "compiled", the compiler(s) called as "GCC" 
is/are ready!

> I get the following error:
>
> ....
> checking for avr-gcc... 
> /linux_source/gcc-4.1.1/host-i686-pc-linux-gnu/gcc/xgcc 
> -B/linux_source/gcc-4.1.1/host-i686-pc-linux-gnu/gcc/ 
> -B/opt/avr/avr/bin/ -B/opt/avr/avr/lib/ -isystem /opt/avr/avr/include 
> -isystem /opt/avr/avr/sys-include
> checking for C compiler default output file name... configure: error: 
> C compiler cannot create executables
> See `config.log' for more details.
> make[1]: *** [configure-target-libssp] Error 1

 This error tells that the already built "GCC" for AVR cannot create 
executables with
the help of the AVR targeted 'as' and 'ld', the AVR targeted C library etc.

 Why the GCC build tries to build the 'libssp.a' for AVR as default and 
whether it is required for
AVR at all, are the questions you should ask here.  Anyway there should 
be the GCC configure
option :

|--disable-libssp|
    Specify that the run-time libraries for stack smashing protection
    should not be built.

to disable it's build, so if you think it being not needed, just disable 
it's build!  A reconfigure
and a rebuild could show how you could get a clean working build but 
just as well you could
try to remove the 'libssp' subdir from the 
'/linux_source/gcc-4.1.1/host-i686-pc-linux-gnu/avr'
and then try 'make' again... If this doesn't help, then try removing the 
'libssp' "target" from
the generated main GCC  'Makefile'.

> Where do I get gmp.h?  Do I need it? What else can be wrong?

My thought is that you don't need 'libssp' for AVR at all...

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

* Re: compiling gcc 4.1.1 for AVR
  2006-09-27  6:31 ` Kai Ruottu
@ 2006-09-27  9:37   ` alee
  2006-09-27  9:57     ` Kai Ruottu
  2006-09-27 19:47     ` Amit Choudhary
  0 siblings, 2 replies; 5+ messages in thread
From: alee @ 2006-09-27  9:37 UTC (permalink / raw)
  To: Kai Ruottu; +Cc: gcc-help

Kai Ruottu wrote:

> alee wrote:
>
>> I'm trying to compile gcc 4.1.1 for the AVR platorm.
>
>
> You seem to have achieved your goal already!
>
>> I compiled binutils 2.17 for the AVR platorm already and when I try 
>> to compile gcc,
>
>
> Can you in any way imagine that the subdirectory 'gcc' in the GCC 
> sources could be that
> 'GCC' ?  So when it is "compiled", the compiler(s) called as "GCC" 
> is/are ready!
>
>> I get the following error:
>>
>> ....
>> checking for avr-gcc... 
>> /linux_source/gcc-4.1.1/host-i686-pc-linux-gnu/gcc/xgcc 
>> -B/linux_source/gcc-4.1.1/host-i686-pc-linux-gnu/gcc/ 
>> -B/opt/avr/avr/bin/ -B/opt/avr/avr/lib/ -isystem /opt/avr/avr/include 
>> -isystem /opt/avr/avr/sys-include
>> checking for C compiler default output file name... configure: error: 
>> C compiler cannot create executables
>> See `config.log' for more details.
>> make[1]: *** [configure-target-libssp] Error 1
>
>
> This error tells that the already built "GCC" for AVR cannot create 
> executables with
> the help of the AVR targeted 'as' and 'ld', the AVR targeted C library 
> etc.
>
> Why the GCC build tries to build the 'libssp.a' for AVR as default and 
> whether it is required for
> AVR at all, are the questions you should ask here.  Anyway there 
> should be the GCC configure
> option :
>
> |--disable-libssp|
>    Specify that the run-time libraries for stack smashing protection
>    should not be built.
>
> to disable it's build, so if you think it being not needed, just 
> disable it's build!  A reconfigure
> and a rebuild could show how you could get a clean working build but 
> just as well you could
> try to remove the 'libssp' subdir from the 
> '/linux_source/gcc-4.1.1/host-i686-pc-linux-gnu/avr'
> and then try 'make' again... If this doesn't help, then try removing 
> the 'libssp' "target" from
> the generated main GCC  'Makefile'.
>
>> Where do I get gmp.h?  Do I need it? What else can be wrong?
>
>
> My thought is that you don't need 'libssp' for AVR at all...
>
>
>

Ok...I added the "--disable-libssp" and "make" went further but it stops 
at another error:
.....
Entering directory `/linux_source/gcc-4.1.1/host-i686-pc-linux-gnu/gcc'
gcc -c   -g -O2 -DIN_GCC -DCROSS_COMPILE  -W -Wall -Wwrite-strings 
-Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute    
-DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild -I../.././gcc 
-I../.././gcc/build -I../.././gcc/../include 
-I../.././gcc/../libcpp/include     -o build/fix-header.o 
../.././gcc/fix-header.c
/opt/avr/bin/avr-as: unrecognized option `-Qy'
make[2]: *** [build/fix-header.o] Error 1
make[2]: Leaving directory 
`/linux_source/gcc-4.1.1/host-i686-pc-linux-gnu/gcc'
make[1]: *** [all-gcc] Error 2
make[1]: Leaving directory `/linux_source/gcc-4.1.1'
make: *** [all] Error 2

What is "make" building here?  Do I have a buggy avr-as?  avr-as doesn't 
have the '-Qy' option...should it?  Or is "make" using avr-as 
incorrectly here?

Thanks.

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

* Re: compiling gcc 4.1.1 for AVR
  2006-09-27  9:37   ` alee
@ 2006-09-27  9:57     ` Kai Ruottu
  2006-09-27 19:47     ` Amit Choudhary
  1 sibling, 0 replies; 5+ messages in thread
From: Kai Ruottu @ 2006-09-27  9:57 UTC (permalink / raw)
  To: alee; +Cc: gcc-help

alee kirjoitti:

 > build/fix-header.o .../.././gcc/fix-header.c
 > /opt/avr/bin/avr-as: unrecognized option `-Qy'
 > What is "make" building here?

 It is building executables for the $build platform...

 >  Do I have a buggy avr-as?  avr-as doesn't have the '-Qy' 
option...should it?
 >  Or is "make" using avr-as incorrectly here?
 
As you can see the AVR 'as' was tried to be used with the native 'gcc' 
!  Why?   Have you done
some weird environment settings or what?  Maybe defining 'AS' to be this 
'as' could cause this
but why anyone could do something like this?

One doesn't need to put anything else into the PATH than the 
'$prefix/bin', your '/opt/avr/bin',
the stuff in '$prefix/$target/bin' will be found automatically with the 
new GCC.  Neither any
environment settings are required for 'AS' and 'LD', if one wants some 
GCC-version specific
ones, putting them into the '$prefix/libexec/gcc/$target/$gcc-version' 
among the 'cc1*' and
'collect2' executables there, would be the solution...

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

* Re: compiling gcc 4.1.1 for AVR
  2006-09-27  9:37   ` alee
  2006-09-27  9:57     ` Kai Ruottu
@ 2006-09-27 19:47     ` Amit Choudhary
  1 sibling, 0 replies; 5+ messages in thread
From: Amit Choudhary @ 2006-09-27 19:47 UTC (permalink / raw)
  To: alee, Kai Ruottu; +Cc: gcc-help

Hi Alee,

I follow a simple rule:

If I am getting compiler errors that I do not understand and if 
(ideally) those erros should not have been there, then possibly
I am using the wrong toolchain. So, I go looking for the
latest/most appropriate toolchain.

Regards,
Amit

--- alee <alee@IfA.Hawaii.Edu> wrote:

> Kai Ruottu wrote:
> 
> > alee wrote:
> >
> >> I'm trying to compile gcc 4.1.1 for the AVR platorm.
> >
> >
> > You seem to have achieved your goal already!
> >
> >> I compiled binutils 2.17 for the AVR platorm already and
> when I try 
> >> to compile gcc,
> >
> >
> > Can you in any way imagine that the subdirectory 'gcc' in
> the GCC 
> > sources could be that
> > 'GCC' ?  So when it is "compiled", the compiler(s) called as
> "GCC" 
> > is/are ready!
> >
> >> I get the following error:
> >>
> >> ....
> >> checking for avr-gcc... 
> >> /linux_source/gcc-4.1.1/host-i686-pc-linux-gnu/gcc/xgcc 
> >> -B/linux_source/gcc-4.1.1/host-i686-pc-linux-gnu/gcc/ 
> >> -B/opt/avr/avr/bin/ -B/opt/avr/avr/lib/ -isystem
> /opt/avr/avr/include 
> >> -isystem /opt/avr/avr/sys-include
> >> checking for C compiler default output file name...
> configure: error: 
> >> C compiler cannot create executables
> >> See `config.log' for more details.
> >> make[1]: *** [configure-target-libssp] Error 1
> >
> >
> > This error tells that the already built "GCC" for AVR cannot
> create 
> > executables with
> > the help of the AVR targeted 'as' and 'ld', the AVR targeted
> C library 
> > etc.
> >
> > Why the GCC build tries to build the 'libssp.a' for AVR as
> default and 
> > whether it is required for
> > AVR at all, are the questions you should ask here.  Anyway
> there 
> > should be the GCC configure
> > option :
> >
> > |--disable-libssp|
> >    Specify that the run-time libraries for stack smashing
> protection
> >    should not be built.
> >
> > to disable it's build, so if you think it being not needed,
> just 
> > disable it's build!  A reconfigure
> > and a rebuild could show how you could get a clean working
> build but 
> > just as well you could
> > try to remove the 'libssp' subdir from the 
> > '/linux_source/gcc-4.1.1/host-i686-pc-linux-gnu/avr'
> > and then try 'make' again... If this doesn't help, then try
> removing 
> > the 'libssp' "target" from
> > the generated main GCC  'Makefile'.
> >
> >> Where do I get gmp.h?  Do I need it? What else can be
> wrong?
> >
> >
> > My thought is that you don't need 'libssp' for AVR at all...
> >
> >
> >
> 
> Ok...I added the "--disable-libssp" and "make" went further
> but it stops 
> at another error:
> .....
> Entering directory
> `/linux_source/gcc-4.1.1/host-i686-pc-linux-gnu/gcc'
> gcc -c   -g -O2 -DIN_GCC -DCROSS_COMPILE  -W -Wall
> -Wwrite-strings 
> -Wstrict-prototypes -Wmissing-prototypes
> -Wmissing-format-attribute    
> -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild -I../.././gcc 
> -I../.././gcc/build -I../.././gcc/../include 
> -I../.././gcc/../libcpp/include     -o build/fix-header.o 
> ../.././gcc/fix-header.c
> /opt/avr/bin/avr-as: unrecognized option `-Qy'
> make[2]: *** [build/fix-header.o] Error 1
> make[2]: Leaving directory 
> `/linux_source/gcc-4.1.1/host-i686-pc-linux-gnu/gcc'
> make[1]: *** [all-gcc] Error 2
> make[1]: Leaving directory `/linux_source/gcc-4.1.1'
> make: *** [all] Error 2
> 
> What is "make" building here?  Do I have a buggy avr-as? 
> avr-as doesn't 
> have the '-Qy' option...should it?  Or is "make" using avr-as 
> incorrectly here?
> 
> Thanks.
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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

end of thread, other threads:[~2006-09-27 19:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-27  4:03 compiling gcc 4.1.1 for AVR alee
2006-09-27  6:31 ` Kai Ruottu
2006-09-27  9:37   ` alee
2006-09-27  9:57     ` Kai Ruottu
2006-09-27 19:47     ` Amit Choudhary

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).