From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21269 invoked by alias); 26 Jan 2011 12:25:45 -0000 Received: (qmail 21244 invoked by uid 22791); 26 Jan 2011 12:25:43 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,TW_GB X-Spam-Check-By: sourceware.org Received: from mail-gx0-f175.google.com (HELO mail-gx0-f175.google.com) (209.85.161.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 26 Jan 2011 12:25:38 +0000 Received: by gxk20 with SMTP id 20so114896gxk.20 for ; Wed, 26 Jan 2011 04:25:36 -0800 (PST) MIME-Version: 1.0 Received: by 10.100.214.7 with SMTP id m7mr4928751ang.36.1296044736600; Wed, 26 Jan 2011 04:25:36 -0800 (PST) Received: by 10.100.232.20 with HTTP; Wed, 26 Jan 2011 04:25:36 -0800 (PST) In-Reply-To: References: Date: Wed, 26 Jan 2011 12:25:00 -0000 Message-ID: Subject: Re: Error building gcc 4.5.2 for AVR From: Omar Choudary To: Jonathan Wakely Cc: gcc-help@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2011-01/txt/msg00373.txt.bz2 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= --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 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. >