@@ -22,7 +22,7 @@ ifneq "$(CCOMPTYPE)" "msvc"
2222OC_CFLAGS += -g
2323endif
2424
25- OC_CFLAGS += $(SHAREDLIB_CFLAGS ) $( PTHREAD_CFLAGS )
25+ OC_CFLAGS += $(SHAREDLIB_CFLAGS )
2626
2727LIBS = $(STDLIBFLAGS ) -I $(ROOTDIR ) /otherlibs/unix
2828
@@ -59,27 +59,25 @@ all: lib$(LIBNAME).$(A) $(LIBNAME).cma $(CMIFILES)
5959allopt : lib$(LIBNAME ) nat.$(A ) $(LIBNAME ) .cmxa $(CMIFILES )
6060
6161lib$(LIBNAME ) .$(A ) : $(BYTECODE_C_OBJS )
62- $(MKLIB_CMD ) -o $(LIBNAME ) $(BYTECODE_C_OBJS ) $( PTHREAD_LIBS )
62+ $(MKLIB_CMD ) -o $(LIBNAME ) $(BYTECODE_C_OBJS )
6363
6464lib$(LIBNAME ) nat.$(A ) : $(NATIVECODE_C_OBJS )
6565 $(MKLIB_CMD ) -o $(LIBNAME ) nat $^
6666
6767$(LIBNAME ) .cma : $(THREADS_BCOBJS )
6868ifeq "$(UNIX_OR_WIN32 ) " "unix"
69- $(MKLIB) -o $(LIBNAME) -ocamlc '$(CAMLC)' -cclib -lunix -linkall \
70- $(PTHREAD_CAML_LIBS) $^
69+ $(MKLIB) -o $(LIBNAME) -ocamlc '$(CAMLC)' -cclib -lunix -linkall $^
7170# TODO: Figure out why -cclib -lunix is used here.
7271# It may be because of the threadsUnix module which is deprecated.
7372# It may hence be good to figure out whether this module shouldn't be
7473# removed, and then -cclib -lunix arguments.
7574else # Windows
76- $(MKLIB) -o $(LIBNAME) -ocamlc "$(CAMLC)" -linkall \
77- $(PTHREAD_CAML_LIBS) $^
75+ $(MKLIB) -o $(LIBNAME) -ocamlc "$(CAMLC)" -linkall $^
7876endif
7977
8078# See remark above: force static linking of libthreadsnat.a
8179$(LIBNAME ) .cmxa : $(THREADS_NCOBJS )
82- $(CAMLOPT ) -linkall -a -cclib -lthreadsnat $( PTHREAD_CAML_LIBS ) -o $@ $^
80+ $(CAMLOPT ) -linkall -a -cclib -lthreadsnat -o $@ $^
8381
8482# Note: I removed "-cclib -lunix" from the line above.
8583# Indeed, if we link threads.cmxa, then we must also link unix.cmxa,
0 commit comments