undefined reference to `gt_ggc_mx_machine_function(void*)' `gt_pch_nx_machine_function(void*)'
William Tambe
tambewilliam@gmail.com
Fri Mar 22 23:55:00 GMT 2019
Thank you for taking the time to respond.
My machine_function is marked as GTY and defined as follow:
/* Per-function machine data. */
struct GTY(()) machine_function {
/* Number of bytes saved on the stack for local variables. */
int local_vars_size;
/* The sum of 2 sizes: locals vars and padding byte for saving the
* registers. Used in expand_prologue () and expand_epilogue(). */
int size_for_adjusting_sp;
};
Please, also find attached gcc/config/pu32/pu32.{c,h} files that I am using.
For now I am trying to get it to compile, even though the assembly
that gcc will generate will not be correct.
On Fri, Mar 22, 2019 at 1:39 AM Segher Boessenkool
<segher@kernel.crashing.org> wrote:
>
> On Thu, Mar 21, 2019 at 10:30:31PM -0500, William Tambe wrote:
> > I am porting GCC to a new 32bits cpu.
> >
> > Any idea what could be the reason that I am getting undefined references to:
> > gt_ggc_mx_machine_function(void*)
> > gt_pch_nx_machine_function(void*)
> >
> > Which macro or target-macro should I define to avoid such error ?
>
> You probably forgot to mark your machine_function as GTY. It should be
> something like
>
> struct GTY (()) machine_function {
> int a;
> int b;
> };
>
> (See other ports for examples).
>
>
> Segher
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pu32.c
Type: text/x-csrc
Size: 9087 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-help/attachments/20190322/828387fb/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pu32.h
Type: text/x-chdr
Size: 10890 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-help/attachments/20190322/828387fb/attachment-0003.bin>
More information about the Gcc-help
mailing list