Web lists-archives.com

Re: allowed uses of non-baseline CPU extensions




On Thu, 05 Oct 2017 at 20:10:02 +0200, Sven Joachim wrote:
> On 2017-10-05 09:09 +0100, Simon McVittie wrote:
> > It's also common
> > to identify architecture by uname -m in ad-hoc project-specific build
> > systems
> 
> Using uname -m seems to be wrong, since there are many 32-bit
> architectures where the kernel can be 64-bit.

I never said it was correct, only that it was common :-)
(It also breaks cross-builds, obviously.)

Making those ad-hoc build systems behave correctly usually requires
something like "make ARCH=i686" to override some variable (ARCH in that
example) from its default value of $(shell uname -m) to what we want.
The overriding value needs to be something that uname -m might have
returned on the hypothetical baseline machine that we're building
for - so something chosen from the same vocabulary as uname -m, even
though no actual uname(2) system call is involved.

    smcv