[DTrace-devel] [PATCH 2/5] build: get the architecture from gcc -dumpmachine, not uname -m

Kris Van Hees kris.van.hees at oracle.com
Tue Jan 16 03:25:45 UTC 2024


On Mon, Jan 15, 2024 at 03:32:30PM +0000, Nick Alcock wrote:
> On 21 Dec 2023, Kris Van Hees said:
> 
> > On Wed, Nov 29, 2023 at 04:08:26PM +0000, Nick Alcock wrote:
> >> This makes it at least *possible* to support cross-compilation.
> >> It doesn't mean we do support it, but it's the first necessary
> >> prerequisite for such support.
> >
> > I would leave this out for now and only do it once we need it.  Especially
> > since we don;t even know whether cross compilation would work.  Let's do this
> > if/when cross compilation becomes something we need to support.
> 
> This was literally the first thing the Gentoo people asked about, and
> what we're doing here is just wrong anyway (we really don't care what
> arch the build machine is running).
> 
> I really think it should go in.

I would in that case include it in a patch that actually provides support
for cross compilation - this is such a minor patch that I don't think it
really makes much sense to have it without the actual support for cross
compilation.  I'd say that since we currently do *not* support cross
compilation, using the arch of the build machine makes perfect sense.

So, if cross compilation support is required, then when that support is
added, include this in those patches.  (By the way, I expect tbat support
for cross compilation might turn out to be intereting if the target does
mot match the endianness of the build system - since I believe that the BPF
precompiled code needs to match that endianness of the target - we'd need
to verify that this is indeed the case.)



More information about the DTrace-devel mailing list