* undefined reference to `gt_pch_nx_tree_code' [not found] <26eb53620910262036l30235febh11fe83ba4353351a@mail.gmail.com> @ 2009-10-27 9:51 ` Aravinda 2009-11-01 20:28 ` Laurynas Biveinis 0 siblings, 1 reply; 5+ messages in thread From: Aravinda @ 2009-10-27 9:51 UTC (permalink / raw) To: gcc Hi, I am writing a new pass for gcc that uses the GTY markers, 1. I have included the source file in GTFILES_H in gcc/Makefile.in. 2. I have the gt-path.h mentioned in the compilation for source file 3. I have the #include "gt-path.h" at the very end of the code of source file. I see the gt-path.h is getting created in the build/gcc directory. But I am getting the below error. Is there something I am missing in the Makefile, I tried to look at a similar example of tree-mudflap.c that uses GTY markers, I do not see any difference in the steps I have followed. I havent done gcc dev before, so I'd really appreciate any help in this regard. main.o tree-browser.o libbackend.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a ../libcpp/libcpp.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a -lmpfr -lgmp -rdynamic -ldl libbackend.a(gtype-desc.o): In function `gt_ggc_m_P9tree_code4htab': /home/aravinda/svnbuild/gcc/gtype-desc.c:1968: undefined reference to `gt_ggc_mx_tree_code' libbackend.a(gtype-desc.o): In function `gt_pch_n_P9tree_code4htab': /home/aravinda/svnbuild/gcc/gtype-desc.c:4133: undefined reference to `gt_pch_nx_tree_code' collect2: ld returned 1 exit status make[3]: *** [cc1-dummy] Error 1 Thanks, Aravinda ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: undefined reference to `gt_pch_nx_tree_code' 2009-10-27 9:51 ` undefined reference to `gt_pch_nx_tree_code' Aravinda @ 2009-11-01 20:28 ` Laurynas Biveinis 2009-11-01 22:37 ` Aravinda 0 siblings, 1 reply; 5+ messages in thread From: Laurynas Biveinis @ 2009-11-01 20:28 UTC (permalink / raw) To: Aravinda; +Cc: gcc Hi, It's hard to tell. The normal definition of tree_code is enum in tree.h and it is an atomic type with respect GCC garbage collection. But the names like gt_gcc_mx_tree_code suggest that GCC internals try to treat it as a struct or some other non atomic type. Any chance that your source does not include tree.h and defines some tree_code type of its own? 2009/10/27 Aravinda <aravindakidambi@gmail.com>: > Hi, > > I am writing a new pass for gcc that uses the GTY markers, > 1. I have included the source file in GTFILES_H in gcc/Makefile.in. > 2. I have the gt-path.h mentioned in the compilation for source file > 3. I have the #include "gt-path.h" at the very end of the code of source file. > > I see the gt-path.h is getting created in the build/gcc directory. But > I am getting the below error. Is there something I am missing in the > Makefile, I tried to look at a similar example of tree-mudflap.c that > uses GTY markers, I do not see any difference in the steps I have > followed. I havent done gcc dev before, so I'd really appreciate any > help in this regard. > > main.o tree-browser.o libbackend.a ../libcpp/libcpp.a > ../libdecnumber/libdecnumber.a ../libcpp/libcpp.a > ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a -lmpfr -lgmp > -rdynamic -ldl > libbackend.a(gtype-desc.o): In function `gt_ggc_m_P9tree_code4htab': > /home/aravinda/svnbuild/gcc/gtype-desc.c:1968: undefined reference to > `gt_ggc_mx_tree_code' > libbackend.a(gtype-desc.o): In function `gt_pch_n_P9tree_code4htab': > /home/aravinda/svnbuild/gcc/gtype-desc.c:4133: undefined reference to > `gt_pch_nx_tree_code' > collect2: ld returned 1 exit status > make[3]: *** [cc1-dummy] Error 1 > Thanks, > Aravinda > -- Laurynas ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: undefined reference to `gt_pch_nx_tree_code' 2009-11-01 20:28 ` Laurynas Biveinis @ 2009-11-01 22:37 ` Aravinda 2009-11-01 22:45 ` Laurynas Biveinis 0 siblings, 1 reply; 5+ messages in thread From: Aravinda @ 2009-11-01 22:37 UTC (permalink / raw) To: Laurynas Biveinis; +Cc: gcc Hi, Thanks a lot for the reply. No, I am not using any specific tree_code definitions and I have included tree.h in the pass file. I dont know if some code will help, but, this is what I am doing gcc-svn/gcc/tree-boud.c ... static GTY(( is_param(union tree_code) )) htab_t boud_ins = NULL; ... #include "gt-tree-boud.h" <EOF> The generated gt-tree-boud.h in the build/gcc directory looks like, const struct ggc_root_tab gt_ggc_r_gt_tree_boud_h[] = { { &boud_ins, 1, sizeof(boud_ins), >_ggc_m_P9tree_code4htab, >_pch_n_P9tree_code4htab }, LAST_GGC_ROOT_TAB }; The function `gt_pch_n_P9tree_code4htab' and `gt_ggc_m_P9tree_code4htab' are defined in build/gcc/gtypes-desc.c which references `gt_ggc_mx_tree_code'. And I dont know where this is coming from, gtypes-desc only has an extern definition. Do you think I need to include some library (which has its definition) in the Makefile for compiling tree-boud.o ? Thanks, Aravinda On Sun, Nov 1, 2009 at 3:27 PM, Laurynas Biveinis <laurynas.biveinis@gmail.com> wrote: > > Hi, > > It's hard to tell. The normal definition of tree_code is enum in > tree.h and it is an atomic type with respect GCC garbage collection. > But the names like gt_gcc_mx_tree_code suggest that GCC internals try > to treat it as a struct or some other non atomic type. Any chance > that your source does not include tree.h and defines some tree_code > type of its own? > > 2009/10/27 Aravinda <aravindakidambi@gmail.com>: > > Hi, > > > > I am writing a new pass for gcc that uses the GTY markers, > > 1. I have included the source file in GTFILES_H in gcc/Makefile.in. > > 2. I have the gt-path.h mentioned in the compilation for source file > > 3. I have the #include "gt-path.h" at the very end of the code of source file. > > > > I see the gt-path.h is getting created in the build/gcc directory. But > > I am getting the below error. Is there something I am missing in the > > Makefile, I tried to look at a similar example of tree-mudflap.c that > > uses GTY markers, I do not see any difference in the steps I have > > followed. I havent done gcc dev before, so I'd really appreciate any > > help in this regard. > > > > main.o tree-browser.o libbackend.a ../libcpp/libcpp.a > > ../libdecnumber/libdecnumber.a ../libcpp/libcpp.a > > ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a -lmpfr -lgmp > > -rdynamic -ldl > > libbackend.a(gtype-desc.o): In function `gt_ggc_m_P9tree_code4htab': > > /home/aravinda/svnbuild/gcc/gtype-desc.c:1968: undefined reference to > > `gt_ggc_mx_tree_code' > > libbackend.a(gtype-desc.o): In function `gt_pch_n_P9tree_code4htab': > > /home/aravinda/svnbuild/gcc/gtype-desc.c:4133: undefined reference to > > `gt_pch_nx_tree_code' > > collect2: ld returned 1 exit status > > make[3]: *** [cc1-dummy] Error 1 > > Thanks, > > Aravinda > > > > > > -- > Laurynas ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: undefined reference to `gt_pch_nx_tree_code' 2009-11-01 22:37 ` Aravinda @ 2009-11-01 22:45 ` Laurynas Biveinis 2009-11-02 22:34 ` Aravinda 0 siblings, 1 reply; 5+ messages in thread From: Laurynas Biveinis @ 2009-11-01 22:45 UTC (permalink / raw) To: Aravinda; +Cc: gcc > static GTY(( is_param(union tree_code) )) htab_t boud_ins = NULL; Ah, now it's clear. You probably wanted "union tree_node" with n, not c, here. -- Laurynas ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: undefined reference to `gt_pch_nx_tree_code' 2009-11-01 22:45 ` Laurynas Biveinis @ 2009-11-02 22:34 ` Aravinda 0 siblings, 0 replies; 5+ messages in thread From: Aravinda @ 2009-11-02 22:34 UTC (permalink / raw) To: Laurynas Biveinis; +Cc: gcc Hi, Thanks a lot for your time and replies.. It worked. Im sorry it was a silly mistake that I dint notice. Aravinda On Sun, Nov 1, 2009 at 5:45 PM, Laurynas Biveinis <laurynas.biveinis@gmail.com> wrote: >> static GTY(( is_param(union tree_code) )) htab_t boud_ins = NULL; > > Ah, now it's clear. You probably wanted "union tree_node" with n, not c, here. > > -- > Laurynas > ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-11-02 22:34 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <26eb53620910262036l30235febh11fe83ba4353351a@mail.gmail.com> 2009-10-27 9:51 ` undefined reference to `gt_pch_nx_tree_code' Aravinda 2009-11-01 20:28 ` Laurynas Biveinis 2009-11-01 22:37 ` Aravinda 2009-11-01 22:45 ` Laurynas Biveinis 2009-11-02 22:34 ` Aravinda
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).