From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17335 invoked by alias); 26 Mar 2012 12:25:43 -0000 Received: (qmail 17150 invoked by uid 22791); 26 Mar 2012 12:25:41 -0000 X-SWARE-Spam-Status: No, hits=-1.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,TW_JL X-Spam-Check-By: sourceware.org Received: from mail-ob0-f175.google.com (HELO mail-ob0-f175.google.com) (209.85.214.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 26 Mar 2012 12:25:28 +0000 Received: by obqv19 with SMTP id v19so5564122obq.20 for ; Mon, 26 Mar 2012 05:25:27 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.119.71 with SMTP id ks7mr27561537obb.9.1332764727711; Mon, 26 Mar 2012 05:25:27 -0700 (PDT) Received: by 10.60.79.132 with HTTP; Mon, 26 Mar 2012 05:25:27 -0700 (PDT) Date: Mon, 26 Mar 2012 12:25:00 -0000 Message-ID: Subject: Cross compilation problem From: Alexey Umnov To: gcc-help@gcc.gnu.org Content-Type: text/plain; charset=UTF-8 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: 2012-03/txt/msg00351.txt.bz2 Dear all! I'm trying to build a cross-compiler. My build machine is 64bit linux (Ubuntu 11.10). Here is the configuration command: ../configure --prefix=$PREFIX --target=arm-linux-androideabi --with-sysroot=$SYSROOT --with-host=i386-linux-gnu --with-gnu-as --with-gnu-ld --enable-languages=c,c++ --disable-sjlj-exceptions --disable-libssp --enable-threads --disable-nls --disable-libmudflap --disable-shared --disable-tls --with-float=soft --with-fpu=vfp --with-arch=armv5te --enable-target-optspace --enable-initfini-array After that I run usual "make" The problem is that the tools that is being built are not 32bit executables, they are rather 64bit (ELF 64-bit LSB executable, x86-64). This is not what I expected because of "--with-host=i386-linux-gnu" parameter which as far as I understand tells the build system to build a compiler that runs on 32bit linux machine. Actually I have the toolchain built to be ran on 64bit linux. Now I need a 32bit linux toolchain. To be more clear, I need a cross compiler that is being built on 64bit linux, runs on 32bit linux and produces binaries for android. I suppose the following parameters should be set as following: --with-build=x86_64-linux-gnu ( I suppose it's not necessary - will be autodetected) --with-host=i386-linux-gnu --with-target=arm-linux-androideabi But this doesn't work as I expect. What could be the mistake? Thank You in advance! ---------------------------- Best regards! Alexey Umnov umnoff@gmail.com