On 5 July 2012 03:59, Laurynas Biveinis wrote:
> 2012/7/4 Jonathan Wakely <jwakely....@gmail.com>:
>> At some point in the past few weeks it became impossible to build
>> trunk from a sparse checkout that omits certain directories.
>>
>> Because I nearly always configure with --enable-languages=c,c++ I use
>> git's core.sparseCheckout=true config or "svn update --set-depth" to
>> avoid checking out the front-ends, libs and tests for java, fortran
>> and ada.  This has always worked fine until recently, when it resulted
>> in http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53832
>>
>> /home/jwakely/src/gcc/gcc/cp/lex.c:559:41: error: macro
>> "ggc_alloc_cleared_lang_decl" passed 1 arguments, but takes just 0
>> /home/jwakely/src/gcc/gcc/cp/lex.c: In function 'retrofit_lang_decl':
>> /home/jwakely/src/gcc/gcc/cp/lex.c:559: error: 'ggc_alloc_cleared_lang_decl'
>> undeclared (first use in this function)
>>
>> I know what I'm trying to do isn't supported, but if the contents of
>> gcc/ada and gcc/fortran are required to build, shouldn't it be a hard
>> error if they're missing, rather than generating an unusable
>> gtype-desc.h file?
>
> Gengtype is a mess in frontend processing too. It ignores
> --enable-languages, parses all the dirs it finds, and expects the
> types that are defined in multiple frontends, such as lang_decl, to
> have identical GTY options. Please try adding GTY variable_size option
> to those lang_decl declarations that don't have it (go, lto, c)

It took me a while to get back to this, but your suggestion worked,
this patch allows bootstrapping to get past cp/lex.o, it hasn't
finished yet so I haven't run the tests:

Index: gcc/c/c-lang.h
===================================================================
--- gcc/c/c-lang.h      (revision 189240)
+++ gcc/c/c-lang.h      (working copy)
@@ -36,7 +36,7 @@
   tree objc_info;
 };

-struct GTY(()) lang_decl {
+struct GTY((variable_size)) lang_decl {
   char dummy;
 };


Presumably gengtype goes through directories alphabetically, so if it
doesn't find gcc/ada before gcc/c then it creates an invalid
gtype-desc.h

Reply via email to