d513634e6c
Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/avr-gcc/versions. These checks were done: - built on NixOS - ran ‘/nix/store/kj1gijncvyaz6a0v4fg78420i9xrhzg2-avr-gcc-8.1.0/bin/avr-g++ --help’ got 0 exit code - ran ‘/nix/store/kj1gijncvyaz6a0v4fg78420i9xrhzg2-avr-gcc-8.1.0/bin/avr-c++ --help’ got 0 exit code - ran ‘/nix/store/kj1gijncvyaz6a0v4fg78420i9xrhzg2-avr-gcc-8.1.0/bin/avr-gcc --help’ got 0 exit code - ran ‘/nix/store/kj1gijncvyaz6a0v4fg78420i9xrhzg2-avr-gcc-8.1.0/bin/avr-gcc-8.1.0 --help’ got 0 exit code - ran ‘/nix/store/kj1gijncvyaz6a0v4fg78420i9xrhzg2-avr-gcc-8.1.0/bin/avr-gcov -h’ got 0 exit code - ran ‘/nix/store/kj1gijncvyaz6a0v4fg78420i9xrhzg2-avr-gcc-8.1.0/bin/avr-gcov --help’ got 0 exit code - ran ‘/nix/store/kj1gijncvyaz6a0v4fg78420i9xrhzg2-avr-gcc-8.1.0/bin/avr-gcov help’ got 0 exit code - ran ‘/nix/store/kj1gijncvyaz6a0v4fg78420i9xrhzg2-avr-gcc-8.1.0/bin/avr-gcov-tool -h’ got 0 exit code - ran ‘/nix/store/kj1gijncvyaz6a0v4fg78420i9xrhzg2-avr-gcc-8.1.0/bin/avr-gcov-tool --help’ got 0 exit code - ran ‘/nix/store/kj1gijncvyaz6a0v4fg78420i9xrhzg2-avr-gcc-8.1.0/bin/avr-gcov-dump -h’ got 0 exit code - ran ‘/nix/store/kj1gijncvyaz6a0v4fg78420i9xrhzg2-avr-gcc-8.1.0/bin/avr-gcov-dump --help’ got 0 exit code - ran ‘/nix/store/kj1gijncvyaz6a0v4fg78420i9xrhzg2-avr-gcc-8.1.0/bin/avr-gcov-dump help’ got 0 exit code - ran ‘/nix/store/kj1gijncvyaz6a0v4fg78420i9xrhzg2-avr-gcc-8.1.0/bin/avr-cpp --help’ got 0 exit code - ran ‘/nix/store/kj1gijncvyaz6a0v4fg78420i9xrhzg2-avr-gcc-8.1.0/bin/avr-gcc-ar -h’ got 0 exit code - ran ‘/nix/store/kj1gijncvyaz6a0v4fg78420i9xrhzg2-avr-gcc-8.1.0/bin/avr-gcc-ar --help’ got 0 exit code - ran ‘/nix/store/kj1gijncvyaz6a0v4fg78420i9xrhzg2-avr-gcc-8.1.0/bin/avr-gcc-nm -h’ got 0 exit code - ran ‘/nix/store/kj1gijncvyaz6a0v4fg78420i9xrhzg2-avr-gcc-8.1.0/bin/avr-gcc-nm --help’ got 0 exit code - ran ‘/nix/store/kj1gijncvyaz6a0v4fg78420i9xrhzg2-avr-gcc-8.1.0/bin/avr-gcc-ranlib -h’ got 0 exit code - ran ‘/nix/store/kj1gijncvyaz6a0v4fg78420i9xrhzg2-avr-gcc-8.1.0/bin/avr-gcc-ranlib --help’ got 0 exit code - found 8.1.0 with grep in /nix/store/kj1gijncvyaz6a0v4fg78420i9xrhzg2-avr-gcc-8.1.0 - directory tree listing: https://gist.github.com/bc5f032e2fae6d464814f0d61feb07dd
61 lines
1.5 KiB
Nix
61 lines
1.5 KiB
Nix
{ stdenv, fetchurl, gmp, mpfr, libmpc, zlib, avrbinutils, texinfo }:
|
|
|
|
let
|
|
version = "8.1.0";
|
|
in
|
|
stdenv.mkDerivation {
|
|
|
|
name = "avr-gcc-${version}";
|
|
src = fetchurl {
|
|
url = "mirror://gcc/releases/gcc-${version}/gcc-${version}.tar.xz";
|
|
sha256 = "0lxil8x0jjx7zbf90cy1rli650akaa6hpk8wk8s62vk2jbwnc60x";
|
|
};
|
|
|
|
patches = [
|
|
./avrbinutils-path.patch
|
|
];
|
|
|
|
# avrbinutils-path.patch introduces a reference to @avrbinutils@, substitute
|
|
# it now.
|
|
postPatch = ''
|
|
substituteInPlace gcc/gcc-ar.c --subst-var-by avrbinutils ${avrbinutils}
|
|
'';
|
|
|
|
buildInputs = [ gmp mpfr libmpc zlib avrbinutils ];
|
|
|
|
nativeBuildInputs = [ texinfo ];
|
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
stripDebugList= [ "bin" "libexec" ];
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
configurePhase = ''
|
|
mkdir gcc-build
|
|
cd gcc-build
|
|
../configure \
|
|
--prefix=$out \
|
|
--host=$CHOST \
|
|
--build=$CHOST \
|
|
--target=avr \
|
|
--with-as=${avrbinutils}/bin/avr-as \
|
|
--with-gnu-as \
|
|
--with-gnu-ld \
|
|
--with-ld=${avrbinutils}/bin/avr-ld \
|
|
--with-system-zlib \
|
|
--disable-install-libiberty \
|
|
--disable-nls \
|
|
--disable-libssp \
|
|
--with-dwarf2 \
|
|
--enable-languages=c,c++'';
|
|
|
|
meta = with stdenv.lib; {
|
|
description = "GNU Compiler Collection, version ${version} for AVR microcontrollers";
|
|
homepage = http://gcc.gnu.org;
|
|
license = licenses.gpl3Plus;
|
|
platforms = with platforms; linux ++ darwin;
|
|
maintainers = with maintainers; [ mguentner ];
|
|
};
|
|
}
|