Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

yosys: fix build with clang

(cherry picked from commit f13cb56360cbf9cc1059221a24acdb5ac4ca69a3)

authored by Vincent Laporte and committed by Daiderd Jordan 3658e3fa 008af145

+6 -2
+6 -2
pkgs/development/compilers/yosys/default.nix
··· 35 35 buildInputs = [ tcl readline libffi python3 bison flex ]; 36 36 37 37 patchPhase = '' 38 + substituteInPlace ../yosys-abc/Makefile \ 39 + --replace 'CC := gcc' "" 38 40 substituteInPlace ./Makefile \ 41 + --replace 'CXX = clang' "" \ 42 + --replace 'ABCMKARGS = CC="$(CXX)"' 'ABCMKARGS =' \ 39 43 --replace 'echo UNKNOWN' 'echo ${substring 0 10 (elemAt srcs 0).rev}' 40 44 ''; 41 45 42 46 preBuild = '' 43 47 chmod -R u+w ../yosys-abc 44 48 ln -s ../yosys-abc abc 45 - make config-gcc 49 + make config-${if stdenv.cc.isClang or false then "clang" else "gcc"} 46 50 echo 'ABCREV := default' >> Makefile.conf 47 51 makeFlags="PREFIX=$out $makeFlags" 48 52 ''; ··· 61 65 homepage = http://www.clifford.at/yosys/; 62 66 license = stdenv.lib.licenses.isc; 63 67 maintainers = with stdenv.lib.maintainers; [ shell thoughtpolice ]; 64 - platforms = stdenv.lib.platforms.linux; 68 + platforms = stdenv.lib.platforms.unix; 65 69 }; 66 70 }