2024-01-31 05:20:40 +00:00
|
|
|
{ pkgs }:
|
|
|
|
|
|
|
|
pkgs.stdenv.mkDerivation rec {
|
|
|
|
pname = "tt-gcc";
|
2024-10-01 20:21:59 +00:00
|
|
|
version = "unstable-2024-09-25";
|
2024-01-31 05:20:40 +00:00
|
|
|
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
owner = "tenstorrent-metal";
|
|
|
|
repo = "sfpi-tt-gcc";
|
2024-10-01 20:21:59 +00:00
|
|
|
# https://github.com/tenstorrent/sfpi-tt-gcc/commits/tt-rel/gcc-12.2
|
2024-11-20 03:04:05 +00:00
|
|
|
rev = "a5c31334942e9df66427837f7268269311fdfc2e";
|
2024-01-31 05:20:40 +00:00
|
|
|
# this takes a while and we don't need all of them
|
|
|
|
fetchSubmodules = true;
|
2024-11-20 03:04:05 +00:00
|
|
|
hash = "sha256-1d77+6Yv3i4M7J+vUwcUuFg56wCG9oVeDt+fvBKtHPI=";
|
2024-01-31 05:20:40 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = with pkgs; [
|
|
|
|
python3
|
|
|
|
util-linux
|
|
|
|
git
|
|
|
|
cacert
|
|
|
|
autoconf
|
|
|
|
automake
|
|
|
|
curl
|
|
|
|
gawk
|
|
|
|
bison
|
|
|
|
flex
|
|
|
|
texinfo
|
|
|
|
gperf
|
|
|
|
bc
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = with pkgs; [
|
|
|
|
libmpc
|
|
|
|
mpfr
|
|
|
|
gmp
|
|
|
|
zlib
|
|
|
|
expat
|
|
|
|
];
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"-disable-multilib"
|
|
|
|
"-with-abi=ilp32"
|
|
|
|
"-with-arch=rv32i"
|
|
|
|
"--prefix=${placeholder "out"}"
|
|
|
|
];
|
|
|
|
|
2024-10-01 18:10:19 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace Makefile.in \
|
|
|
|
--replace-fail 'flock `git' 'true'
|
|
|
|
'';
|
|
|
|
|
2024-01-31 05:20:40 +00:00
|
|
|
hardeningDisable = [
|
|
|
|
"format"
|
|
|
|
];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
}
|