pkgsrc/lang/ocaml/patches/patch-runtime_Makefile
jaapb 1f583dbce3 Updated lang/ocaml to version 4.14.0.
This is a long-overdue update, so there are many changes. Details are in
the Changes file in the distribution.

The mk/ocaml file will be moved to lang/ocaml and the logic for selecting
whether to use the native-code compiler will be factored out into
native.mk to avoid duplications.

This is the final version before OCaml 5.0 arrives, which has
multicore support and should be a major change from the 4.x versions.
2022-05-24 18:25:38 +00:00

49 lines
1.5 KiB
Text

$NetBSD: patch-runtime_Makefile,v 1.4 2022/05/24 18:25:38 jaapb Exp $
Honor LDFLAGS.
--- runtime/Makefile.orig 2021-09-30 15:40:11.000000000 +0000
+++ runtime/Makefile
@@ -265,7 +265,7 @@ build_config.h: $(ROOTDIR)/Makefile.conf
# Libraries and programs
ocamlrun$(EXE): prims.$(O) libcamlrun.$(A)
- $(MKEXE) -o $@ $^ $(LIBS)
+ $(MKEXE) $(LDFLAGS) -o $@ $^ $(LIBS)
ocamlruns$(EXE): prims.$(O) libcamlrun_non_shared.$(A)
$(call MKEXE_USING_COMPILER,$@,$^ $(LIBS))
@@ -277,13 +277,13 @@ libcamlrun_non_shared.$(A): $(libcamlrun
$(call MKLIB,$@, $^)
ocamlrund$(EXE): prims.$(O) libcamlrund.$(A)
- $(MKEXE) $(MKEXEDEBUGFLAG) -o $@ $^ $(LIBS)
+ $(MKEXE) $(LDFLAGS) $(MKEXEDEBUGFLAG) -o $@ $^ $(LIBS)
libcamlrund.$(A): $(libcamlrund_OBJECTS)
$(call MKLIB,$@, $^)
ocamlruni$(EXE): prims.$(O) libcamlruni.$(A)
- $(MKEXE) -o $@ $^ $(INSTRUMENTED_RUNTIME_LIBS) $(LIBS)
+ $(MKEXE) $(LDFLAGS) -o $@ $^ $(INSTRUMENTED_RUNTIME_LIBS) $(LIBS)
libcamlruni.$(A): $(libcamlruni_OBJECTS)
$(call MKLIB,$@, $^)
@@ -292,7 +292,7 @@ libcamlrun_pic.$(A): $(libcamlrunpic_OBJ
$(call MKLIB,$@, $^)
libcamlrun_shared.$(SO): $(libcamlrunpic_OBJECTS)
- $(MKDLL) -o $@ $^ $(BYTECCLIBS)
+ $(MKDLL) $(LDFLAGS) -o $@ $^ $(BYTECCLIBS)
libasmrun.$(A): $(libasmrun_OBJECTS)
$(call MKLIB,$@, $^)
@@ -307,7 +307,7 @@ libasmrun_pic.$(A): $(libasmrunpic_OBJEC
$(call MKLIB,$@, $^)
libasmrun_shared.$(SO): $(libasmrunpic_OBJECTS)
- $(MKDLL) -o $@ $^ $(NATIVECCLIBS)
+ $(MKDLL) $(LDFLAGS) -o $@ $^ $(NATIVECCLIBS)
# Target-specific preprocessor and compiler flags