Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Jul 2011 18:07:23 -0500
From:      Nathan Whitehorn <nwhitehorn@freebsd.org>
To:        Robert Millan <rmh@debian.org>
Cc:        freebsd-hackers@freebsd.org, Ed Maste <emaste@freebsd.org>, Oliver Pinter <oliver.pntr@gmail.com>
Subject:   Re: [PATCH] fake pre-processor macros when building on non-FreeBSD system
Message-ID:  <4E1CD3AB.3030106@freebsd.org>
In-Reply-To: <CAOfDtXM0b6xN74_g=wx-w8v6h5xApEN1cyBSrNrvZTwg5245xQ@mail.gmail.com>
References:  <CAOfDtXNqydD_hyvo25Arkm=gdqVcSJB8RPfnFL9xozQfS=UeEQ@mail.gmail.com> <CAPjTQNFp8dQBKdFzhPAX1NZ2j%2BLSsffZkOurN0yEb4M%2BpD%2Buow@mail.gmail.com> <CAOfDtXMMej_KORBt1PvAdAL7VvEkzXjpHM=eO_%2BLh=fP5OfWmQ@mail.gmail.com> <20110712164337.07e387eb@kan.dnsalias.net> <CAOfDtXNNpZj=cJE2Mtwth3sXiAtoFr%2B=pAv-TmrzjG-wOb%2B0kw@mail.gmail.com> <4E1CB8C6.7090405@freebsd.org> <CAOfDtXM0b6xN74_g=wx-w8v6h5xApEN1cyBSrNrvZTwg5245xQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 07/12/11 17:33, Robert Millan wrote:
> 2011/7/12 Nathan Whitehorn<nwhitehorn@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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4E1CD3AB.3030106>