1import ./generic.nix {
2 major_version = "4";
3 minor_version = "05";
4 patch_version = "0";
5 sha256 = "1y9fw1ci9pwnbbrr9nwr8cq8vypcxwdf4akvxard3mxl2jx2g984";
6
7 # If the executable is stipped it does not work
8 dontStrip = true;
9
10 patches = [
11 # Compatibility with Glibc 2.34
12 {
13 url = "https://github.com/ocaml/ocaml/commit/50c2d1275e537906ea144bd557fde31e0bf16e5f.patch";
14 sha256 = "sha256:0ck9b2dpgg5k2p9ndbgniql24h35pn1bbpxjvk69j715lswzy4mh";
15 }
16 # Compatibility with Binutils 2.29
17 {
18 url = "https://github.com/ocaml/ocaml/commit/b00000c6679804731692362b0baac27fa3fddfd5.patch";
19 sha256 = "sha256-CuEXGK3EsOevyUrc9TmSZo9DVBwjunQX7mKnDVHFpkY=";
20 }
21 ];
22
23 # Workaround build failure on -fno-common toolchains like upstream
24 # gcc-10. Otherwise build fails as:
25 # ld: libcamlrun.a(startup.o):(.bss+0x800): multiple definition of
26 # `caml_code_fragments_table'; libcamlrun.a(backtrace.o):(.bss+0x20): first defined here
27 env.NIX_CFLAGS_COMPILE = "-fcommon";
28}