This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See crosstool-NG for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Building cross-toolchain "i586-mingw32msvc,armv4t-linux-gnueabi" hosted on Windows/MinGW32 targeting Linux on Beagle Bone


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

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- 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


------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]