(e.g. large Fibonacci numbers): link GHC with its bundled gmp library that has customized memory allocation functions. While here, fix two other problems as well: - undefined references to 'ffi_call_unix64', 'ffi_closure_unix64' on amd64 - unknown symbol '__guard_local' (caused by gcc's switch from __guard to __guard_local) Joint work with kili@ OK kili@
38 lines
1.1 KiB
Plaintext
38 lines
1.1 KiB
Plaintext
$OpenBSD: patch-rts_Linker_c,v 1.6 2012/10/11 07:51:10 dcoppa Exp $
|
|
|
|
Workaround error: unknown symbol '__guard_local'
|
|
|
|
--- rts/Linker.c.orig Tue Oct 9 21:15:55 2012
|
|
+++ rts/Linker.c Tue Oct 9 21:29:11 2012
|
|
@@ -563,6 +563,14 @@ typedef struct _RtsSymbolVal {
|
|
#define RTS_DARWIN_ONLY_SYMBOLS
|
|
#endif
|
|
|
|
+#if defined(openbsd_HOST_OS)
|
|
+#define RTS_OPENBSD_ONLY_SYMBOLS \
|
|
+ SymE_NeedsProto(__guard_local) \
|
|
+ SymE_NeedsProto(__stack_smash_handler)
|
|
+#else
|
|
+#define RTS_OPENBSD_ONLY_SYMBOLS
|
|
+#endif
|
|
+
|
|
#ifndef SMP
|
|
# define MAIN_CAP_SYM SymI_HasProto(MainCapability)
|
|
#else
|
|
@@ -1084,6 +1092,7 @@ RTS_POSIX_ONLY_SYMBOLS
|
|
RTS_MINGW_ONLY_SYMBOLS
|
|
RTS_CYGWIN_ONLY_SYMBOLS
|
|
RTS_DARWIN_ONLY_SYMBOLS
|
|
+RTS_OPENBSD_ONLY_SYMBOLS
|
|
RTS_LIBGCC_SYMBOLS
|
|
RTS_LIBFFI_SYMBOLS
|
|
#undef SymI_NeedsProto
|
|
@@ -1119,6 +1128,7 @@ static RtsSymbolVal rtsSyms[] = {
|
|
RTS_MINGW_ONLY_SYMBOLS
|
|
RTS_CYGWIN_ONLY_SYMBOLS
|
|
RTS_DARWIN_ONLY_SYMBOLS
|
|
+ RTS_OPENBSD_ONLY_SYMBOLS
|
|
RTS_LIBGCC_SYMBOLS
|
|
RTS_LIBFFI_SYMBOLS
|
|
#if defined(darwin_HOST_OS) && defined(i386_HOST_ARCH)
|