On 18/11/2013 22:15, Miro Kropáček wrote:
I'm happy to announce that I have successfully managed to compile a native build of GCC for any m68k platform (020-60, 060, ColdFire, ...) without any dirty hacks incl. the ability to produce code for given platform by default (thanks Markus!) and still keeping the ability to have multilib support.
Very good :-)This is probably what anyone expects: without any additional option, gcc produces executables for the current machine. It means that ColdFire users don't have to add any special switches on the gcc command line to produce ColdFire executables. The situation is similar on 32/64-bit Linux systems.
However, there's one problem with this: if gcc (running on FireBee, for example) produces -mcpu=5475 code by default, it breaks all the multilib-aware libraries on our platform (mintlib, libm, cflib, gemlib, perhaps couple of others) because it assumes that nothing on command line == -m68000.
You mean that:- If no option is specified, the output is produced for the current CPU (build machine).
- If some Makefile wants to produce 68000 executables (whatever the build machine is), then -m68000 has to be explicitly added on the gcc command line (usually in CFLAGS).
As a result:- All the Makefiles used to produce explicit 68000 binaries must be modified by adding -m68000 in CFLAGS, otherwise the output will be for the build machine.
I think this is a sane decision. If you explicitly want 68000 binaries, then add -m68000 on the command line. -- Vincent Rivière