summaryrefslogtreecommitdiff
path: root/lang/ocaml/patches/patch-runtime_Makefile
blob: c7fb5f957b678246f4eee8e2401421c27b5d53d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
$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