SHARE
TWEET

Untitled

a guest Feb 16th, 2019 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $NetBSD$
  2.  
  3. --- tools/ocamlmklib.mlp.orig   2012-07-17 18:25:54.000000000 +0000
  4. +++ tools/ocamlmklib.mlp
  5. @@ -26,6 +26,7 @@ and c_objs = ref []         (* .o, .a, .
  6.  and caml_libs = ref []      (* -cclib to pass to ocamlc, ocamlopt *)
  7.  and caml_opts = ref []      (* -ccopt to pass to ocamlc, ocamlopt *)
  8.  and dynlink = ref supports_shared_libraries
  9. +and elfmode = ref false     (* do not add C link lib path to run-time path *)
  10.  and failsafe = ref false    (* whether to fall back on static build only *)
  11.  and c_libs = ref []         (* libs to pass to mksharedlib and ocamlc -cclib *)
  12.  and c_Lopts = ref []      (* options to pass to mksharedlib and ocamlc -cclib *)
  13. @@ -95,8 +96,9 @@ let parse_arguments argv =
  14.        c_libs := s :: !c_libs
  15.      else if starts_with s "-L" then
  16.       (c_Lopts := s :: !c_Lopts;
  17. -      let l = chop_prefix s "-L" in
  18. -      if not (Filename.is_relative l) then rpath := l :: !rpath)
  19. +      if not !elfmode then
  20. +      (let l = chop_prefix s "-L" in
  21. +       if not (Filename.is_relative l) then rpath := l :: !rpath))
  22.      else if s = "-ocamlc" then
  23.        ocamlc := next_arg ()
  24.      else if s = "-ocamlopt" then
  25. @@ -107,6 +109,8 @@ let parse_arguments argv =
  26.        output_c := next_arg()
  27.      else if s = "-dllpath" || s = "-R" || s = "-rpath" then
  28.        rpath := next_arg() :: !rpath
  29. +    else if s = "-elfmode" then
  30. +      elfmode := true
  31.      else if starts_with s "-R" then
  32.        rpath := chop_prefix s "-R" :: !rpath
  33.      else if s = "-Wl,-rpath" then
  34. @@ -150,6 +154,7 @@ Usage: ocamlmklib [options] <.cmo|.cma|.
  35.  \n  -ccopt <opt>   C option passed to ocamlc -a or ocamlopt -a only\
  36.  \n  -custom        disable dynamic loading\
  37.  \n  -dllpath <dir> Add <dir> to the run-time search path for DLLs\
  38. +\n  -elfmode       Do not add link-time search path to run-time path\
  39.  \n  -F<dir>        Specify a framework directory (MacOSX)\
  40.  \n  -framework <name>    Use framework <name> (MacOSX)\
  41.  \n  -help          Print this help message and exit\
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top