pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/ocaml Honor LDFLAGS again. Fixes RELRO build.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/780a6ae9a83c
branches:  trunk
changeset: 368029:780a6ae9a83c
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Sun Sep 10 08:56:47 2017 +0000

description:
Honor LDFLAGS again. Fixes RELRO build.

diffstat:

 lang/ocaml/distinfo                                    |   6 +-
 lang/ocaml/patches/patch-otherlibs_systhreads_Makefile |  32 ++++++++++++++-
 lang/ocaml/patches/patch-otherlibs_threads_Makefile    |  36 ++++++++++++++++-
 3 files changed, 65 insertions(+), 9 deletions(-)

diffs (110 lines):

diff -r a31827b10324 -r 780a6ae9a83c lang/ocaml/distinfo
--- a/lang/ocaml/distinfo       Sun Sep 10 08:42:00 2017 +0000
+++ b/lang/ocaml/distinfo       Sun Sep 10 08:56:47 2017 +0000
@@ -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-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 -r a31827b10324 -r 780a6ae9a83c lang/ocaml/patches/patch-otherlibs_systhreads_Makefile
--- a/lang/ocaml/patches/patch-otherlibs_systhreads_Makefile    Sun Sep 10 08:42:00 2017 +0000
+++ b/lang/ocaml/patches/patch-otherlibs_systhreads_Makefile    Sun Sep 10 08:56:47 2017 +0000
@@ -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 -r a31827b10324 -r 780a6ae9a83c lang/ocaml/patches/patch-otherlibs_threads_Makefile
--- a/lang/ocaml/patches/patch-otherlibs_threads_Makefile       Sun Sep 10 08:42:00 2017 +0000
+++ b/lang/ocaml/patches/patch-otherlibs_threads_Makefile       Sun Sep 10 08:56:47 2017 +0000
@@ -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 \



Home | Main Index | Thread Index | Old Index