[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] Binutils 2.18 + GCC 4.2.3
MiKRO a écrit :
I don't know what exactly it means, I changed t-mint from
m68020-60=m68060 to m68060=m68060 and added m68060 to multilib targets.
Where comes that 68040 architecture, that's real mystery for me.
It seems a bit complicated...
First of all, the documentation about multilib:
http://gcc.gnu.org/onlinedocs/gccint/Target-Fragment.html
I think you should first compile with --disable-multilib, and set the default CPU to
68060. Or maybe add the 68060 to the multilib alternatives, but it may be a bit more
complicated (and very much longer to compile !)
The core of the target configuration is in the file gcc/config.gcc
m68k-*-mint*)
tm_file="m68k/m68k.h m68k/m68k-none.h m68k/mint.h"
tm_defines="MOTOROLA USE_GAS"
xm_file=m68k/xm-mint.h
tmake_file=m68k/t-mint
target_cpu_default="M68K_CPU_m68000"
;;
tm_file indicates the headers which will be included for the setup of the options.
First m68k.h is included for standard m68k options.
Then the settings are overriden by m68k-none.h. That settings are intended to generic m68k
boards (but no 68060), they include good default settings for anything, including good
multilib defaults.
Then the settings are overriden by mint.h, which contains only things specific to our OS.
May be it not a good idea to use m68k-none.h.
Its content could be merged to mint.h, then modified for our needs.
I think (not checked) that the following line in gcc/config.gcc
target_cpu_default="M68K_CPU_m68000"
is only used to generate the TARGET_CPU_DEFAULT define, used by m68k-none.h
The most important thing seems to be:
#if TARGET_CPU_DEFAULT == M68K_CPU_m68040
#define ASM_CPU_DEFAULT_SPEC "-mc68040"
#define CC1_CPU_DEFAULT_SPEC "-m68040"
...
#define EXTRA_SPECS \
{ "asm_cpu_default", ASM_CPU_DEFAULT_SPEC }, \
{ "cc1_cpu_default", CC1_CPU_DEFAULT_SPEC }, \
SUBTARGET_EXTRA_SPECS
Your extra -mc68040 my come from there.
VERY good luck for your investigation.
--
Vincent Rivière