summaryrefslogtreecommitdiff
path: root/driver
diff options
context:
space:
mode:
authorJacques Garrigue <garrigue at math.nagoya-u.ac.jp>2001-09-07 05:56:31 +0000
committerJacques Garrigue <garrigue at math.nagoya-u.ac.jp>2001-09-07 05:56:31 +0000
commit4bdf28108fc4cc9fd9b0c50b25e6bc8ad18a6975 (patch)
tree99c71138e9f8d8ced3caef47c876bcadec15ae71 /driver
parent4002f22cdd8da7c91ed65aa133dbe9f7293d6f1e (diff)
downloadocaml-4bdf28108fc4cc9fd9b0c50b25e6bc8ad18a6975.tar.gz
avoid problem with dlsym/failwith and keep thread linking info
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3701 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'driver')
-rw-r--r--driver/main.ml2
-rw-r--r--driver/optmain.ml2
2 files changed, 4 insertions, 0 deletions
diff --git a/driver/main.ml b/driver/main.ml
index 4d97a070ed..4370115449 100644
--- a/driver/main.ml
+++ b/driver/main.ml
@@ -118,6 +118,8 @@ let main () =
end
else if not !compile_only && !objfiles <> [] then begin
Compile.init_path();
+ if !thread_safe && systhreads_link <> "" then
+ ccopts := systhreads_link :: !ccopts;
Bytelink.link (List.rev !objfiles)
end;
exit 0
diff --git a/driver/optmain.ml b/driver/optmain.ml
index 572ce7dfaa..79249037e2 100644
--- a/driver/optmain.ml
+++ b/driver/optmain.ml
@@ -162,6 +162,8 @@ let main () =
end
else if not !compile_only && !objfiles <> [] then begin
Optcompile.init_path();
+ if !thread_safe && systhreads_link <> "" then
+ ccopts := systhreads_link :: !ccopts;
Asmlink.link ppf (List.rev !objfiles)
end;
exit 0