[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: XenSummit: Empty per-arch files
On 28.06.23 15:46, Andrew Cooper wrote: On 28/06/2023 2:26 pm, Juergen Gross wrote:On 28.06.23 13:32, Andrew Cooper wrote:Hello, This wasn't a formal discussion point at XenSummit, but Oleksii pointed out that it was still a problem, hence this thread. As we take on more architectures, it becomes more and more important for things to be handled in a mostly-common way. With that comes quite a lot of <xen/foo.h> including <asm/foo.h>, and the arch one being a stub in simple cases. It would be nice to get rid of the stub files; they're irritating to deal with, both when refactoring and simply for the file bloat they create. There are two options which come to mind. 1) Use __has_include(). This would be ideal, but would require us bumping the minimum GCC version to 4.9.2 as a prerequisite. I'm not aware of any way to emulate the necessary behaviour on older toolchains. 2) Have a stub "architecture" which is always last on the include path. This would reduce the number of stub files from one set per arch, to only one set. Anything else that I've missed?What about a make rule creating an empty include file if it is missing?Wouldn't that cause a typo'd header file name to spring into existence ? And it would cause a build to leave the working tree dirty. Depends how it is done. There could be a file containing the allowed header names to be generated. And the files wouldn't need to be generated in arch/<arch>/include/asm, but could be generated in e.g. include/generated/asm which would be used after the arch include path. This would basically be the central stub variant you were mentioning, but building it dynamically. Juergen Attachment:
OpenPGP_0xB0DE9DD628BF132F.asc Attachment:
OpenPGP_signature
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |