summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2017-09-10 08:56:47 +0000
committerwiz <wiz@pkgsrc.org>2017-09-10 08:56:47 +0000
commitbc1ad73673ca2878a67538decdde6a627450b015 (patch)
tree7ed5bf1978bc6cb2fb72dcc76493ed28b60bea1f
parentfd5dd4eb11193d30858f74b98fd5df84b2593b65 (diff)
downloadpkgsrc-bc1ad73673ca2878a67538decdde6a627450b015.tar.gz
Honor LDFLAGS again. Fixes RELRO build.
-rw-r--r--lang/ocaml/distinfo6
-rw-r--r--lang/ocaml/patches/patch-otherlibs_systhreads_Makefile32
-rw-r--r--lang/ocaml/patches/patch-otherlibs_threads_Makefile36
3 files changed, 65 insertions, 9 deletions
diff --git a/lang/ocaml/distinfo b/lang/ocaml/distinfo
index 59302521690..7168ece320b 100644
--- a/lang/ocaml/distinfo
+++ b/lang/ocaml/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.109 2017/09/08 09:12:44 jaapb Exp $
+$NetBSD: distinfo,v 1.110 2017/09/10 08:56:47 wiz Exp $
SHA1 (ocaml-4.05.0.tar.gz) = ef9e3febed311cf9331baefd2999961b36f849cb
RMD160 (ocaml-4.05.0.tar.gz) = 67b299c3abe032f955e95eac106c32664351453c
@@ -21,8 +21,8 @@ SHA1 (patch-ocamldoc_odoc__messages.ml) = 77f650a5f34f40b9648a8d5091e9aa31efb573
SHA1 (patch-otherlibs_Makefile) = e7b777dd1c5723eb5950db38525fd9565258801f
SHA1 (patch-otherlibs_bigarray_mmap__unix.c) = 39979990e3463c944598ac0d0bf8a2c4a3f0d558
SHA1 (patch-otherlibs_dynlink_Makefile) = 9586542c6aa2f618a5d9df62bcb7bfac34ce1163
-SHA1 (patch-otherlibs_systhreads_Makefile) = da3f42ab255cb1b94a49f1e90a0df6911c8edb1c
-SHA1 (patch-otherlibs_threads_Makefile) = 0f1a872f2d0599b25f2c4dfbbfe0c7ff22b69339
+SHA1 (patch-otherlibs_systhreads_Makefile) = edf1c481d57f42da9d0cb2699aa39c93eb46265e
+SHA1 (patch-otherlibs_threads_Makefile) = b25c0003a4e4304b6751ec90bdb99aae7a24cf70
SHA1 (patch-stdlib_Makefile) = 4832d06bf0d0873ddf814e77f6085a2acf2b8988
SHA1 (patch-tools_ocamlcp.ml) = 299c84c169bacfe0315a986d739b3e61d2491289
SHA1 (patch-tools_ocamlmklib) = 53785aa5f0684a2c8708891d7e4e9d4400afbe7d
diff --git a/lang/ocaml/patches/patch-otherlibs_systhreads_Makefile b/lang/ocaml/patches/patch-otherlibs_systhreads_Makefile
index f7785a977ad..92c82d663d5 100644
--- a/lang/ocaml/patches/patch-otherlibs_systhreads_Makefile
+++ b/lang/ocaml/patches/patch-otherlibs_systhreads_Makefile
@@ -1,10 +1,36 @@
-$NetBSD: patch-otherlibs_systhreads_Makefile,v 1.7 2017/09/08 09:12:44 jaapb Exp $
+$NetBSD: patch-otherlibs_systhreads_Makefile,v 1.8 2017/09/10 08:56:47 wiz Exp $
+Honor LDFLAGS.
Use BSD_INSTALL_* instead of mkdir and cp
---- otherlibs/systhreads/Makefile.orig 2017-06-23 15:13:40.000000000 +0000
+--- otherlibs/systhreads/Makefile.orig 2017-07-13 08:56:44.000000000 +0000
+++ otherlibs/systhreads/Makefile
-@@ -124,17 +124,17 @@ INSTALL_STUBLIBDIR=$(DESTDIR)$(STUBLIBDI
+@@ -27,6 +27,7 @@ export OCAML_FLEXLINK:=$(ROOTDIR)/boot/o
+ endif
+
+ LIBS = -nostdlib -I $(ROOTDIR)/stdlib -I $(ROOTDIR)/otherlibs/$(UNIXLIB)
++LDOPTS=-ldopt "$(LDFLAGS)"
+
+ CAMLC=$(CAMLRUN) $(ROOTDIR)/ocamlc $(LIBS)
+ CAMLOPT=$(CAMLRUN) $(ROOTDIR)/ocamlopt $(LIBS)
+@@ -62,14 +63,14 @@ all: lib$(LIBNAME).$(A) $(LIBNAME).cma $
+ allopt: lib$(LIBNAME)nat.$(A) $(LIBNAME).cmxa $(CMIFILES)
+
+ lib$(LIBNAME).$(A): $(BYTECODE_C_OBJS)
+- $(MKLIB) -o $(LIBNAME) $(BYTECODE_C_OBJS) $(PTHREAD_LINK)
++ $(MKLIB) -o $(LIBNAME) $(BYTECODE_C_OBJS) $(PTHREAD_LINK) $(LDOPTS)
+
+ lib$(LIBNAME)nat.$(A): $(NATIVECODE_C_OBJS)
+ $(MKLIB) -o $(LIBNAME)nat $^
+
+ $(LIBNAME).cma: $(THREADS_BCOBJS)
+ ifeq "$(UNIX_OR_WIN32)" "unix"
+- $(MKLIB) -o $(LIBNAME) -ocamlc '$(CAMLC)' -cclib -lunix -linkall $(PTHREAD_CAML_LINK) $^
++ $(MKLIB) -o $(LIBNAME) -ocamlc '$(CAMLC)' -cclib -lunix -linkall $(PTHREAD_CAML_LINK) $(LDOPTS) $^
+ # TODO: Figure out why -cclib -lunix is used here.
+ # It may be because of the threadsUnix module which is deprecated.
+ # It may hence be good to figure out whether this module shouldn't be
+@@ -124,17 +125,17 @@ INSTALL_STUBLIBDIR=$(DESTDIR)$(STUBLIBDI
install:
if test -f dllthreads$(EXT_DLL); then \
cp dllthreads$(EXT_DLL) "$(INSTALL_STUBLIBDIR)/dllthreads$(EXT_DLL)"; fi
diff --git a/lang/ocaml/patches/patch-otherlibs_threads_Makefile b/lang/ocaml/patches/patch-otherlibs_threads_Makefile
index 55327f4d9c3..2f4b851a4b9 100644
--- a/lang/ocaml/patches/patch-otherlibs_threads_Makefile
+++ b/lang/ocaml/patches/patch-otherlibs_threads_Makefile
@@ -1,10 +1,40 @@
-$NetBSD: patch-otherlibs_threads_Makefile,v 1.9 2017/09/08 09:12:44 jaapb Exp $
+$NetBSD: patch-otherlibs_threads_Makefile,v 1.10 2017/09/10 08:56:47 wiz Exp $
+Honor LDFLAGS.
Use BSD_INSTALL_* instead of mkdir and cp
---- otherlibs/threads/Makefile.orig 2017-06-23 15:13:40.000000000 +0000
+--- otherlibs/threads/Makefile.orig 2017-07-13 08:56:44.000000000 +0000
+++ otherlibs/threads/Makefile
-@@ -111,12 +111,12 @@ CMIFILES=thread.cmi mutex.cmi condition.
+@@ -33,6 +33,8 @@ CAML_OBJS=thread.cmo mutex.cmo condition
+
+ LIB=../../stdlib
+
++LDOPTS=-ldopt "$(LDFLAGS)"
++
+ LIB_OBJS=$(LIB)/camlinternalFormatBasics.cmo pervasives.cmo \
+ $(LIB)/array.cmo $(LIB)/list.cmo $(LIB)/char.cmo $(LIB)/bytes.cmo \
+ $(LIB)/string.cmo $(LIB)/sys.cmo $(LIB)/sort.cmo marshal.cmo \
+@@ -59,16 +61,16 @@ all: libvmthreads.a threads.cma stdlib.c
+ allopt:
+
+ libvmthreads.a: $(C_OBJS)
+- $(MKLIB) -o threads -oc vmthreads $(C_OBJS)
++ $(MKLIB) -o threads -oc vmthreads $(C_OBJS) $(LDOPTS)
+
+ threads.cma: $(CAML_OBJS)
+- $(MKLIB) -ocamlc '$(CAMLC)' -o threads -oc vmthreads $(CAML_OBJS)
++ $(MKLIB) -ocamlc '$(CAMLC)' -o threads -oc vmthreads $(CAML_OBJS) $(LDOPTS)
+
+ stdlib.cma: $(LIB_OBJS)
+ $(CAMLC) -a -o stdlib.cma $(LIB_OBJS)
+
+ unix.cma: $(UNIXLIB_OBJS)
+- $(MKLIB) -ocamlc '$(CAMLC)' -o unix -linkall $(UNIXLIB_OBJS)
++ $(MKLIB) -ocamlc '$(CAMLC)' -o unix -linkall $(UNIXLIB_OBJS) $(LDOPTS)
+
+ pervasives.cmo: pervasives.mli pervasives.cmi pervasives.ml
+ $(CAMLC) ${COMPFLAGS} -nopervasives -c pervasives.ml
+@@ -111,12 +113,12 @@ CMIFILES=thread.cmi mutex.cmi condition.
install:
if test -f dllvmthreads.so; then \