[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Native GCC built



On 20/11/2013 00:43, Alan Hourihane wrote:
The current GCC patch doesn't work on pure 68k because it tries to
compile the m5475 libraries during multilib compilation and execute some
tests with that code linked. They fail and crash, thus aborting GCC
compilation.

You are right.

Now I understand that the multilib design can work in only 2 situations:

1) Cross-compilers. It works because each multilib is handled in the same way: the configure script knows we are cross-compiling, and assumes that the executables can't be run on the build machine. So it assumes default results for some tests.

2) Native compilers where the build machine can run the code produced by every multilib. This is the case for x64 build systems. The test executables produced by the configure scripts can be run, whenever they are x64 or i386. So the results are accurate.

On the other side, the multilib design used in configure scripts fail when the produced binaries can't be run on the build machines. This is your example: 68000 binaries produced on a pure ColdFire system.

The key point: it fails because the configure scripts assume that compiling for a different multilib is some kind of native compilation, while it is actually a cross-compilation. I wonder if there is a setting somewhere in gcc configure scripts to tell "consider multilibs as cross-compilation".

I also wonder what happens when building x64 miltilibs on an i386 machine. Are x64 multilibs handled as cross-compilation? Maybe such compiler is not used at all in the i386 world.

--
Vincent Rivière