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

Re: [MiNT] Still don't get it - difference between 68020 and 68020-60



Miro Kropacek wrote:
And we need -mshort for all targets because the kernel requires -mshort.
Does it? I thought kernel needs libgcc only in 68000 version because
of long mul/div emulation.

I think you are right here, by chance.
The most used stuff in libgcc is mul/div emulation. Since the kernel does not use floats, libgcc is probably not linked (to be verified with -Wl,-t). But if some other libgcc function was used, it would be linked with the wrong libgcc. There is also the __main() function in libgcc, used to call the C++ constructors of global variables and nonstandard C code using that feature. This function is automatically called from main(), I don't know if FreeMiNT has a main() function (EmuTOS has not).

So in any case, libgcc must be provided for every multilib supported by the compiler, including mshort, or we are going to face big troubles some day.

--
Vincent Rivière