From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4050 invoked by alias); 17 Oct 2011 06:33:08 -0000 Received: (qmail 4041 invoked by uid 22791); 17 Oct 2011 06:33:06 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00 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; Mon, 17 Oct 2011 06:32:51 +0000 Received: from [192.168.1.2] (dsl-kmibrasgw1-fe4ade00-105.dhcp.inet.fi [80.222.74.105]) (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 D4C5F1FC06C for ; Mon, 17 Oct 2011 09:32:49 +0300 (EEST) Message-ID: <4E9BCC09.3030701@wippies.com> Date: Mon, 17 Oct 2011 06:33:00 -0000 From: Kai Ruottu User-Agent: Mozilla/5.0 (Windows NT 5.0; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: gcc-help@gcc.gnu.org Subject: Re: Build a cross compiler for Android target (arm) References: <4E995534.6040903@systella.fr> In-Reply-To: <4E995534.6040903@systella.fr> 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-10/txt/msg00137.txt.bz2 15.10.2011 12:41, BERTRAND Joel kirjoitti: > I'm trying to build a cross compiler for Android target as I want to > obtain a Fortran compiler. > > Of course, I have installed android ndk to have sysroot. > Build process stops with : > > checking whether the > /home/bertrand/android/ndk/compilers/gcc-build/./gcc/xgcc > -B/home/bertrand/android/ndk/compilers/gcc-build/./gcc/ > -B/home/bertrand/android/ndk/compilers/arm-android-eabi/bin/ > -B/home/bertrand/android/ndk/compilers/arm-android-eabi/lib/ -isystem > /home/bertrand/android/ndk/compilers/arm-android-eabi/include -isystem > /home/bertrand/android/ndk/compilers/arm-android-eabi/sys-include linker > (/home/bertrand/android/ndk/compilers/gcc-build/./gcc/collect-ld) > supports shared libraries... yes > checking dynamic linker characteristics... no > checking how to hardcode library paths into programs... immediate > checking for shl_load... configure: error: Link tests are not allowed > after GCC_NO_EXECUTABLES. > make[1]: *** [configure-target-libstdc++-v3] Erreur 1 Ok, you have the GCC binaries ready (in $build/gcc) and also libgcc (in $build/libgcc) and then your build crashes when trying to configure libstdc++-v3 ... The C parts are OK, but getting the C++ library fails. So what would be the sane reaction in this situation? For me it would be to try to compile and link a simple "Hello World" app with the new GCC... But maybe Android is too weird for this, no experience about whether it even supports simple "console" apps in a terminal window, requiring some really complex application as that "Hello World". The very common Windows 3.1 and its 32-bit extension "Win32s" hadn't any console for running "text-mode Windows applications" :( In any case installing only the GCC binaries and the libgcc happens with : make install-gcc make install-target-libgcc after which you can try compiling and linking that "Hello World" and can see what errors you will get when linking... The typical mistake is to not allow the self-made gmp, mpfr or mpc shared libs being found by the new GCC binaries but then the crash should happen already during the libgcc configure - that the new 'xgcc' and 'cc1' can be started is a sanity test there... So a "sanity test for the builder" could be whether one is capable to try tests like : ./xgcc -v ./xgcc --help ./cc1 --help in the $build/gcc directory without installing anything there first, in order to see whether the new GCC executables can be run in the cross host system...