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