Thanks, Jim. Now I'm clear why it does not need three steps that I originally thought it should be. I'm building on 14.04/x64. lsb_release -r gives me: Release: 14.04 uname -a gives me: Linux ubuntu64 3.13.0-57-generic #95-Ubuntu SMP Fri Jun 19 09:28:15 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
Also, I did sync to master branch of ABE, because the 'stable' branch does not support " --with-fileserver=148.251.136.42 --with-remote-snapshots=/snapshots-ref " options for configure.
I don't know why I got 2_24 binutils but not 2_25. I will do some check later.
I do have tried on a different Ubuntu PC which has 12.04. And I'm running into problem when do the second around build with host set to i686-w64-mingw32: ld cannot find libmpfr when building mpc. I also noticed on the 12.04 system, it is running gcc (Ubuntu/Linaro 4.4.7-1ubuntu2) but on my 14.04 Ubuntu it is using gcc (Ubuntu 4.8.4-2ubuntu1~14.04). So the first step of the three steps you mentioned make sense here: it needs a right GCC at the start point.
Anyway, I will focus on the 14.04 Ubuntu station and take a look why I'm not getting the right binutils source.
BTW, in another thread Rob mentioned "MakeRelease.job", thank you. I did have a look of this file, also the 'slave.sh' under the same folder. I tried a little by using the -workspace option but got no luck either.
Thanks,
Qyq
-----Original Message----- From: Jim Wilson [mailto:jim.wilson@linaro.org] Sent: Thursday, July 16, 2015 4:32 PM To: strongq Cc: Linaro Toolchain Mailman List Subject: Re: abe: cross native toolchain compilation for aarch64-linux-gnu
On Thu, Jul 16, 2015 at 12:40 PM, strongq strongq@codeaurora.org wrote:
The config.log is under "_build/builds/i686-w64-mingw32/aarch64-none-elf/binutils-gdb.git~linaro_binutils-2_24-branch-binutils/libiberty" My understanding that it is for building the binutils.
Yes. So I was looking at the wrong config.log file. But even in this one, I see that the test for strerror was run. configure:5956: checking for library containing strerror configure:5990: i686-w64-mingw32-gcc -o conftest.exe -g -O2 -D__USE_MINGW_ACCES\ S -static-libstdc++ -static-libgcc -Wl,--stack,12582912 conftest.c >&5 configure:5990: $? = 0
However, I don't have a linaro_binutils-2_24-branch-binutils tree. I have a linaro_binutils-2_25-branch-binutils tree. I mentioned before, I am doing builds on a Ubuntu 14.04LTS (x64_64) system, using the master branch of abe. I don't think that you have mentioned the host OS or the abe branch. You must be using a different abe version. Perhaps there is a bug in the abe version that you have. Or maybe if you are running a different version of linux, maybe there is an interaction problem between abe and that OS that is causing the build failure. Without full info about your setup, I can't reproduce your problems, and hence can't easily help you.
So with default host setting, it will build the binutils last. But why with i686-w64-mingw32 host, it will build this binutils right after building infrastructure? Is it expected or something wrong with my config?
binutils always gets built before gcc. However, it is possible that it was installed last, and that "make install" caused some files to be created inside the binutils dir, such as doc files not created by make all but required by make install. Or maybe binutils was installed first, but was the only dir that created files in the build tree at make install time. Either of these could explain why the binutils dir has the newest timestamp at the end.
I read about Canadian Cross from Wikipedia: https://en.wikipedia.org/wiki/Cross_compiler#Canadian_Cross
You could also try looking at http://crosstool-ng.org It is another set of scripts like abe to do builds.
But still not fully understand the magic here with ABE. I think the x86_64-unknown-linux-gnu folder is for building the toolchain for ARM target, but runs on Linux PC. But how this could be used for generate toolchain for running on Windows? Seems i686-w64-mingw32-gcc is not involved during the build, isn't it?
The basic process for building a canadian cross requires 3 steps. 1) Build a cross compiler to the host (build=x86_64-linux target=i686-w64-mingw32) 2) Build a cross compiler for the target (build=x86_64-linux target=aarch64-linux) 3) Build a canadian cross compiler (build=x86_64-linux host=i686-w64-mingw32 target=aarch64-linux)
In the third step, we use the compiler from step 1 to create all of the binaries that will run on the host machine. Also, in the third step, we use the compiler from step 2 to create all of the libraries that will run on the target machine.
Abe takes a short cut here, and uses the Ubuntu mingw32 package to supply the compiler for step 1. So we only need to do the last two steps.
Jim