OCaml Forge

Detail: [#1250] Sys.os_type, os_type variable and cross-compilation

Bugs: Browse | Download .csv | Monitor

[#1250] Sys.os_type, os_type variable and cross-compilation

Date:
2013-01-18 13:46
Priority:
3
State:
Open
Submitted by:
Jérôme Vouillon (vouillon)
Assigned to:
Nobody (None)
Product:
None
Due in version:
None
Resolution:
None
Severity:
None
Version:
None
Component:
OASIS
Operating System:
None
 
URL:
Summary:
Sys.os_type, os_type variable and cross-compilation

Detailed description
When cross-compiling, one needs to make a difference between the target os type and the build os type. It seems to me that Sys.os_type could refer to the build os type, and then the os_type variable in setup.data could be free to refer to the target os type.

For instance, to compile Lwt for Windows, I need to set the variable os_type to Win32 for proper configuration, but then oasis complains: "Cannot handle os_type Win32 filename concat".

The work-around I use is to provide an initial setup.data file with just the variables "prefix" and "datarootdir", so that oasis does not have to concatenate filenames.

But it seems to me that oasis should just ignore variable os_type and always use Sys.os_type instead. Do we ever need to run setup.ml on one OS using the ocamlc binary from another OS?

Followup

No Followups Have Been Posted

Attached Files:

Changes:

No Changes Have Been Made to This Item