Keith Owens <[EMAIL PROTECTED]>: > >Ugh. That's nasty. Can you imagine a change in the spec language that > >would make this unnecessary? > > The problem is the default which needs to vary from one arch to > another. i386 defaults to bzImage, ia64 to vmlinuz etc. The default > choice for one arch may be completely suppressed on another arch. The > only way I can see round that is to make the default a variable rather > than a string, which introduces its own problems.
Right, I see this part. > The other part of the problem is deciding which kernel format choices > to suppress. Writing > > unless (ia64 or x86 or sparc or sparc64 or ...) suppress VMLINUZ > > is nasty, it really needs the reverse of suppress. Default to suppress, > select if any of several conditions are true. > > unsuppress VMLINUZ if x86 > unsuppress VMLINUZ if ia64 > unsuppress VMLINUZ if sparc > > then the unsuppress commands can be in the arch specific rules.cml, > instead of one big rule that has to be updated for each new arch. The reason that there is no "unsuppress" is that the default value of the visibility predicate is y. Unsuppresses wouldn't be meaningfuly unless you wrote unless n suppress VMLINUZ somewhere. > I'm not sure it is worth the effort to change CML2, I can get the same > effect by defining per arch symbols. John Cowan has proposed allowing the default expression in a choice to be a string-valued derive that must be the name of a choice. This kind of type punning makes me cringe, and anyway it would be hard to check at compile time that the returned string is necessarily valid. I think I may have a better idea. Let the default be a ? : name-valued expression. So your format choice could look something like this: choices kernel_format VMLINUX VMLINUZ IMAGE ZIMAGE BZIMAGE default ((X86 or IA64 or SPARC) ? VMLINUZ : BZIMAGE) This kind of expression would be pretty easy to check at compile time. I'm going to stare at the code for a while and scope out what it would actually take to implement this. -- <a href="http://www.tuxedo.org/~esr/">Eric S. Raymond</a> Probably fewer than 2% of handguns and well under 1% of all guns will ever be involved in a violent crime. Thus, the problem of criminal gun violence is concentrated within a very small subset of gun owners, indicating that gun control aimed at the general population faces a serious needle-in-the-haystack problem. -- Gary Kleck, "Point Blank: Handgun Violence In America" _______________________________________________ kbuild-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/kbuild-devel