Should Xen be a sub-arch or a build option?

Kip Macy kip.macy at gmail.com
Mon Oct 22 11:30:47 PDT 2007


> I'd say a kernel option would be the best choice; code that isn't
> relevant for Xen but is otherwise compiled by default can be bracketed
> with #ifndef XEN.
>

The typical response is sub-arch - and that is what I did in my
perforce branch, but I'd like to explore the build option approach as
sub-arch requires a large amount of header duplication or creating
headers that are empty except for including the native headers.

What if, rather than putting ifndef XEN in 10 or 15 files, I instead
added "native" to options.i386 and marked all those files as "native"
in files.i386  and then put "native" in DEFAULTS. That would allow me
to simply add "nooption native" in a XEN kernel config and disable
their compilation without touching the files themselves.

    -Kip


More information about the freebsd-arch mailing list