ckaestne/TypeChef

Handle generated header code in Linux

Opened this issue · 0 comments

in /Kbuild there is a generation process for generating include/generated/bounds.h (and others).

The file is generated by Kbuild and sets two macros MAX_NR_ZONES and NR_PAGEFLAGS (at least the latter of which is used in an #if #error combination). The values depend on other features and are computed based on the position of a name in an enum:

__NR_PAGEFLAGS
include/linux/page-flags.h

__MAX_NR_ZONES
include/linux/mmzone.h

we should probably wrap the values and create our own header files here

for now, just generate these headers with ARCH=i368 to avoid the #error during preprocessing