1 Not sure if this is right, but OCAML_STDLIB_DIR can be undefined
2 in our cross-compiler. It's only used in a one place in the C
3 code so this works around it.
5 Index: build-tree/ocaml-3.12.0/byterun/dynlink.c
6 ===================================================================
7 --- build-tree.orig/ocaml-3.12.0/byterun/dynlink.c 2010-01-22 13:48:24.000000000 +0100
8 +++ build-tree/ocaml-3.12.0/byterun/dynlink.c 2010-06-23 19:30:27.000000000 +0200
11 stdlib = getenv("OCAMLLIB");
12 if (stdlib == NULL) stdlib = getenv("CAMLLIB");
13 - if (stdlib == NULL) stdlib = OCAML_STDLIB_DIR;
15 +#ifdef OCAML_STDLIB_DIR
16 + stdlib = OCAML_STDLIB_DIR;
20 ldconfname = caml_stat_alloc(strlen(stdlib) + 2 + sizeof(LD_CONF_NAME));
21 strcpy(ldconfname, stdlib);
22 strcat(ldconfname, "/" LD_CONF_NAME);