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

Jon Olsson jon@REDACTED
Sat Feb 3 09:10:33 CET 2007


On Fri, Feb 02, 2007 at 07:29:55PM +0100, Mikael Pettersson wrote:
> On Fri, 2 Feb 2007 18:19:38 +0100, Jon Olsson wrote:
[snip]

> They were introduced originally for Solaris, but they
> also see use (whether needed or not) on Linux.
> They are (were) needed on Solaris because the compilers do not
> necessarily support the SPARC v9 instruction set by default,
> and parts of the runtime system need(ed) to include v9 instructions.
> 
> What exactly is the failure on OpenBSD?

cc -O2 -pipe -I/usr/ports/lang/erlang/w-erlang-11b.2/otp_src_R11B-2/erts/sparc64-unknown-openbsd4.0    -DUSE_THREADS  -D_THREAD_SAFE -D_REENTRANT  -DHAVE_CONFIG_H -Wall -Wstrict-prototypes -Wmissing-prototypes -DUSE_THREADS  -D_THREAD_SAFE -D_REENTRANT -Wa,-xarch=v8plusa -Ibeam -Isys/unix -Isys/common -Isparc64-unknown-openbsd4.0/opt/plain -Isparc64-unknown-openbsd4.0 -Izlib -Ihipe -I../include/internal -I../include/internal/sparc64-unknown-openbsd4.0 -c hipe/hipe_mkliterals.c -o obj/sparc64-unknown-openbsd4.0/opt/plain/hipe_mkliterals.o
{standard input}: Assembler messages:
{standard input}:286: Error: internal error: can't export reloc type 91 (`BFD_RELOC_SPARC_H44')
{standard input}:289: Error: internal error: can't export reloc type 92 (`BFD_RELOC_SPARC_M44')
{standard input}:293: Error: internal error: can't export reloc type 93 (`BFD_RELOC_SPARC_L44')
{standard input}:841: Error: internal error: can't export reloc type 91 (`BFD_RELOC_SPARC_H44')
{standard input}:844: Error: internal error: can't export reloc type 92 (`BFD_RELOC_SPARC_M44')
{standard input}:848: Error: internal error: can't export reloc type 93 (`BFD_RELOC_SPARC_L44')
{standard input}:856: Error: internal error: can't export reloc type 91 (`BFD_RELOC_SPARC_H44')
{standard input}:857: Error: internal error: can't export reloc type 91 (`BFD_RELOC_SPARC_H44')
{standard input}:858: Error: internal error: can't export reloc type 92 (`BFD_RELOC_SPARC_M44')
{standard input}:859: Error: internal error: can't export reloc type 92 (`BFD_RELOC_SPARC_M44')
{standard input}:864: Error: internal error: can't export reloc type 93 (`BFD_RELOC_SPARC_L44')
{standard input}:865: Error: internal error: can't export reloc type 93 (`BFD_RELOC_SPARC_L44')
{standard input}:867: Error: internal error: can't export reloc type 91 (`BFD_RELOC_SPARC_H44')
{standard input}:869: Error: internal error: can't export reloc type 92 (`BFD_RELOC_SPARC_M44')
{standard input}:874: Error: internal error: can't export reloc type 93 (`BFD_RELOC_SPARC_L44')
{standard input}:885: Error: internal error: can't export reloc type 92 (`BFD_RELOC_SPARC_M44')
{standard input}:887: Error: internal error: can't export reloc type 91 (`BFD_RELOC_SPARC_H44')
{standard input}:895: Error: internal error: can't export reloc type 92 (`BFD_RELOC_SPARC_M44')
{standard input}:898: Error: internal error: can't export reloc type 93 (`BFD_RELOC_SPARC_L44')
{standard input}:915: Error: internal error: can't export reloc type 91 (`BFD_RELOC_SPARC_H44')
{standard input}:916: Error: internal error: can't export reloc type 92 (`BFD_RELOC_SPARC_M44')
{standard input}:920: Error: internal error: can't export reloc type 93 (`BFD_RELOC_SPARC_L44')
{standard input}:939: Error: internal error: can't export reloc type 91 (`BFD_RELOC_SPARC_H44')
{standard input}:940: Error: internal error: can't export reloc type 92 (`BFD_RELOC_SPARC_M44')
{standard input}:944: Error: internal error: can't export reloc type 93 (`BFD_RELOC_SPARC_L44')
{standard input}:959: Error: internal error: can't export reloc type 91 (`BFD_RELOC_SPARC_H44')
{standard input}:961: Error: internal error: can't export reloc type 92 (`BFD_RELOC_SPARC_M44')
{standard input}:966: Error: internal error: can't export reloc type 93 (`BFD_RELOC_SPARC_L44')
{standard input}:972: Error: internal error: can't export reloc type 92 (`BFD_RELOC_SPARC_M44')
{standard input}:984: Error: internal error: can't export reloc type 91 (`BFD_RELOC_SPARC_H44')
{standard input}:985: Error: internal error: can't export reloc type 92 (`BFD_RELOC_SPARC_M44')
{standard input}:990: Error: internal error: can't export reloc type 93 (`BFD_RELOC_SPARC_L44')
{standard input}:1026: Error: internal error: can't export reloc type 91 (`BFD_RELOC_SPARC_H44')
{standard input}:1028: Error: internal error: can't export reloc type 92 (`BFD_RELOC_SPARC_M44')
{standard input}:1032: Error: internal error: can't export reloc type 93 (`BFD_RELOC_SPARC_L44')
{standard input}:1036: Error: internal error: can't export reloc type 91 (`BFD_RELOC_SPARC_H44')
{standard input}:1038: Error: internal error: can't export reloc type 92 (`BFD_RELOC_SPARC_M44')
{standard input}:1041: Error: internal error: can't export reloc type 93 (`BFD_RELOC_SPARC_L44')
{standard input}:1043: Error: internal error: can't export reloc type 91 (`BFD_RELOC_SPARC_H44')
{standard input}:1044: Error: internal error: can't export reloc type 91 (`BFD_RELOC_SPARC_H44')
{standard input}:1045: Error: internal error: can't export reloc type 92 (`BFD_RELOC_SPARC_M44')
{standard input}:1046: Error: internal error: can't export reloc type 92 (`BFD_RELOC_SPARC_M44')
{standard input}:1049: Error: internal error: can't export reloc type 93 (`BFD_RELOC_SPARC_L44')
{standard input}:1057: Error: internal error: can't export reloc type 91 (`BFD_RELOC_SPARC_H44')
{standard input}:1060: Error: internal error: can't export reloc type 92 (`BFD_RELOC_SPARC_M44')
{standard input}:1062: Error: internal error: can't export reloc type 93 (`BFD_RELOC_SPARC_L44')
{standard input}:1066: Error: internal error: can't export reloc type 93 (`BFD_RELOC_SPARC_L44')
{standard input}:1070: Error: internal error: can't export reloc type 91 (`BFD_RELOC_SPARC_H44')
{standard input}:1085: Error: internal error: can't export reloc type 91 (`BFD_RELOC_SPARC_H44')
{standard input}:1086: Error: internal error: can't export reloc type 92 (`BFD_RELOC_SPARC_M44')
{standard input}:1090: Error: internal error: can't export reloc type 93 (`BFD_RELOC_SPARC_L44')
{standard input}:1105: Error: internal error: can't export reloc type 91 (`BFD_RELOC_SPARC_H44')
{standard input}:1107: Error: internal error: can't export reloc type 92 (`BFD_RELOC_SPARC_M44')
{standard input}:1112: Error: internal error: can't export reloc type 93 (`BFD_RELOC_SPARC_L44')
{standard input}:1118: Error: internal error: can't export reloc type 92 (`BFD_RELOC_SPARC_M44')
{standard input}:1153 reloc type 91 (`BFD_RELOC_SPARC_H44')
{standard input}:1155: Error: internal error: can't export reloc type 92 (`BFD_RELOC_SPARC_M44')
{standard input}:1159: Error: internal error: can't port reloc type 93 (`BFD_RELOC_SPARC_L44')
{standard input}:1162: Error: internal error: can't export reloc type 91 (`BFD_RELOC_SPARC_H44')
{standard input}:1164: Error: internal error: canype 92 (`BFD_RELOC_SPARC_M44')
{standard input}:1168: Error: internal error: can't export reloc type 93 (`BFD_RELOC_SPARC_L44')
{standard input}:1171: Error: internal error: can't export rec type 91 (`BFD_RELOC_SPARC_H44')
{standard input}:1173: Error: internal error: can't export reloc type 92 (`BFD_RELOC_SPARC_M44')
{standard input}:1178: Error: internal error: can't export reloc type 93 (`BFD_RELOC_SPARC_L44')
{standard input}:1179: Eror: internal error: can't export reloc type 91 (`BFD_RELOC_SPARC_H44')
{standard input}:1181: Error: internal error: can't export reloc type 92 (`BFD_RELOC_SPARC_M44')
{standard input}:118 Error: internal error: can't export reloc type 93 (`BFD_RELOC_SPARC_L44')
{standard input}:1185: Error: internal error: can'ttandard input}:1192: Error: internal error: can't export reloc pe 91 (`BFD_RELOC_SPARC_H44')
{standard input}:1193: Error: internal error: can't export reloc type 92 (`BFD_RELOC_SPARC_M44')
{standard input}:1194: Error: internal error: can't export relype 92 (`BFD_RELOC_SPARC_M44')
{standard input}:1197: Error: internal error: can't export reloc type 93 (`BFD_RELOC_SPARC_L44')
{standard input}:1200: Error: internal error: can't export re type 93 (`BFD_RELOC_SPARC_L44')
{standard input}:1201: Error: internal error: can't export reloc type 91 (`BFD_RELOC_SPARC_H44')
{standard input}:1202: Error: internal error: can't export loc type 91 (`BFD_RELOC_SPARC_H44')
{standard input}:1203: Error: internal error: can't export reloc type 92 (`BFD_RELOC_SPARC_M44')
{standard input}:1204: Error: internal error: can't export reloc type 92 (`BFD_RELOC_SPARC_M44')
{standard input}:1207:ror: internal error: can't export reloc type 93 (`BFD_RELOC_SPARC_L44')
{standard input}:1210: Error: internal error: can't export reloc type 93 (`BFD_RELOC_SPARC_L44')
{standard input}:121rror: internal error: can't export reloc type 91 (`BFD_RELOC_SPARC_H44')
{standard input}:1216: Error: internal error: can't export reloc type 92 (`BFD_RELOC_SPARC_M44')
{standard input}:12: Error: internal error: can't export reloc type 93 (`BFD_RELOC_SPARC_L44')
{standard input}:1222: Error: internal error: can't export reloc type 91 (`BFD_RELOC_SPARC_H44')
{standard input}4: Error: internal error: can't export reloc type 92 (`BFD_RELOC_SPARC_M44')
{standard input}:1227: Error: internal error: can't export reloc type 93 (`BFD_RELOC_SPARC_L44')
{standard input}:1228: Error: internal error: can't export reloc type 91 (`BFD_RELOC_SPARC_H44')
{standard input}:1230: Error: internal error: can't export reloc type 92 (`BFD_RELOC_SPARC_M44')
{standard :1235: Error: internal error: can't export reloc type 93 (`BFD_RELOC_SPARC_L44')
{standard input}:1255: Error: internal error:t reloc type 92 (`BFD_RELOC_SPARC_M44')
{standard input}:1326: Error: internal error: can't export reloc type 93 (`BFD_RELOC_SRC_L44')
{standard input}:1333: Error: internal error: can't export reloc type 93 (`BFD_RELOC_SPARC_L44')
{standard input}:1334: Error: internal error: can't export reloc type 91 (`BFD_RELOPARC_H44')
{standard input}:1337: Error: internal error: can't export reloc type 92 (`BFD_RELOC_SPARC_M44')
{standard input}:1339: Error: internal error: can't export reloc type 93 (`BFD_RE_SPARC_L44')
{standard input}:1343: Error: internal error: can't export reloc type 91 (`BFD_RELOC_SPARC_H44')
{standard input}:1344: Error: internal error: can't export reloc type 91 (`BFD_LOC_SPARC_H44')
{standard input}:1346: Error: internal error: can't export reloc type 92 (`BFD_RELOC_SPARC_M44')
{standard input}:1347: Error: internal error: can't export reloc type 92 (`BELOC_SPARC_M44')
{standard input}:1350: Error: internal error: n't export reloc type 93 (`BFD_RELOC_SPARC_L44')
{standard input}:1351: Error: internal error: can't export reloc type 93 (`BFC_SPARC_L44')
{standard input}:1361: Fatal error: {standard inp}:523: bad return from bfd_install_relocation: 4
gmake[2]: *** [obj/sparc64-unknown-openbsd4.0/opt/plain/hipe_mkliterals.o] Error 1
gmake[2]: Leaving directory `/usr/ports/lang/erlang/w-erlb.2/otp_src_R11B-2/erts/emulator'
gmake[1]: *** [generate] Error 2
gmake[1]: Leaving directory `/usr/ports/lang/erlang/w-erlan11b.2/otp_src_R11B-2/erts/emulator'
gmake: *** [depend] Error 2

[snip word wrapped patch]

> This patch is broken due word-wrapping. But what it implies is
> that OpenBSD should receive the same treatment as FreeBSD wrt
> floating-point exceptions and SIGFPE handlers, correct?

Correct, adding the patches as attachement now, sorry about 
the copy'n'pasto.

> A (perhaps temporary) shell account on an x86-32 and an x86-64
> OpenBSD box would do wonders for Erlang/OTP's OpenBSD support.
> (That's how the FreeBSD folks got their verified support for HiPE,
> floating-point exceptions, and SMP. Hint hint, nudge nudge.)

My x86-32 OpenBSD box could possibly be used for that, although 
it is dog slow so, it won't be pleasant using it.

-- 
Jon
-------------- next part --------------
This fixes a bug on OpenBSD/sparc64
--- erts/emulator/Makefile.in.orig      Mon Jan 29 13:52:09 2007
+++ erts/emulator/Makefile.in   Wed Jan 31 17:25:33 2007
@@ -137,7 +137,7 @@ darwinCFLAGS=-DDARWIN
 noopsysCFLAGS=
 OPSYSCFLAGS=$($(OPSYS)CFLAGS)
 ARCH=@ARCH@
-ultrasparcCFLAGS=-Wa,-xarch=v8plusa
+ultrasparcCFLAGS=
 ARCHCFLAGS=$($(ARCH)CFLAGS)
 
 ifdef HIPE_ENABLED

This fixes hangs in the configure script on OpenBSD/amd64
--- erts/configure.in.orig      Wed Jan 31 17:36:19 2007
+++ erts/configure.in   Wed Jan 31 17:37:08 2007
@@ -1855,14 +1855,14 @@ static __inline__ int check_fpe(double f
 
 #endif
 
-#if (defined(__linux__) && (defined(__i386__) || defined(__x86_64__) || defined(__sparc__) || defined(__powerpc__))
) || (defined(__DARWIN__) && (defined(__i386__) || defined(__ppc__))) || (defined(__FreeBSD__) && (defined(__i386__)
 || defined(__x86_64__))) || (defined(__sun__) && defined(__x86_64__))
+#if (defined(__linux__) && (defined(__i386__) || defined(__x86_64__) || defined(__sparc__) || defined(__powerpc__))
) || (defined(__DARWIN__) && (defined(__i386__) || defined(__ppc__))) || ((defined(__OpenBSD__) || defined(__FreeBSD
__)) && (defined(__i386__) || defined(__x86_64__))) || (defined(__sun__) && defined(__x86_64__))
 
 #if defined(__linux__) && defined(__i386__)
 #include <asm/sigcontext.h>
 #elif defined(__FreeBSD__) && defined(__i386__)
 #include <sys/types.h>
 #include <machine/npx.h>
-#elif defined(__FreeBSD__) && defined(__x86_64__)
+#elif (defined(__OpenBSD__) || defined(__FreeBSD__)) && defined(__x86_64__)
 #include <sys/types.h>
 #include <machine/fpu.h>
 #endif



More information about the erlang-bugs mailing list