Permalink
Browse files

Support for Win64 (untested; thanks to David Allsopp)

ocamlfind no longer emits auto-generated -ccopt options. These tend to 
accumulate, and it is possible that for large projects the maximum 
command line length is exceeded. Current versions of the O'Caml 
compilers do not need these extra -ccopt anyway, so this code is 
completely dropped.

version is 1.2.5test1


git-svn-id: https://godirepo.camlcity.org/svn/lib-findlib/trunk@133 5e68ba05-c9cc-0310-a7d4-dca2aa431786
  • Loading branch information...
1 parent f1b575c commit 4f900bef8e635c1de8f88e1ce901b57075d4f048 gerd committed Sep 2, 2009
Showing with 33 additions and 6 deletions.
  1. +4 −2 configure
  2. +11 −0 doc/README.xml
  3. +18 −4 src/findlib/frontend.ml
View
@@ -7,7 +7,7 @@
#set -x
-version="1.2.4"
+version="1.2.5test1"
# Remember the old IFS value:
oldifs="$IFS"
@@ -61,7 +61,7 @@ get_path () {
get_stdlib () {
# Older versions of ocamlc do not accept -where, so there is a fallback
# method:
- ocamlc -where 2>/dev/null | tr -d '\r' || {
+ ocamlc -where 2>/dev/null | tr -d '\015' || {
ocamlc -v | sed -n -e "/Standard library directory/s/.*: \(.*\)/\1/p"; }
}
@@ -203,6 +203,7 @@ if [ -z "$system" ]; then
# This may be
# - mingw
# - win32
+ # - win64
# - cygwin
# - some other string means Unix
# - empty means ocamlc does not support -config
@@ -211,6 +212,7 @@ fi
case "$system" in
mingw) use_cygpath=1;;
win32) use_cygpath=1;;
+ win64) use_cygpath=1;;
esac
######################################################################
View
@@ -109,6 +109,17 @@ configuration files, and library routines in detail.</p>
<title>List of Changes</title>
<ul>
+ <li>
+ <p><em>1.2.5:</em> Fix: Again CR deletion... Turns out some OS do not
+ understand '\r' but only '\015' (thanks to Isaiah Weiner)</p>
+ <p>Support for Win64 (untested; thanks to David Allsopp)</p>
+ <p>ocamlfind no longer emits auto-generated -ccopt options. These
+ tend to accumulate, and it is possible that for large projects
+ the maximum command line length is exceeded. Current versions of
+ the O'Caml compilers do not need these extra -ccopt anyway, so
+ this code is completely dropped.</p>
+ </li>
+
<li>
<p><em>1.2.4:</em> Fix: Bigarray needs unix (Thanks to Markus Mottl)</p>
<p>Fix: In the version of camlp4 provided by O'Caml 3.11 various
View
@@ -314,7 +314,7 @@ let run_command ?filter verbose cmd args =
Sys.signal Sys.sigint Sys.Signal_ignore in
let need_exe =
- List.mem Findlib_config.system [ "win32"; "mingw" ] in
+ List.mem Findlib_config.system [ "win32"; "win64"; "mingw" ] in
let fixed_cmd =
if need_exe then (
@@ -431,7 +431,7 @@ let query_package () =
let i_format =
"-I %d" in
let l_format =
- if Findlib_config.system = "win32" then
+ if Findlib_config.system = "win32" || Findlib_config.system = "win64" then
(* Microsoft toolchain *)
"-ccopt \"/link /libpath:%d\""
else
@@ -958,9 +958,22 @@ let ocamlc which () =
[]
else
[ "-I"; slashify pkgdir;
- "-ccopt"; out_path ~prefix:"-I" pkgdir; ])
+ (* "-ccopt"; out_path ~prefix:"-I" pkgdir; -- see comment *)
+ ])
eff_packages_dl) in
+ (* We no longer emit -ccopt options, because ocamlc/ocamlopt already
+ do that for each -I if the C compiler needs to be invoked
+ (so far I tracked it, ocamlc/ocamlopt have always done this, even
+ back in 1996).
+ *)
+ let l_options = [] in
+ (* Also, no longer -ccopt -L options. Current ocamlc/ocamlopt do that
+ for each -I option passed to them anyway, so we can omit that here.
+ See ocaml change (quite old, but I was not aware of it):
+ http://camlcvs.inria.fr/cgi-bin/cvsweb/ocaml/asmcomp/asmlink.ml.diff?r1=1.38;r2=1.39
+ *)
+(*
let l_options =
List.flatten
(List.map
@@ -969,12 +982,13 @@ let ocamlc which () =
if List.mem npkgdir exclude_list then
[]
else
- if Findlib_config.system = "win32" then
+ if Findlib_config.system = "win32" || Findlib_config.system = "win64" then
(* Microsoft toolchain *)
[ "-ccopt"; out_path ~prefix:"/link /libpath:" pkgdir ]
else
[ "-ccopt"; out_path ~prefix:"-L" pkgdir; ])
eff_link_dl) in
+ *)
let archives =
List.flatten

0 comments on commit 4f900be

Please sign in to comment.