summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorpho <pho>2014-01-17 10:03:23 +0000
committerpho <pho>2014-01-17 10:03:23 +0000
commit3078c4684dc5dd37604bddd814dd99745be15391 (patch)
tree737aba88a31b903d4a01e5a3c6be84bf009edc99 /lang
parente1499079b6ca386b9631692ac0f51d6938c10613 (diff)
downloadpkgsrc-3078c4684dc5dd37604bddd814dd99745be15391.tar.gz
Fix build on Darwin 9.
Diffstat (limited to 'lang')
-rw-r--r--lang/ocaml/hacks.mk20
1 files changed, 19 insertions, 1 deletions
diff --git a/lang/ocaml/hacks.mk b/lang/ocaml/hacks.mk
index 6b2ad0088a7..16eaa70a8bf 100644
--- a/lang/ocaml/hacks.mk
+++ b/lang/ocaml/hacks.mk
@@ -1,10 +1,28 @@
-# $NetBSD: hacks.mk,v 1.2 2011/03/29 13:45:02 adam Exp $
+# $NetBSD: hacks.mk,v 1.3 2014/01/17 10:03:23 pho Exp $
.if !defined(OCAML_HACKS_MK)
OCAML_HACKS_MK= defined
.include "../../mk/compiler.mk"
+### [Fri Jan 17 18:06:18 JST 2014 : pho]
+### The linker comes with Darwin 9 does not recognize the option
+### "-no_compact_unwind" since compact unwind information is only
+### introduced (and made default) as of Darwin 10. Note that this
+### can't be worked around with transformation
+### "rm:-Wl,-no_compact_unwind" because the linker option is baked
+### into utils/config.ml and will later be used by the OCaml compiler
+### itself.
+###
+.if !empty(MACHINE_PLATFORM:MDarwin-9.*)
+PKG_HACKS+= no_compact_unwind
+SUBST_CLASSES+= no_compact_unwind
+SUBST_MESSAGE.no_compact_unwind= Removing -no_compact_unwind from linker options
+SUBST_FILES.no_compact_unwind= configure
+SUBST_SED.no_compact_unwind= -e 's/-Wl,-no_compact_unwind//g'
+SUBST_STAGE.no_compact_unwind= pre-configure
+.endif
+
### [ Wed Oct 7 9:16:42 GMT 2009 : dmcmahill ]
### On NetBSD/i386, gcc optimisation, at least for version 4.4.1 (lang/gcc44),
### produces a binary which segfaults. The binary is used during part of the