[erlang-bugs] Erlang/OTP R11B-3 OpenBSD patches

Mikael Pettersson <>
Thu Feb 15 17:30:34 CET 2007


Jon Olsson writes:
 > On Thu, Feb 15, 2007 at 04:52:16PM +0100, Mikael Pettersson wrote:
 > [snip]
 > > While this may solve your immediate problem (64-bit mode code
 > > on OpenBSD/SPARC64), it's inappropriate for other cases: What
 > > if the user prefers to generate 32-bit code on OpenBSD? What
 > > about other operating systems on SPARC64?
 > 
 > For the record:
 > 
 > core% uname -a                 
 > OpenBSD xxx.yyy.com 4.0 GENERIC#999 sparc64
 > core% gcc -m32 z.c       
 > cc1: error: -m32 is not supported by this configuration
 > 
 > I guess this means OpenBSD doesn't support 32 bit code compilation
 > on sparc64? Correct me if I'm wrong.

Well, this particular gcc cannot generate 32-bit mode code.
But that's an exception: gcc is usually configured as a
"bi-arch" compiler that can generate either 32-bit or 64-bit
code, and many 64-bit systems make 32-bit code the default.

It's certainly possible that OpenBSD on SPARC64 has completely
banned all 32-bit mode code, making your change OK for OpenBSD.
But even if they have done that, inferring 64-bitness from the
C compiler instead of `uname` is a safer and more general solution.

/Mikael



More information about the erlang-bugs mailing list