On Thu, Jul 16, 2015 at 12:40 PM, strongq <stro...@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
_______________________________________________
linaro-toolchain mailing list
linaro-toolchain@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/linaro-toolchain

Reply via email to