openbsd-ports/lang/ghc/patches/patch-libffi_ghc_mk
dcoppa 47aa23534d Fix random crashes at runtime when there's heavy use of libgmp.a
(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@
2012-10-11 07:51:10 +00:00

18 lines
701 B
Plaintext

$OpenBSD: patch-libffi_ghc_mk,v 1.1 2012/10/11 07:51:10 dcoppa Exp $
Unbreak the build on OpenBSD/amd64: undefined references to
'ffi_call_unix64', 'ffi_closure_unix64'
gcc supports @unwind sections while ld (binutils 2.15) does not
--- libffi/ghc.mk.orig Wed Jun 6 19:10:25 2012
+++ libffi/ghc.mk Wed Oct 10 11:25:30 2012
@@ -78,6 +78,7 @@ $(libffi_STAMP_CONFIGURE): $(TOUCH_DEP)
NM=$(NM) \
CFLAGS="$(SRC_CC_OPTS) $(CONF_CC_OPTS_STAGE1) -w" \
LDFLAGS="$(SRC_LD_OPTS) $(CONF_GCC_LINKER_OPTS_STAGE1) -w" \
+ libffi_cv_as_x86_64_unwind_section_type=no \
"$(SHELL)" configure \
--prefix=$(TOP)/libffi/build/inst \
--enable-static=yes \