Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Jul 2011 23:06:12 +0200
From:      Robert Millan <rmh@debian.org>
To:        Alexander Kabaev <kabaev@gmail.com>
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:  <CAOfDtXNNpZj=cJE2Mtwth3sXiAtoFr%2B=pAv-TmrzjG-wOb%2B0kw@mail.gmail.com>
In-Reply-To: <20110712164337.07e387eb@kan.dnsalias.net>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
2011/7/12 Alexander Kabaev <kabaev@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
SeaBIOS.

> 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
fails.

-- 
Robert Millan



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOfDtXNNpZj=cJE2Mtwth3sXiAtoFr%2B=pAv-TmrzjG-wOb%2B0kw>