3
0
Fork 0
forked from mirrors/nixpkgs

bs-platform: workaround -fno-common build failure on aarch64

Without the change -fno-common toolchain like llvm-11 fails as:

    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
This commit is contained in:
Sergei Trofimovich 2022-06-26 22:28:11 +01:00
parent f9f61cdd89
commit ce6f0bee59

View file

@ -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
'';