about summary refs log tree commit diff
path: root/pkgs/development/compilers/ocaml/4.03.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/compilers/ocaml/4.03.nix')
-rw-r--r--pkgs/development/compilers/ocaml/4.03.nix6
1 files changed, 6 insertions, 0 deletions
diff --git a/pkgs/development/compilers/ocaml/4.03.nix b/pkgs/development/compilers/ocaml/4.03.nix
index 9f6c24014ea18..ea0a23502fed5 100644
--- a/pkgs/development/compilers/ocaml/4.03.nix
+++ b/pkgs/development/compilers/ocaml/4.03.nix
@@ -9,4 +9,10 @@ import ./generic.nix {
     { url = "https://github.com/ocaml/ocaml/commit/a8b2cc3b40f5269ce8525164ec2a63b35722b22b.patch";
       sha256 = "sha256:1rrknmrk86xrj2k3hznnjk1gwnliyqh125zabg1hvy6dlvml9b0x"; }
   ];
+
+  # Workaround build failure on -fno-common toolchains like upstream
+  # gcc-10. Otherwise build fails as:
+  #   ld: libcamlrun.a(startup.o):(.bss+0x800): multiple definition of
+  #     `caml_code_fragments_table'; libcamlrun.a(backtrace.o):(.bss+0x20): first defined here
+  NIX_CFLAGS_COMPILE = "-fcommon";
 }