Skip to content

Commit

Permalink
Revert #124
Browse files Browse the repository at this point in the history
`-L/path/to/gmp/lib` must be passed as is to `ocamlmklib`, not behind a `-ldopt` flag, otherwise it is ignored in static linking situations.
  • Loading branch information
xavierleroy committed Jul 19, 2023
1 parent 94f674e commit b975908
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Changes
Expand Up @@ -7,7 +7,7 @@ Release 1.13 (2023-07-19)
- #118: fix Z_mlgmpidl interface for mlgmpidl >= 1.2 [Simmo Saan]
- #109: fix typo in `ml_z_mul` function [Bernhard Schommer]
- #108: fix dependency on C evaluation order in `ml_z_remove` [Xavier Clerc]
- #117 #120 #124 #129 #132 #135 #139 #141: configure & build simplifications and fixes [various authors]
- #117 #120 #129 #132 #135 #139 #141: configure & build simplifications and fixes [various authors]
- #134: CI testing: add Windows, test both 4.14 and 5.0 [Hugo Heuzard]

Release 1.12 (2021-03-03)
Expand Down
8 changes: 3 additions & 5 deletions project.mak
Expand Up @@ -62,8 +62,6 @@ TOINSTALL += $(CMIDOC)
OCAMLFLAGS += -bin-annot
endif

MKLIBLDFLAGS = $(foreach flag, $(LDFLAGS), -ldopt $(flag))

# build targets
###############

Expand All @@ -73,16 +71,16 @@ tests:
make -C tests test

zarith.cma: $(MLSRC:%.ml=%.cmo)
$(OCAMLMKLIB) $(DEBUG) -failsafe -o zarith $+ $(LIBS) $(MKLIBLDFLAGS)
$(OCAMLMKLIB) $(DEBUG) -failsafe -o zarith $+ $(LIBS) $(LDFLAGS)

zarith.cmxa: $(MLSRC:%.ml=%.cmx)
$(OCAMLMKLIB) $(DEBUG) -failsafe -o zarith $+ $(LIBS) $(MKLIBLDFLAGS)
$(OCAMLMKLIB) $(DEBUG) -failsafe -o zarith $+ $(LIBS) $(LDFLAGS)

zarith.cmxs: zarith.cmxa libzarith.$(LIBSUFFIX)
$(OCAMLOPT) -shared -o $@ -I . zarith.cmxa -linkall

libzarith.$(LIBSUFFIX): $(CSRC:%.c=%.$(OBJSUFFIX))
$(OCAMLMKLIB) $(DEBUG) -failsafe -o zarith $+ $(LIBS) $(MKLIBLDFLAGS)
$(OCAMLMKLIB) $(DEBUG) -failsafe -o zarith $+ $(LIBS) $(LDFLAGS)

zarith_top.cma: zarith_top.cmo
$(OCAMLC) $(DEBUG) -o $@ -a $<
Expand Down

0 comments on commit b975908

Please sign in to comment.