From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29257 invoked by alias); 17 Oct 2011 08:05:49 -0000 Received: (qmail 29237 invoked by uid 22791); 17 Oct 2011 08:05:47 -0000 X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL,BAYES_00,MISSING_HEADERS,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from rayleigh.systella.fr (HELO rayleigh.systella.fr) (213.41.184.253) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 17 Oct 2011 08:05:30 +0000 Received: from [192.168.0.4] (bertrand@cauchy.systella.fr [192.168.0.4]) (authenticated bits=0) by rayleigh.systella.fr (8.14.4/8.14.4/Debian-2) with ESMTP id p9H85L3u004594 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NOT) for ; Mon, 17 Oct 2011 10:05:22 +0200 Message-ID: <4E9BE1C0.2040707@systella.fr> Date: Mon, 17 Oct 2011 08:05:00 -0000 From: BERTRAND Joel User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; fr; rv:1.9.1.19) Gecko/20110929 Iceape/2.0.14 MIME-Version: 1.0 CC: gcc-help@gcc.gnu.org Subject: Re: Build a cross compiler for Android target (arm) References: <4E995534.6040903@systella.fr> <4E9BCC09.3030701@wippies.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit 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/msg00144.txt.bz2 Jeffrey Walton a écrit : > On Mon, Oct 17, 2011 at 2:32 AM, Kai Ruottu wrote: >> 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". > Google has their own stdc and stdc++, which has some compilation > problems. Search the Android NDK group > (http://groups.google.com/group/android-ndk) and the Android Issue > List (http://code.google.com/p/android/issues/list). See, for example, > http://code.google.com/p/android/issues/detail?id=14559. I have checked into faulty configure script : ... case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 ... *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = x""yes; then : lt_cv_dlopen="shl_load" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" if test x$gcc_no_link = xyes; then as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5 fi If I add : eabi*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; make process continues and stops with : checking for sys/types.h... (cached) yes checking for unistd.h... (cached) yes checking for wchar.h... (cached) yes checking for wctype.h... (cached) yes configure: error: No support for this host/target combination. make[1]: *** [configure-target-libstdc++-v3] Erreur 1 make[1]: quittant le répertoire « /home/bertrand/android/android-ndk-r6b/compilers/gcc-build » make: *** [all] Erreur 2 I have removed to try to build a minimal libstdc++. *) //as_fn_error "No support for this host/target combination." "$LINENO" > 5 ;; But if I can configure with my modifications libstdc++, process hangs in libiberty with the same error : checking for library containing strerror... configure: error: Link tests are not allowed after GCC_NO_EXECUTABLES. make[1]: *** [configure-target-libiberty] Erreur 1 I think that eabi case are missing in a lot of configure scripts :-( Regards, JKB