Patch for xconfig
My customers complain that using certain canned configurations xconfig does not work (naturally, it works with defconfig). A problem that I am trying to fix is that it can refuse to quit with something like "Variable CONSTANT_M does not exist". The necessary "global" is indeed missing.
Can someone knowledgeable (like Chastain) have a look at the attached patch?
Thanks,
-- Pete
scripts/tkgen.c +14 -0
@@ -625,6 +625,7 @@if ( ! vartable[i].global_written ) {global ( vartable[i].name ); + vartable[i].global_written =1 ; }printf ("\t" ); }
@@ -698,6 +699,19 @@ } } +/* +* Generate global declarations for the dependency chain (e.g. CONSTANT_M). +*/ +for ( tmp = cfg->depend; tmp; tmp = tmp->next ) + { +int i =get_varnum ( tmp->name ); +if ( ! vartable[i].global_written ) + { +global ( vartable[i].name ); + vartable[i].global_written =1 ; + } + } +/* * Generate indentation. */