intercal: fix build on -fno-common toolchains

Without the change build fails on upstream gcc-10 as:

    ld: parser.o:/build/intercal-0.31/parser.c:1501: multiple definition of
      `yydebug'; src/perpet.o:/build/intercal-0.31/src/perpet.c:88: first defined here
main
Sergei Trofimovich 2 years ago
parent 25e4e7af03
commit fced75ac03
  1. 12
      pkgs/development/compilers/intercal/default.nix

@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl
{ lib, stdenv, fetchurl, fetchpatch
, pkg-config
, bison, flex
, makeWrapper }:
@ -14,6 +14,16 @@ stdenv.mkDerivation rec {
sha256 = "1z2gpa5rbqb7jscqlf258k0b0jc7d2zkyipb5csjpj6d3sw45n4k";
};
patches = [
# Pull patch pending upstream inclusion for -fno-common toolchains:
# https://gitlab.com/esr/intercal/-/issues/4
(fetchpatch {
name = "fno-common.patch";
url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/dev-lang/c-intercal/files/c-intercal-31.0-no-common.patch?id=a110a98b4de6f280d770ba3cc92a4612326205a3";
sha256 = "03523fc40042r2ryq5val27prlim8pld4950qqpawpism4w3y1p2";
})
];
buildInputs =
[ pkg-config bison flex makeWrapper ];

Loading…
Cancel
Save