From 386207e312c64926cd522dd2ad790ec3bb6330b7 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sat, 4 Jun 2022 17:40:13 +0100 Subject: [PATCH] mmixware: add -fcommon workaround Workaround build failure on -fno-common toolchains like upstream gcc-10. Otherwise build fails as: ld: mmix-config.o:(.bss+0x600): multiple definition of `buffer'; /build/ccDuGrwH.o:(.bss+0x20): first defined here --- pkgs/development/tools/mmixware/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/tools/mmixware/default.nix b/pkgs/development/tools/mmixware/default.nix index 4f0515eec2f5..2b14bf09ddbd 100644 --- a/pkgs/development/tools/mmixware/default.nix +++ b/pkgs/development/tools/mmixware/default.nix @@ -18,6 +18,10 @@ stdenv.mkDerivation { substituteInPlace Makefile --replace 'rm abstime.h' "" ''; + # Workaround build failure on -fno-common toolchains: + # ld: mmix-config.o:(.bss+0x600): multiple definition of `buffer'; /build/ccDuGrwH.o:(.bss+0x20): first defined here + NIX_CFLAGS_COMPILE = "-fcommon"; + nativeBuildInputs = [ tetex ]; enableParallelBuilding = true;