From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4831 invoked by alias); 1 Nov 2009 22:37:14 -0000 Received: (qmail 4821 invoked by uid 22791); 1 Nov 2009 22:37:13 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-px0-f192.google.com (HELO mail-px0-f192.google.com) (209.85.216.192) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 01 Nov 2009 22:37:08 +0000 Received: by pxi30 with SMTP id 30so2769682pxi.14 for ; Sun, 01 Nov 2009 14:37:07 -0800 (PST) MIME-Version: 1.0 Received: by 10.114.29.14 with SMTP id c14mr2575363wac.111.1257115027074; Sun, 01 Nov 2009 14:37:07 -0800 (PST) In-Reply-To: References: <26eb53620910262036l30235febh11fe83ba4353351a@mail.gmail.com> <26eb53620910262044g15335b4etd75caa03bca635b5@mail.gmail.com> From: Aravinda Date: Sun, 01 Nov 2009 22:37:00 -0000 Message-ID: <26eb53620911011436s4ff2cdbah38db52a32248fd6c@mail.gmail.com> Subject: Re: undefined reference to `gt_pch_nx_tree_code' To: Laurynas Biveinis Cc: gcc Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2009-11/txt/msg00005.txt.bz2 Hi, Thanks a lot for the reply.=A0No, 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 =3D NULL; ... #include "gt-tree-boud.h" 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[] =3D { =A0=A0{ =A0=A0 =A0&boud_ins, =A0=A0 =A01, =A0=A0 =A0sizeof(boud_ins), =A0=A0 =A0>_ggc_m_P9tree_code4htab, =A0=A0 =A0>_pch_n_P9tree_code4htab =A0=A0}, =A0=A0LAST_GGC_ROOT_TAB }; The function=A0`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 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. =A0Any chance > that your source does not include tree.h and defines some tree_code > type of its own? > > 2009/10/27 Aravinda : > > 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 sourc= e 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.=A0I 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=A0=A0 -lmpfr -l= gmp > > -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