From patchwork Tue Feb 11 20:41:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Paul_Bu=C3=9Fmann?= X-Patchwork-Id: 319409 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 58AF22C007C for ; Wed, 12 Feb 2014 07:42:11 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:mime-version :content-transfer-encoding:content-type; q=dns; s=default; b=Txy /mpTXgnlH1mBWB41Km6m3g23BHfqKwZt/QFC3F09ZB5Zt54Amqap8AguDr484Q4r D3nh7eyfiDrpRNN5FyH2oq/236nyddasE3a2/xBmBvAY09Vxs/m8W1TX7nS6BdMd w3p7ORsSGY+6zilPMfIaXhRufnodvcVJ+4u4AKFg= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:mime-version :content-transfer-encoding:content-type; s=default; bh=hB4eMoDyV Ba+7NuLUfNp9mQ1YVg=; b=ZSAbFQ1/sCgcXUDVqUBvEZi2+pHrOiXFO1s1YGvdG 4T4a6vpk0A7+H9nQwQXIhqTHFpgY5M3jkUTKMj+rddFslpOoEDo60nGKqi945fJD kTTcUDRF/4fhIoBQeaXwfQ5I2k67BzFm2PsKtdf7ipskoH41KMKBmIbUI2SKt/Ft Mw= Received: (qmail 2520 invoked by alias); 11 Feb 2014 20:41:52 -0000 Mailing-List: contact crossgcc-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: crossgcc-owner@sourceware.org Delivered-To: mailing list crossgcc@sourceware.org Received: (qmail 2410 invoked by uid 89); 11 Feb 2014 20:41:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL, BAYES_00, KAM_LIVE, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=no version=3.3.2 X-HELO: moutng.kundenserver.de Received: from moutng.kundenserver.de (HELO moutng.kundenserver.de) (212.227.126.187) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Tue, 11 Feb 2014 20:41:49 +0000 Received: from paul-ms-7599.localnet (p54BC5D0C.dip0.t-ipconnect.de [84.188.93.12]) by mrelayeu.kundenserver.de (node=mreue006) with ESMTP (Nemesis) id 0Lv4go-1VD8tE0Ayo-010PnR; Tue, 11 Feb 2014 21:41:46 +0100 From: Paul =?ISO-8859-1?Q?Bu=DFmann?= To: crossgcc@sourceware.org Subject: Building cross-toolchain "i586-mingw32msvc, armv4t-linux-gnueabi" hosted on Windows/MinGW32 targeting Linux on Beagle Bone Date: Tue, 11 Feb 2014 21:41:44 +0100 Message-ID: <2614894.GOQTVqqLWu@paul-ms-7599> User-Agent: KMail/4.10.5 (Linux/3.8.0-26-generic; KDE/4.10.5; x86_64; ; ) MIME-Version: 1.0 X-IsSubscribed: yes Hello, first of all thanks for all your development efforts! I have chosen crosstool-NG to generate a toolchain hosted on Windows/MinGW32 targeting Linux on Beagle Bone. I found most of this already prepared. Cool stuff! There are only two small patches needed, to disable a not-needed check from gcc's configure that breaks the canadian cross compilation for MinGW32. I developed them with idea from [1] and [2]. In [1] the correct cause was identified: "Without the patch, auto-host.h [will] define caddr_t" and in [2] there is "the configure script in its infinite wisdom has created a header with #define caddr_t char * in it". I realized that everything runs fine, if auto-host.h does _not_ define caddr_t. Instead of patching mingwrt-3.18-mingw/include/sys/types.h as proposed in [1] and [2] I am removing the non-needed check from gcc's configure. The patch seems to be _always_ needed whenever building for MinGW32 and is available since 2011-05-14, but either didn't got upstream to the MinGW32 runtime or GCC. 1. Does anyone know about a bug report at MinGW32 about the missing "caddr_t" to fix canadian cross compilation? 2. Does anyone know about a bug report at GCC to remove the un-needed "AC_CHECK_TYPE(caddr_t, char *)" to fix canadian cross compilation? 3. Is there a chance to get the patch (see below) integrated in crosstool-NG to fix canadian cross compilation using my sample config (see below)? The toolchain created using my sample config and the patch runs at least on Windows XP 32-Bit and React OS. I tested the executables on a Beagle Bone (White) running Debian Wheezy. Please integrate the patch if you don't mind, so others can use my sample config, too and put the config to the samples. Thanks! Best regards, Paul [1] http://article.gmane.org/gmane.comp.gcc.cross-compiling/13676 [2] http://boggyb.livejournal.com/303174.html ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ New config "i586-mingw32msvc,armv4t-linux-gnueabi": CT_EXPERIMENTAL=y CT_LOCAL_TARBALLS_DIR="${HOME}/src" CT_SAVE_TARBALLS=y CT_LOG_EXTRA=y CT_ARCH_ARCH="armv4t" CT_ARCH_FLOAT_SW=y CT_ARCH_arm=y CT_CANADIAN=y CT_HOST="i586-mingw32msvc" CT_KERNEL_linux=y CT_BINUTILS_V_2_22=y CT_BINUTILS_LINKER_LD=y CT_BINUTILS_LD_WRAPPER=y CT_CC_GCC_SHOW_LINARO=y CT_CC_LANG_CXX=y CT_CC_GCC_DISABLE_PCH=y CT_CC_GCC_BUILD_ID=y CT_CC_GCC_LNK_HASH_STYLE_BOTH=y CT_LIBC_EGLIBC_V_2_13=y CT_EGLIBC_OPT_SIZE=y --- For unsubscribe information see http://sourceware.org/lists.html#faq --- gcc-linaro-4.8-2013.12.orig/gcc/configure.ac 2014-02-10 21:55:16.393001586 +0100 +++ gcc-linaro-4.8-2013.12/gcc/configure.ac 2014-02-10 21:57:01.786844272 +0100 @@ -1069,7 +1069,6 @@ fi AC_CHECK_TYPE(ssize_t, int) -AC_CHECK_TYPE(caddr_t, char *) GCC_AC_FUNC_MMAP_BLACKLIST ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --- gcc-linaro-4.8-2013.12.orig/gcc/configure 2014-02-11 00:16:43.405123868 +0100 +++ gcc-linaro-4.8-2013.12/gcc/configure 2014-02-11 00:16:51.269241687 +0100 @@ -9153,19 +9153,6 @@ fi -ac_fn_c_check_type "$LINENO" "caddr_t" "ac_cv_type_caddr_t" "$ac_includes_default" -if test "x$ac_cv_type_caddr_t" = x""yes; then : - -else - -cat >>confdefs.h <<_ACEOF -#define caddr_t char * -_ACEOF - -fi - - - ac_fn_c_check_header_preproc "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" if test "x$ac_cv_header_sys_mman_h" = x""yes; then : gcc_header_sys_mman_h=yes