2010/8/25 Basile Starynkevitch <bas...@starynkevitch.net>: > On Wed, 2010-08-25 at 22:41 +0300, Laurynas Biveinis wrote: >> >> > Besides, testing any gengtype change is very expensive for us (& >> > probably for others), because we have to regenerate all the gt*.[ch] >> > generated files & rebuild the entire compiler at each test. Even with >> > the help of ccache, that takes a lot of time. > > Perhaps my words are not very exact. By testing I meant "debugging". > Currently, we remove every gt* files after every our changes in > gengtype.c and then we make the full compiler, and that does take a lot > of time. I probably am confusing testing & debugging; from my point of > view of gengtype hacker, it is the same!
I still don't see why you have to make a full compiler and why make s-gtype is not enough for you. There is no dependency of gengtype on libbackend.a or anything like that. >> TYPE_LANG_STRUCT is for structs that have a definition per frontend, >> struct lang_decl and lang_type are the canonical examples, which are >> defined by all the rontends and handled naively would result in >> duplicate name clashes. > > Thanks for the nice explanation. I would imagine it could even belong to > gty.texi... IIRC gty.texi does not have a chapter on gengtype internals. IMHO the best place is in the source next to the definition (have no idea why I didn't do it myself couple of months ago). >> > Does the set of configure-d languages matter to gengtype? >> > If yes, how? >> >> I guess no. > > Doesn't that contradict your explanation of GTFILES & @all_gtfiles@ a > few paragraphs above or I very probably misunderstood you. If, as I > believe, GTFILES is based upon @all_gtfiles@ which is autoconf-igured, > then I would imagine the gtyp-input.list should also depend on it. But I > find [ada] tag & ada related files there even when I did not mention ada > to configure (but only C, C++, LTO). > > Or are you suggesting that @all_gtfiles@ is not really autoconf-igured > and always the same? Probably yes, but then why use it? It does not contradict, because, as I said, @all_gtfiles@ pulls in all the frontends unconditionally no matter what you specified with --enable-languages. Now, reading the configure.ac source may suggest that it could have been intended to make @all_gtfiles@ honor --enable-languages, but I can' really tell from cursory reading. Maybe it did once, and then broke and nobody noticed. -- Laurynas