[PATCH] fake pre-processor macros when building on non-FreeBSD
rmh at debian.org
Tue Jul 12 21:06:13 UTC 2011
2011/7/12 Alexander Kabaev <kabaev at gmail.com>:
> Whatever happened to using a proper cross-tool to do the job?
Why would one need to build a cross-compiler in order to compile
userland-agnostic code for the same CPU architecture? This would be
like requiring a cross-compiler in order to build things like GRUB or
> Why is this hack needed?
The kernel tree expects flags like __linux__ or __FreeBSD__ to have a
different meaning when compiling for kernel space. Instead of "we're
building code that will run on $foo", they mean "we're building $foo
itself". This assumption is correct most of the time, but not always
so. My patch addresses some of the situations in which the assumption
More information about the freebsd-hackers