summary refs log tree commit diff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyich@gmail.com>2022-05-22 11:20:49 +0100
committerSergei Trofimovich <slyich@gmail.com>2022-05-22 11:21:35 +0100
commit24241c7dedf37e4fb0560850849bb1e5cede8adc (patch)
treec399fecbf1d27fb88280af14e73f6c0bec92da06
parent3b468e68b7cd9fd78ab0ffbf28dd767eac3fb253 (diff)
downloadnixpkgs-24241c7dedf37e4fb0560850849bb1e5cede8adc.tar
nixpkgs-24241c7dedf37e4fb0560850849bb1e5cede8adc.tar.gz
nixpkgs-24241c7dedf37e4fb0560850849bb1e5cede8adc.tar.bz2
nixpkgs-24241c7dedf37e4fb0560850849bb1e5cede8adc.tar.lz
nixpkgs-24241c7dedf37e4fb0560850849bb1e5cede8adc.tar.xz
nixpkgs-24241c7dedf37e4fb0560850849bb1e5cede8adc.tar.zst
nixpkgs-24241c7dedf37e4fb0560850849bb1e5cede8adc.zip
miranda: add -fcommon workaround
Workaround build failure on -fno-common toolchains like upstream
gcc-10. Otherwise build fails as:

    ld: types.o:(.bss+0x11b0): multiple definition of `current_file'; y.tab.o:(.bss+0x70): first defined here
-rw-r--r--pkgs/development/compilers/miranda/default.nix5
1 files changed, 5 insertions, 0 deletions
diff --git a/pkgs/development/compilers/miranda/default.nix b/pkgs/development/compilers/miranda/default.nix
index 7b29699f151..332f3d83e26 100644
--- a/pkgs/development/compilers/miranda/default.nix
+++ b/pkgs/development/compilers/miranda/default.nix
@@ -52,6 +52,11 @@ stdenv.mkDerivation rec {
     })
   ];
 
+  # Workaround build failure on -fno-common toolchains like upstream
+  # gcc-10. Otherwise build fails as:
+  #   ld: types.o:(.bss+0x11b0): multiple definition of `current_file'; y.tab.o:(.bss+0x70): first defined here
+  NIX_CFLAGS_COMPILE = "-fcommon";
+
   makeFlags = [
     "CC=${stdenv.cc.targetPrefix}cc"
     "CFLAGS=-O2"