On 07/12/11 17:33, Robert Millan wrote:
2011/7/12 Nathan Whitehorn<nwhiteh...@freebsd.org>:
On 07/12/11 16:06, Robert Millan wrote:
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
SeaBIOS.
For one, it might have a different ABI, which isn't actually that different
an issue than the one you find yourself facing.
ABI can mean many things in this context.  It could mean libc ABI, it
could mean internal kernel interfaces, or even C calling conventions.

The one I meant was the third one. Linux and FreeBSD happen, though not entirely by chance, to use almost exactly the same ABI on most platforms (but not all!). Assuming, and requiring, interchangeability of ABIs here thus seems like a poor choice. Once you've decided you might have a different ABI, you need a cross-compiler, and that would simultaneously take care of defining various platform-specific macros.

The "isn't actually that different" comment, which wasn't a particularly useful thing to say, was that you could conceivably claim, under very broad definitions of what ABI means, that having __FreeBSD__ defined is in fact a part of the system ABI, just like the calling conventions or the stack frame layout. In either case, you would be expected to use a cross-compiler.
-Nathan

_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"

Reply via email to