From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27054 invoked by alias); 19 Dec 2013 08:15:25 -0000 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 Received: (qmail 27044 invoked by uid 89); 19 Dec 2013 08:15:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: wmh1.mail.saunalahti.fi Received: from wmh1.mail.saunalahti.fi (HELO wmh1.mail.saunalahti.fi) (62.142.5.133) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Thu, 19 Dec 2013 08:15:23 +0000 Received: from [192.168.0.44] (dsl-kmibrasgw1-54f8c8-29.dhcp.inet.fi [84.248.200.29]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: kai.ruottu@wippies.com) by wmh1.mail.saunalahti.fi (Postfix) with ESMTPSA id E6FF56F002 for ; Thu, 19 Dec 2013 10:15:18 +0200 (EET) Message-ID: <52B2AB3A.3030501@wippies.com> Date: Thu, 19 Dec 2013 08:15:00 -0000 From: Kai Ruottu User-Agent: Mozilla/5.0 (Windows NT 5.0; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: gcc-help@gcc.gnu.org Subject: Re: Problem with ARM cross compiler References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2013-12/txt/msg00131.txt.bz2 19.12.2013 2:15, Maxim Kuvyrkov kirjoitti: > On 19/12/2013, at 7:59 am, Hendrik Greving wrote: > >> I am compiling (trying to) ARM cross compiler (on x86): >> >> > ... >> conftest.c:15:19: fatal error: stdio.h: No such file or directory >> >> >> Any help/hint appreciated, > You don't have cross-built C library installed. Building a cross toolchain from scratch is an intricate process, it is not building just the compiler, you also need bintutils, C library headers and C library itself. I have never fully understood why the "totally from scratch target" is the first many people are trying when there are existing targets for crosstoolchains. My own '$sysroot's for the 'arm*-linux-gnueabi' targets in my laptop are : host-arm-angstrom-linux-gnueabi: host-arm-cs2009-linux-gnueabi: host-arm-cs2011-linux-gnueabi: host-arm-debian-linux-gnueabi: host-armel-debian-linux-gnueabi: host-arm-linux-gnueabi: host-arm-tizen-linux-gnueabi: host-armv5tel-redhat-linux-gnueabi: host-armv7hl-redhat-linux-gnueabi: host-armv7l-tizen-linux-gnueabi: (there are many more for old MeeGo, Scratchbox etc distros in my desktop PC) Built just for a fun. For instance built to try newer GCC releases than the one in the current Tizen-2.2.1 SDK : [root@HP-Pavilion bin]# ./arm-linux-gnueabi-gcc -v Using built-in specs. COLLECT_GCC=./arm-linux-gnueabi-gcc COLLECT_LTO_WRAPPER=/home/kai/Tizen-2.2.1/data/tools/arm-linux-gnueabi-gcc-4.5/bin/../libexec/gcc/arm-linux-gnueabi/4.5.4/lto-wrapper Target: arm-linux-gnueabi Configured with: ../configure -v --enable-languages=c,c++ --prefix=/build/build_server/rsa/jobs/1261/temp/install-arm-linux --enable-shared --enable-multiarch --with-multiarch-defaults=i386-linux-gnu --enable-linker-build-id --with-system-zlib --without-included-gettext --enable-threads=posix --enable-nls --disable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin --enable-gold --enable-ld=default --with-plugin-ld=ld.gold --disable-sjlj-exceptions --with-arch=armv7-a --with-tune=cortex-a8 --with-float=softfp --with-fpu=vfpv3-d16 --enable-checking=release --program-prefix=arm-linux-gnueabi- --target=arm-linux-gnueabi --with-sysroot=/build/build_server/rsa/jobs/1261/buildroot/platforms/tizen2.2/rootstraps/tizen-device-2.2.devel Thread model: posix gcc version 4.5.4 20120105 (prerelease) (Linaro GCC 4.5-2012.01) Furthermore as an old Unix guy I have never liked the current bloat in names like here : --prefix=/build/build_server/rsa/jobs/1261/temp/install-arm-linux and --with-sysroot=/build/build_server/rsa/jobs/1261/buildroot/platforms/tizen2.2/rootstraps/tizen-device-2.2.devel Prefering simpler and much shorter names like : --prefix=/opt/cross and --with-sysroot=/opt/host-arm-tizen-linux-gnueabi Nothing should disable one to try first crosstoolchains for some existing target like Tizen. for instance gcc-4.6.x, gcc-4.7.x, gcc-4.8.x, gcc-4.9.x for that. The previous Linaro-made toolchain could give some hints for configuring the self-made GCCs... Like I shamelessly did : [root@HP-Pavilion bin]# arm-tizen-linux-gnueabi-gcc-4.8 -v Using built-in specs. COLLECT_GCC=arm-tizen-linux-gnueabi-gcc-4.8 COLLECT_LTO_WRAPPER=/media/2c439158-ef3e-4dcf-a63b-03191c302829/opt/cross/bin/../lib/gcc/arm-tizen-linux-gnueabi/4.8.2/lto-wrapper Target: arm-tizen-linux-gnueabi Configured with: ../configure --build=i686-linux-gnu --host=i686-linux-gnu --target=arm-tizen-linux-gnueabi --prefix=/opt/cross --with-sysroot=/opt/host-arm-tizen-linux-gnueabi --libdir=/opt/cross/lib --libexecdir=/opt/cross/lib --enable-languages=c,c++ --disable-sjlj-exceptions --without-included-gettext --enable-shared --enable-threads=posix --disable-nls --disable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-checking=release --enable-version-specific-runtime-libs --with-arch=armv7-a --with-tune=cortex-a8 --with-float=softfp --with-fpu=vfpv3-d16 --with-gxx-include-dir=/opt/cross/include/c++/4.8.2 --program-prefix=arm-tizen-linux-gnueabi- --program-suffix=-4.8 Thread model: posix gcc version 4.8.2 (by Kai Ruottu)