summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--asmcomp/asmlink.ml14
1 files changed, 8 insertions, 6 deletions
diff --git a/asmcomp/asmlink.ml b/asmcomp/asmlink.ml
index 20e0e6983..0bc18350a 100644
--- a/asmcomp/asmlink.ml
+++ b/asmcomp/asmlink.ml
@@ -233,6 +233,13 @@ let call_linker file_list startup_file =
(String.concat " " (List.rev file_list))
| _ ->
if not !Clflags.output_c_object then
+ let rpath =
+ String.concat ":"
+ (List.filter ((<>) "")
+ (!Clflags.dllpaths @
+ Dllpath.ld_library_path_contents() @
+ Dllpath.ld_conf_contents()))
+ in
Printf.sprintf "%s %s -o %s -I%s %s %s %s %s %s %s %s %s"
!Clflags.c_linker
(if !Clflags.gprofile then "-pg" else "")
@@ -244,12 +251,7 @@ let call_linker file_list startup_file =
(String.concat " "
(List.map (fun dir -> if dir = "" then "" else "-L" ^ dir)
!load_path))
- (String.concat " "
- (List.map (fun dir -> if dir = "" then "" else
- Config.native_c_rpath ^ dir)
- (!Clflags.dllpaths @
- Dllpath.ld_library_path_contents() @
- Dllpath.ld_conf_contents())))
+ (if rpath <> "" then Config.bytecomp_c_rpath ^ rpath else "")
(String.concat " " (List.rev !Clflags.ccobjs))
runtime_lib
c_lib