Date: Tue, 12 Jul 2011 17:38:03 -0400 From: Alexander Kabaev <kabaev@gmail.com> 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: <20110712173803.4979d741@kan.dnsalias.net> In-Reply-To: <CAOfDtXNNpZj=cJE2Mtwth3sXiAtoFr%2B=pAv-TmrzjG-wOb%2B0kw@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>
next in thread | previous in thread | raw e-mail | index | archive | help
--Sig_/CDX74KCQylI=NdEgh1ZfMG1 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Tue, 12 Jul 2011 23:06:12 +0200 Robert Millan <rmh@debian.org> wrote: > 2011/7/12 Alexander Kabaev <kabaev@gmail.com>: > > Whatever happened to using a proper cross-tool to do the job? >=20 > 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. >=20 > > Why is this hack needed? >=20 > 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 > fails. >=20 > --=20 > Robert Millan The fact that Linux compiler with manually undefined and re-defined platform macros can compile is a coincidence and is not guaranteed to work and certainly is not a goal of FreeBSD project so this can be broken at any moment. Relying on that is unwise, putting hacks into FreeBSD sources to legitimize the practice is not the move I would support as well. Traditionally, IMHO. --=20 Alexander Kabaev --Sig_/CDX74KCQylI=NdEgh1ZfMG1 Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (FreeBSD) iD8DBQFOHL6/Q6z1jMm+XZYRAgbpAJ9a/Cfw3W/rYKV/A/ZxuxL3V9C1EQCgop6T SbL4a1iQYhKO1Mw/5rGSEyM= =EVg+ -----END PGP SIGNATURE----- --Sig_/CDX74KCQylI=NdEgh1ZfMG1--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110712173803.4979d741>