From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19560 invoked by alias); 25 Jan 2011 10:25:42 -0000 Received: (qmail 19502 invoked by uid 22791); 25 Jan 2011 10:25:41 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,TW_GX X-Spam-Check-By: sourceware.org Received: from wmh1.mail.saunalahti.fi (HELO wmh1.mail.saunalahti.fi) (62.142.5.133) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 25 Jan 2011 10:25:34 +0000 Received: from [192.168.1.3] (dsl-olubrasgw1-fe15f900-207.dhcp.inet.fi [84.249.21.207]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: kai.ruottu@wippies.com) by wmh1.mail.saunalahti.fi (Postfix) with ESMTPSA id 0853B1FC065 for ; Tue, 25 Jan 2011 12:25:30 +0200 (EET) Message-ID: <4D3EA517.7070005@wippies.com> Date: Tue, 25 Jan 2011 10:25:00 -0000 From: Kai Ruottu User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; fi; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 To: gcc-help@gcc.gnu.org Subject: Re: Error building gcc 4.5.2 for AVR References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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/msg00352.txt.bz2 25.1.2011 1:57, Jonathan Wakely kirjoitti: > On 24 January 2011 22:49, Omar Choudary wrote: >> >> I am creating a script for building GCC 4.5.2 for the AVR target: >> http://www.cl.cam.ac.uk/~osc22/files/install_avr_tools.sh >> >> I have some troubles when building GCC-4.5.2, see below, maybe you can >> help me; thanks: > > This question is off-topic on this mailing list, please send such > questions to the gcc-help@gcc.gnu.org list, as described > http://gcc.gnu.org/lists.html > > Since you're using a third-party's build script, not the GCC > installation instructions, you might be able to ask the author of that > script for support. The asker here seems to be the "supporter" :( Generally the AVR case seems to be a special case. The gcc-4.5.2 configury system gives the complete target name : [root@localhost gcc-4.5.2]# ./config.sub avr avr-unknown-none for the bare "avr" target name used by Omar. The plain vanilla gcc-4.5.2 configury recognizes this as the second of the two following templates : avr-*-rtems*) tm_file="avr/avr.h dbxelf.h avr/rtems.h rtems.h newlib-stdint.h" tmake_file="avr/t-avr t-rtems avr/t-rtems" extra_gcc_objs="driver-avr.o avr-devices.o" extra_objs="avr-devices.o" ;; avr-*-*) tm_file="avr/avr.h dbxelf.h newlib-stdint.h" use_gcc_stdint=wrap extra_gcc_objs="driver-avr.o avr-devices.o" extra_objs="avr-devices.o" ;; ie. probably as a "plain vanilla newlib-based embedded target". So, what a totally dummy GCC builder would expect the AVR target to use is : 1. it uses ELF as its object format 2. it uses newlib as its target C library just like many others targets met earlier... 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 and probably "succeeds" nicely when writing 'make'... Before becoming aware that newlib really doesn't support AVR :( and there are more "specific" notes for this "special" target in : http://gcc.gnu.org/install/specific.html#avr I tried this "dummy builder from the street" approach and getting the toolchain succeeded nicely with the plain vanilla gcc-4.5.2 sources, no errors ever : [root@localhost build]# cd gcc [root@localhost gcc]# ./xgcc -v Using built-in specs. COLLECT_GCC=./xgcc Target: avr-elf Configured with: ../configure --build=i686-linux-gnu --host=i686-linux-gnu --target=avr-elf --enable-languages=c,c++ --with-newlib --disable-shared --disable-threads --disable-nls --with-gxx-include-dir=/usr/local/include/c++/4.5.2 --enable-version-specific-runtime-libs --with-pkgversion='by Kai Ruottu 2011q1' Thread model: single gcc version 4.5.2 (by Kai Ruottu 2011q1) >> make[2]: Leaving directory >> `/local/scratch/osc22/temp/build-avr/gcc-4.5.2/buildavr/libiberty' >> /bin/bash: line 3: cd: avr/libgcc: No such file or directory >> make[1]: *** [install-target-libgcc] Error 1 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...