Comment 14 for bug 868550

Revision history for this message
Dave Martin (dave-martin-arm) wrote :

I'm still far from convinced that defining __linux__ explicitly is the right thing to do here -- this feels like exchanging a slightly broken situation for a different slightly broken situation which happens to fix our particular problem.

Since __linux__ describes the compiler's target environment, and since the kernel's target environment is fully defined by the kernel and has nothing to do with the compiler's target environment, it does feel like we should have a separate macro, defined by the kernel build system itself.

Filtering the exported headers based on is probably still a good idea. __linux__ still feels wrong for actually filtering the headers -- there's no special reason why I shouldn't build the kernel on another OS, but this shouldn't affect the generated headers which are, by definition, meant for use with a linux-targeted compiler. Maybe we need another macro for this.

I think the number of uses of the macro is small enough that the change is feasible to implement.

Any concerns about this?