On 13 March 2014 07:42, Felipe Rocha da Rosa <frdar...@inf.ufrgs.br> wrote:
>
>> On 12 March 2014 09:57, Renato Golin <renato.go...@linaro.org> wrote:
>> > On 11 March 2014 23:47, Felipe Rocha da Rosa <frdar...@inf.ufrgs.br>
>> > wrote:
>> >> I'm trying to build the native compiler to a arm a9 using this
>> >> tutorial,
>> >> https://wiki.linaro.org/WorkingGroups/ToolChain/Using/GCCNative.
>> >> However, I need to compile in a x86_64 platform ubuntu,
>> >> like this --target=arm-unknown-eabi --build=i686-pc-linux-gnu
>> >> --host=arm-unknown-eabi, but without success.
>> >
>> > It's odd that you have to set --host as ARM, since your host is x86_64.
>> >
>> > Also, GCC might be different, but arm-unknown-eabi is a bare metal
>> > toolchain, not a linux one, maybe that's another source of problems.
>> > Try arm-linux-gnueabi for soft-float and arm-linux-gnueabihf for
>> > hard-float.
>> >
>>
>> IIUC, what you are trying to do is called "Canadian Cross" build,
>> which involves to use a cross-compiler:
>> - you'll use an x86_64 compiler to build a cross-compiler, running on
>> x86_64 and producing code for ARM.
>> - then you'll use this cross-compiler to cross-build the native-ARM
>> compiler.
>>
>> I believe there is some documentation in GCC about Canadian Cross
>> builds, and I think cbuild2 supports such builds too.
>>
>> Christophe.
>
> Let's me explain, I want to compile that will be hosted and working  in a
> ARM  A9 Linux producing ARM binary (cross-native), but I need to create this
> compiler in my machine ubuntu x86_x64. Canadian cross, I think is when the
> three are different archs

But the process is similar.

Please try my hack based on Linaro crosstool-ng Canadian windows build.

(1) wget 
http://cbuild.validation.linaro.org/snapshots/crosstool-ng-linaro-1.13.1-4.8-2014.02.tar.bz2
(2) tar -xf crosstool-ng-linaro-1.13.1-4.8-2014.02.tar.bz2
(3) cd crosstool-ng-linaro-1.13.1-4.8-2014.02
(4) patch -p1 < hack.patch (attached. It changes HOST from
i586-mingw32msvc to arm-linux-gnueabi)
(5) make -f contrib/linaro/build.mk TARGETS=arm-linux-gnueabi

Please ignore the fails at the end to package windows staffs. And you
will get a toolchain at

./builds/arm-linux-gnueabi-win32/install

To build your gcc,
(1) Replace the gcc-linaro-4.8-2014.02 at
./builds/arm-linux-gnueabi-win32/.build/src
(2) Remove builds/stamp/arm-linux-gnueabi-win32-build
(3) make -f contrib/linaro/build.mk TARGETS=arm-linux-gnueabi

Good luck!

-Zhenqiang

> I 'm compiling now this  ../configure   --target=arm-none-linux-gnueabi
> --build=x86_64-linux-gnu  --host=arm-none-linux-gnueabi,
>
> Thank you.
>
>
>
>
> _______________________________________________
> linaro-toolchain mailing list
> linaro-toolchain@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/linaro-toolchain
>
diff -aru crosstool-ng-linaro-1.13.1-4.8-2014.02/contrib/linaro/build.mk modified/contrib/linaro/build.mk
--- crosstool-ng-linaro-1.13.1-4.8-2014.02/contrib/linaro/build.mk	2014-02-20 18:16:14.000000000 +0800
+++ modified/contrib/linaro/build.mk	2014-03-13 09:12:39.261004793 +0800
@@ -321,7 +321,6 @@
 		-exec $(FINAL)/bin/*-objcopy $(SECTIONS) {} \;
 
 # Override in local.mk to skip using the LSB compilers
-USE_LSBCC ?= CT_BUILD_USE_LSBCC=y
 
 # Settings to add just for Linux
 LINUX_ADD = \
@@ -330,7 +329,7 @@
 # Settings to add just for win32
 WIN32_ADD = \
 	CT_CANADIAN=y \
-	CT_HOST=\"i586-mingw32msvc\" \
+	CT_HOST=\"arm-linux-gnueabi\" \
 	CT_BINUTILS_GOLD_THREADS=n
 
 WIN32_REMOVE = \
diff -aru crosstool-ng-linaro-1.13.1-4.8-2014.02/samples/linaro-arm-linux-gnueabi/crosstool.config modified/samples/linaro-arm-linux-gnueabi/crosstool.config
--- crosstool-ng-linaro-1.13.1-4.8-2014.02/samples/linaro-arm-linux-gnueabi/crosstool.config	2014-02-20 18:16:14.000000000 +0800
+++ modified/samples/linaro-arm-linux-gnueabi/crosstool.config	2014-03-13 09:17:10.333505006 +0800
@@ -1,11 +1,10 @@
 #
 # Automatically generated make config: don't edit
-# crosstool-NG linaro-1.13.1+bzr2559 Configuration
-# Fri Apr 26 16:32:16 2013
+# crosstool-NG linaro-1.13.1-4.8-2014.02 Configuration
+# Thu Mar 13 09:16:54 2014
 #
 CT_CONFIGURE_has_xzutils=y
 CT_CONFIGURE_has_cvs=y
-CT_CONFIGURE_has_svn=y
 CT_MODULES=y
 
 #
@@ -115,7 +114,7 @@
 CT_ARCH_LE=y
 CT_ARCH_32=y
 CT_ARCH_BITNESS=32
-CT_ARCH_FLOAT_HW=y
+# CT_ARCH_FLOAT_HW is not set
 # CT_ARCH_FLOAT_SW is not set
 CT_TARGET_CFLAGS="-g -O2"
 CT_TARGET_LDFLAGS=""
@@ -173,9 +172,7 @@
 #
 CT_FORCE_SYSROOT=y
 CT_USE_SYSROOT=y
-CT_PREBUILT_SYSROOT=y
-CT_PREBUILT_NAME="linaro-prebuilt-sysroot-2013.10"
-CT_PREBUILT_BASE_URL="http://launchpad.net/linaro-toolchain-binaries/support/01/+download";
+# CT_PREBUILT_SYSROOT is not set
 CT_SYSROOT_NAME="libc"
 CT_SYSROOT_DIR_PREFIX=""
 # CT_STATIC_TOOLCHAIN is not set
@@ -210,20 +207,19 @@
 # Misc options
 #
 CT_TOOLCHAIN_ENABLE_NLS=y
-CT_TOOLCHAIN_ENABLE_MULTILIB=y
+# CT_TOOLCHAIN_ENABLE_MULTILIB is not set
 
 #
 # Operating System
 #
 CT_KERNEL_SUPPORTS_SHARED_LIBS=y
 CT_KERNEL="linux"
+CT_KERNEL_VERSION="3.1.1"
 # CT_KERNEL_bare_metal is not set
 CT_KERNEL_linux=y
 # CT_KERNEL_prebuilt is not set
 CT_KERNEL_bare_metal_AVAILABLE=y
 CT_KERNEL_linux_AVAILABLE=y
-CT_KERNEL_mingw32_AVAILABLE=y
-CT_KERNEL_prebuilt_AVAILABLE=y
 CT_KERNEL_V_3_1_1=y
 # CT_KERNEL_V_3_1 is not set
 # CT_KERNEL_V_3_0_9 is not set
@@ -236,13 +232,8 @@
 # CT_KERNEL_V_2_6_31_14 is not set
 # CT_KERNEL_V_2_6_27_57 is not set
 # CT_KERNEL_LINUX_CUSTOM is not set
-# CT_KERNEL_LINUX_VERBOSITY_0 is not set
-CT_KERNEL_LINUX_VERBOSITY_1=y
-# CT_KERNEL_LINUX_VERBOSITY_2 is not set
-CT_KERNEL_LINUX_INSTALL_CHECK=y
-# CT_LIBC_GLIBC_KERNEL_VERSION_NONE is not set
-CT_LIBC_GLIBC_KERNEL_VERSION_AS_HEADERS=y
-# CT_LIBC_GLIBC_KERNEL_VERSION_CHOSEN is not set
+CT_KERNEL_mingw32_AVAILABLE=y
+CT_KERNEL_prebuilt_AVAILABLE=y
 
 #
 # Common kernel options
@@ -250,6 +241,15 @@
 CT_SHARED_LIBS=y
 
 #
+# linux other options
+#
+# CT_KERNEL_LINUX_VERBOSITY_0 is not set
+CT_KERNEL_LINUX_VERBOSITY_1=y
+# CT_KERNEL_LINUX_VERBOSITY_2 is not set
+CT_KERNEL_LINUX_VERBOSE_LEVEL=1
+CT_KERNEL_LINUX_INSTALL_CHECK=y
+
+#
 # Binary utilities
 #
 CT_ARCH_BINFMT_ELF=y
@@ -275,6 +275,7 @@
 CT_BINUTILS_GOLD_SUPPORTS_ARCH=y
 CT_BINUTILS_HAS_PLUGINS=y
 CT_BINUTILS_HAS_PKGVERSION_BUGURL=y
+CT_BINUTILS_FORCE_LD_BFD=y
 # CT_BINUTILS_LINKER_LD is not set
 # CT_BINUTILS_LINKER_GOLD is not set
 CT_BINUTILS_LINKER_LD_GOLD=y
@@ -393,12 +394,13 @@
 # C-library
 #
 CT_LIBC="eglibc"
-# CT_LIBC_eglibc is not set
+CT_LIBC_VERSION="linaro-2.18-2013.10"
+CT_LIBC_eglibc=y
 # CT_LIBC_glibc is not set
+# CT_LIBC_prebuilt is not set
 # CT_LIBC_uClibc is not set
-CT_LIBC_prebuilt=y
 CT_LIBC_eglibc_AVAILABLE=y
-# CT_LIBC_EGLIBC_LINARO_V_2_17_2013_07 is not set
+CT_LIBC_EGLIBC_LINARO_V_2_18_2013_10=y
 # CT_LIBC_EGLIBC_V_2_14 is not set
 # CT_LIBC_EGLIBC_V_2_13 is not set
 # CT_LIBC_EGLIBC_V_2_12 is not set
@@ -406,15 +408,29 @@
 # CT_LIBC_EGLIBC_V_2_10 is not set
 # CT_LIBC_EGLIBC_V_2_9 is not set
 # CT_LIBC_EGLIBC_V_TRUNK is not set
+CT_LIBC_EGLIBC_2_14_or_later=y
 CT_LIBC_EGLIBC_2_13_or_later=y
 CT_LIBC_EGLIBC_2_12_or_later=y
 CT_LIBC_EGLIBC_2_11_or_later=y
 CT_LIBC_EGLIBC_2_10_or_later=y
 CT_LIBC_EGLIBC_2_9_or_later=y
 CT_LIBC_EGLIBC_HAS_PKGVERSION_BUGURL=y
-CT_EGLIBC_REVISION="HEAD"
-# CT_EGLIBC_HTTP is not set
-# CT_EGLIBC_CHECKOUT is not set
+
+#
+# svn is missing. You'll have to either:
+#
+
+#
+#   - have a pre-downloaded local tarball
+#
+
+#
+#   - or have a LAN mirror with a pre-downloaded tarball
+#
+
+#
+# otherwise you won't be able to download eglibc
+#
 # CT_EGLIBC_OPT_SIZE is not set
 # CT_EGLIBC_CUSTOM_CONFIG is not set
 CT_LIBC_glibc_AVAILABLE=y
@@ -426,7 +442,6 @@
 CT_LIBC_SUPPORT_THREADS_ANY=y
 CT_LIBC_SUPPORT_NPTL=y
 CT_LIBC_SUPPORT_LINUXTHREADS=y
-# CT_LIBC_LOCALES is not set
 CT_THREADS="nptl"
 
 #
@@ -451,11 +466,31 @@
 CT_LIBC_GLIBC_FORCE_UNWIND=y
 CT_LIBC_GLIBC_USE_PORTS=y
 CT_LIBC_ADDONS_LIST=""
+
 #
-# Common C library options
+# WARNING !!!                                            
 #
-CT_THREADS_NPTL=y
-CT_LIBC_XLDD=y
+
+#
+#   For glibc >= 2.8, it can happen that the tarballs    
+#
+
+#
+#   for the addons are not available for download.       
+#
+
+#
+#   If that happens, bad luck... Try a previous version  
+#
+
+#
+#   or try again later... :-(                            
+#
+# CT_LIBC_LOCALES is not set
+# CT_LIBC_GLIBC_KERNEL_VERSION_NONE is not set
+CT_LIBC_GLIBC_KERNEL_VERSION_AS_HEADERS=y
+# CT_LIBC_GLIBC_KERNEL_VERSION_CHOSEN is not set
+CT_LIBC_GLIBC_MIN_KERNEL="3.1.1"
 
 #
 # Debug facilities
diff -aru crosstool-ng-linaro-1.13.1-4.8-2014.02/scripts/build/companion_libs/libiconv.sh modified/scripts/build/companion_libs/libiconv.sh
--- crosstool-ng-linaro-1.13.1-4.8-2014.02/scripts/build/companion_libs/libiconv.sh	2014-02-20 18:16:14.000000000 +0800
+++ modified/scripts/build/companion_libs/libiconv.sh	2014-03-13 09:22:09.901005613 +0800
@@ -24,7 +24,7 @@
 do_libiconv() {
     mkdir -p "${CT_BUILD_DIR}/build-libiconv"
     cd "${CT_BUILD_DIR}/build-libiconv"
-
+return
     CT_DoStep INFO "Installing libiconv"
 
     CT_DoLog EXTRA "Configuring libiconv"
_______________________________________________
linaro-toolchain mailing list
linaro-toolchain@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-toolchain

Reply via email to