about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorMario Rodas <marsam@users.noreply.github.com>2022-06-26 18:30:50 -0500
committerGitHub <noreply@github.com>2022-06-26 18:30:50 -0500
commit8a87aa2284bbae7deae85b39934830f6057e9e01 (patch)
tree87f300c114aaf5d5fb156da5f5436101ac836f21 /pkgs
parent70811c9de618daaf1889b87fdc4c457ce0a0594c (diff)
parentce6f0bee59f91f174e51dc92bfeb5698ca7da84a (diff)
Merge pull request #179253 from trofi/workaround-fno-common-for-bs-platform
bs-platform: workaround -fno-common build failure on aarch64
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/compilers/bs-platform/ocaml.nix7
1 files changed, 7 insertions, 0 deletions
diff --git a/pkgs/development/compilers/bs-platform/ocaml.nix b/pkgs/development/compilers/bs-platform/ocaml.nix
index 05fb8b6b17eac..3fe0e0b2eede5 100644
--- a/pkgs/development/compilers/bs-platform/ocaml.nix
+++ b/pkgs/development/compilers/bs-platform/ocaml.nix
@@ -5,6 +5,13 @@ stdenv.mkDerivation rec {
   configurePhase = ''
     ./configure -prefix $out
   '';
+
+  # Workaround ocaml-4.06 limitation of duplicate definitions.
+  #   ld: libcamlrun.a(minor_gc.o):/build/ocaml/byterun/caml/major_gc.h:67: multiple definition of
+  #     `caml_major_ring'; libcamlrun.a(stacks.o):/build/ocaml/byterun/caml/major_gc.h:67: first defined here
+  # Match -fcommon workaround in ocaml-4.06 itself.
+  NIX_CFLAGS_COMPILE = "-fcommon";
+
   buildPhase = ''
     make -j9 world.opt
   '';