This is the mail archive of the
mailing list for the GCC project.
Re: porting new arch
On Tuesday 18 May 2004 14:23, Shinpei Kato wrote:
> Thank you for your replying.
> > Do you mean your arch adds files to gcc/config/mips, or did you base
> > your port on code from the MIPS backend?
> I port a brand-new arch to gcc. It means I added gcc/config/$ARCH and
> wrote $ARCH.md, $ARCH.h, $ARCH.c and so on.
> > > libbackend.a(gtype-desc.o)(.text+0x568): In
> > > function`gt_gcc_mx_function': /.../build-gcc/gcc/gtype-desc.c:259:
> > > undefined reference to
> > > `gt_ggc_mx_machine_function' collect2: ld returned 1 exit status
> > > make: *** [cc1] Error 1
> > Looks like you are missing an include. Does your $ARCH.c define
> > machine_structure (with the proper GTY markers), and does it include
machine_function. mips.c has it too.
> It seems gtype-desc.o needs gt-$ARCH.h, yet, gt-$ARCH.h is generated
> automatically, isn't it?
Yes it is.
> how could I let gtype-desc.o include gt-$ARCH.h?
Add your arch to config.gcc. See config.gcc, configure.in and
Makefile.in, look for $(out_file). When $(out_file) is set
properly, it should Just Work, because that file is added to
GTFILES in Makefile.in. You may need to add other files in
config.gcc, see the comments there.
> And I can't find machine_structure in my $ARCH.c and also in mips.c
> which I based on. how could I define machine_structure?
Because I goofed. Look for machine_function.