Re: Error building gcc 4.5.2 for AVR

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, thanks for this help, however it doesn't solve the problem.
Let me reply to his comments inline:

>> Generally the AVR case seems to be a special case.
Unfortunately... it would be nice to have it converging.

>> So this dummy GCC builder is expected to try to build one's toolchain
>> using the (should be) well-known '*-elf' embedded target toolchain
>> build process via configuring something like :
>>
>> .../configure --prefix=<something> --target=avr-elf --with-newlib

Actually, from the target specific instructions:
http://gcc.gnu.org/install/specific.html#avr
the avr target is just "avr", not "avr-elf"

This is also confirmed in the avr-libc page:
http://www.nongnu.org/avr-libc/user-manual/install__tools.html

which shows the configuration as:
../configure --prefix=$PREFIX --target=avr --enable-languages=c,c++
--disable-nls --disable-libssp --with-dwarf2

Although the avr-libc community is the most used by AVR users, the
instructions are made for GCC until version 4.3.4.
That's why I am trying to make the complete building scripts using GCC 4.5.2.

I should also mention that I did manage (before upgrading my system
and loosing it all) to install the tools using
GCC 4.5.1, based on the steps from avr-libc and some additional inputs
by Bingo (already in my current script).
Unfortunately I did not make a script at that time (which is why I am
creating one now), so I don't remember the exact options I used then.

>> If Omar really tries to support the GCC for AVR builders, one dummy
>> question is : "Why the expected '--with-newlib' is not used in his
>> GCC configure ?  This definitely is the option which defines the
>> case being "a generic embedded target case" and removes all kind of
>> checks and link tests with the "expected to exist prebuilt target C
>> library", which is the default for "a generic system target case".
>> The equation: "embedded" == "use the '--with-newlib'" should be known
>> quite well, at least what leaving it away would mean during the GCC
>> build...

I am not sure I quite understand if what I did was wrong (i.e. I
should have put the --with-newlib, or is a problem with the config
system).
However, I did not put the --with-newlib because as you mentioned, the
AVR is a special case and newlib is not used for AVR
(also I don't remember ever using this option to compile the AVR tools).
For AVR, the avr-libc (see link above) is used.

Anyway, I tried to configure using --with-newlib and I got the exact
same result:
make[3]: Entering directory
`/local/scratch/osc22/temp/build-avr/gcc-build-4.5.2/libiberty/testsuite'
make[3]: Nothing to be done for `install'.
make[3]: Leaving directory
`/local/scratch/osc22/temp/build-avr/gcc-build-4.5.2/libiberty/testsuite'
make[2]: Leaving directory
`/local/scratch/osc22/temp/build-avr/gcc-build-4.5.2/libiberty'
/bin/bash: line 3: cd: avr/libgcc: No such file or directory
make[1]: *** [install-target-libgcc] Error 1
make[1]: Leaving directory `/local/scratch/osc22/temp/build-avr/gcc-build-4.5.2'
make: *** [install] Error 2

If someone has the time to look, the entire log is available here:
http://www.cl.cam.ac.uk/~osc22/files/avr_gcc/make_avr_gcc_452_newlib_nomultilib.log

Someone has commented that multilibs may not have been installed, so I
removed the --disable-multilib.
But same problem, see:
http://www.cl.cam.ac.uk/~osc22/files/avr_gcc/make_avr_gcc_452_multilib_nonewlib.log

However, after a bit more searching on libgcc I found this post:
http://wiki.osdev.org/GCC_Cross-Compiler

and so I added the make-target-libgcc to my install script.
This seems to solve the issue, although I still get the original error
on ligbcc missing the first time. See the log:
http://www.cl.cam.ac.uk/~osc22/files/avr_gcc/make_avr_gcc_452_multilib_libgcc.log

Therefore the script seems to be working now. My question now is why
the Error while building, should the libgcc be built before is being
searched? And what is the option of mentioning I want to add libgcc to
the configure script, if this is mandatory?

Thanks again.
 Omar



On Tue, Jan 25, 2011 at 8:31 PM, Jonathan Wakely <jwakely.gcc@xxxxxxxxx> wrote:
> On 25 January 2011 14:30, Omar Choudary wrote:
>> Hello,
>>
>> I am trying to build GCC 4.5.2 for the AVR target. See my script:
>> http://www.cl.cam.ac.uk/~osc22/files/install_avr_tools.sh
>>
>> I have some troubles when building, see below, maybe you can
>> help me; thanks:
>
> Hi Omar,
>
> Kai Ruottu replied to your other mail, CCing this list, but apparently
> forgot to include you, you can read it here:
> http://gcc.gnu.org/ml/gcc-help/2011-01/msg00352.html
>
> I hope that mail is useful.
>


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux