tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: netbsd/mips64 uses a 32bit ABI.



On Sun, Oct 02, 2016 at 10:56:46AM +0000, coypu%SDF.ORG@localhost wrote:
 > Shoving this into NSS is probably the right fix. it's not so commonly
 > a problem now that I look at it, and will become messy if anyone changes
 > the ABI situation in some version.

For configure tests it's better to rig up ones that only require
compiling (not running) when possible, to avoid throwing up barriers
to cross-compilation.

This sometimes requires some creativity, but in this case I think the
compile-time-assert scheme will serve:

   --- test.c ---
int foo[(sizeof(long) > sizeof(int)) ? 1 : -1];
   --- end ---

   --- test.sh ---
#!/bin/sh
if cc -c test.c; then
    echo USE_64=1 # or whatever
else
    else USE_64=0
fi
   --- end ---

One could probably also patch nss to just check if the compiler
defines _LP64, as I think that's sufficiently reliable.

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index