Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 854c81d

Browse files
committedJul 15, 2011
[build] fix unix compilation by explicitly including ocaml system headers via a tag (and not for the xen build)
·
1 parent a4a1b2f commit 854c81d

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed
 

‎lib/myocamlbuild.ml

+4
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,9 @@ module CC = struct
120120
A "-DCAML_NAME_SPACE"; A "-DNATIVE_CODE"; A "-DTARGET_amd64"; A "-DSYS_xen";
121121
A (ps "-I%s/os/runtime_xen/ocaml" Pathname.pwd) ] @ ocaml_debug_inc
122122

123+
(* ocaml system include directory i.e. /usr/lib/ocaml *)
124+
let ocaml_sys_incs = [ A"-I"; Px (Util.run_and_read "ocamlc -where"); ]
125+
123126
(* dietlibc bits, mostly extra warnings *)
124127
let dietlibc_incs = [
125128
A "-Wextra"; A "-Wchar-subscripts"; A "-Wmissing-prototypes";
@@ -277,6 +280,7 @@ let _ = dispatch begin function
277280
flag ["c"; "compile"; "include_xen"] & S CC.xen_incs;
278281
flag ["c"; "compile"; "include_libm"] & S CC.libm_incs;
279282
flag ["c"; "compile"; "include_ocaml"] & S CC.ocaml_incs;
283+
flag ["c"; "compile"; "include_system_ocaml"] & S CC.ocaml_sys_incs;
280284
flag ["c"; "compile"; "include_dietlibc"] & S CC.dietlibc_incs;
281285
flag ["c"; "compile"; "pic"] & S [A"-fPIC"];
282286

‎lib/os/runtime_unix/_tags

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
<*.c>: include_libev,pic,unix_header
2-
<*_stubs.c>: include_ocaml
1+
<*.c>: include_libev,pic,unix_header,include_system_ocaml

0 commit comments

Comments
 (0)
Please sign in to comment.