opam-version: "2.0"
synopsis: "Official 4.03.0 release with frame-pointers and flambda activated"
maintainer: "platform@lists.ocaml.org"
depends: [
  "ocaml" {= "4.03.0" & post}
  "base-unix" {post}
  "base-bigarray" {post}
  "base-threads" {post}
]
conflict-class: "ocaml-core-compiler"
flags: compiler
setenv: CAML_LD_LIBRARY_PATH = "%{lib}%/stublibs"
build: [
  [
    "sed"
    "-ib"
    "-e"
    "s/opts=\"\"/opts=\"-Wno-implicit-function-declaration\"/"
    "config/auto-aux/hasgot"
  ] {os = "macos"}
  [
    "./configure"
    "-prefix"
    prefix
    "-with-debug-runtime"
    "-with-frame-pointers"
    "-flambda"
  ] {os != "openbsd" & os != "freebsd" & os != "macos"}
  [
    "./configure"
    "-prefix"
    prefix
    "-with-debug-runtime"
    "-with-frame-pointers"
    "-flambda"
    "-cc"
    "cc"
    "-aspp"
    "cc -c"
  ] {os = "openbsd" | os = "freebsd" | os = "macos"}
  [make "world"]
  [make "world.opt"]
]
install: [make "install"]
url {
  src: "https://github.com/ocaml/ocaml/archive/4.03.0.tar.gz"
  checksum: "md5=4ddf4977de7708f11adad692c63e87ec"
}
patches: ["fix-gcc10.patch"]
extra-files: [ ["fix-gcc10.patch" "md5=4370afea8ee2dea768b0fcba52394a2f"] ]
available: !(os = "macos" & arch = "arm64")
