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

Re: [MiNT] GCC 4.6.3 fails for multilib on m68k



On 09/10/12 16:24, Vincent Rivière wrote:
> On 10/09/2012 13:59, Alan Hourihane wrote:
>> As can be seen the -mcpu=5475 option with -O2 causes code to be output
>> that won't execute on m68k causing the illegal instruction.
>
> Oh, this is very bad.
>
> So GCC assumes that programs built with different multilibs can be run
> on the build machine, and of course this can't work in the case of
> ColdFire libs, as well as building 68020-60 libs on 68000.
>

Yes, not that many would run the compiler on 68000 :-)

> IMHO the configure scripts should treat compilation for a different
> multilib as cross-compilation. But this is a wider problem...
>
>> Any ideas how we can remedy this situation ? i.e. don't pass the CPU
>> flag during configure stage or something else ?
>
> That may cause other side effects...
>
> A quick and dirty solution would be to patch the configure script to
> force cross-compilation mode for the EOF test only, so that particular
> test case will work.
> But the underlying problem will remain.
>

Yes. I'm surprised this hasn't been a problem before, but I guess the
programs that GCC tries to execute are small and the instructions
emitted have never crossed CPU boundaries.

Alan.