Merge pull request #107802 from prusnak/gcc-arm-embedded

gcc-arm-embedded: 9-2020-q2-update -> 10-2020-q4-major
This commit is contained in:
Pavol Rusnak 2020-12-29 11:37:44 +01:00 committed by GitHub
commit 06a3451861
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 75 additions and 21 deletions

View file

@ -0,0 +1,53 @@
{ stdenv
, fetchurl
, ncurses5
, python27
}:
stdenv.mkDerivation rec {
pname = "gcc-arm-embedded";
version = "10-2020-q4-major";
subdir = "10-2020q4";
suffix = {
aarch64-linux = "aarch64-linux";
x86_64-darwin = "mac";
x86_64-linux = "x86_64-linux";
}.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
src = fetchurl {
url = "https://developer.arm.com/-/media/Files/downloads/gnu-rm/${subdir}/gcc-arm-none-eabi-${version}-${suffix}.tar.bz2";
sha256 = {
aarch64-linux = "0spkbh7vnda1w0nvavk342nb24nqxn8kln3k9j85mzil560qqg9l";
x86_64-darwin = "1h5xn0npwkilqxg7ifrymsl7kjpafr9r9gjqgcpb0kjxavijvldy";
x86_64-linux = "066nvhg5zdf3jvy9w23y439ghf1hvbicdyrrw9957gwb8ym4q4r1";
}.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
};
dontConfigure = true;
dontBuild = true;
dontPatchELF = true;
dontStrip = true;
installPhase = ''
mkdir -p $out
cp -r * $out
ln -s $out/share/doc/gcc-arm-none-eabi/man $out/man
'';
preFixup = ''
find $out -type f | while read f; do
patchelf "$f" > /dev/null 2>&1 || continue
patchelf --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) "$f" || true
patchelf --set-rpath ${stdenv.lib.makeLibraryPath [ "$out" stdenv.cc.cc ncurses5 python27 ]} "$f" || true
done
'';
meta = with stdenv.lib; {
description = "Pre-built GNU toolchain from ARM Cortex-M & Cortex-R processors";
homepage = "https://developer.arm.com/open-source/gnu-toolchain/gnu-rm";
license = with licenses; [ bsd2 gpl2 gpl3 lgpl21 lgpl3 mit ];
maintainers = with maintainers; [ prusnak ];
platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" ];
};
}

View file

@ -22,7 +22,10 @@ stdenv.mkDerivation rec {
}.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
};
phases = [ "unpackPhase" "installPhase" "fixupPhase" ];
dontConfigure = true;
dontBuild = true;
dontPatchELF = true;
dontStrip = true;
installPhase = ''
mkdir -p $out
@ -30,12 +33,9 @@ stdenv.mkDerivation rec {
ln -s $out/share/doc/gcc-arm-none-eabi/man $out/man
'';
dontPatchELF = true;
dontStrip = true;
preFixup = ''
find $out -type f | while read f; do
patchelf $f > /dev/null 2>&1 || continue
patchelf "$f" > /dev/null 2>&1 || continue
patchelf --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) "$f" || true
patchelf --set-rpath ${stdenv.lib.makeLibraryPath [ "$out" stdenv.cc.cc ncurses5 python27 ]} "$f" || true
done

View file

@ -22,7 +22,10 @@ stdenv.mkDerivation rec {
}.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
};
phases = [ "unpackPhase" "installPhase" "fixupPhase" ];
dontConfigure = true;
dontBuild = true;
dontPatchELF = true;
dontStrip = true;
installPhase = ''
mkdir -p $out
@ -30,12 +33,9 @@ stdenv.mkDerivation rec {
ln -s $out/share/doc/gcc-arm-none-eabi/man $out/man
'';
dontPatchELF = true;
dontStrip = true;
preFixup = ''
find $out -type f | while read f; do
patchelf $f > /dev/null 2>&1 || continue
patchelf "$f" > /dev/null 2>&1 || continue
patchelf --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) "$f" || true
patchelf --set-rpath ${stdenv.lib.makeLibraryPath [ "$out" stdenv.cc.cc ncurses5 python27 ]} "$f" || true
done

View file

@ -22,7 +22,10 @@ stdenv.mkDerivation rec {
}.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
};
phases = [ "unpackPhase" "installPhase" "fixupPhase" ];
dontConfigure = true;
dontBuild = true;
dontPatchELF = true;
dontStrip = true;
installPhase = ''
mkdir -p $out
@ -30,12 +33,9 @@ stdenv.mkDerivation rec {
ln -s $out/share/doc/gcc-arm-none-eabi/man $out/man
'';
dontPatchELF = true;
dontStrip = true;
preFixup = ''
find $out -type f | while read f; do
patchelf $f > /dev/null 2>&1 || continue
patchelf "$f" > /dev/null 2>&1 || continue
patchelf --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) "$f" || true
patchelf --set-rpath ${stdenv.lib.makeLibraryPath [ "$out" stdenv.cc.cc ncurses5 python27 ]} "$f" || true
done

View file

@ -24,7 +24,10 @@ stdenv.mkDerivation rec {
}.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
};
phases = [ "unpackPhase" "installPhase" "fixupPhase" ];
dontConfigure = true;
dontBuild = true;
dontPatchELF = true;
dontStrip = true;
installPhase = ''
mkdir -p $out
@ -32,12 +35,9 @@ stdenv.mkDerivation rec {
ln -s $out/share/doc/gcc-arm-none-eabi/man $out/man
'';
dontPatchELF = true;
dontStrip = true;
preFixup = ''
find $out -type f | while read f; do
patchelf $f > /dev/null 2>&1 || continue
patchelf "$f" > /dev/null 2>&1 || continue
patchelf --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) "$f" || true
patchelf --set-rpath ${stdenv.lib.makeLibraryPath [ "$out" stdenv.cc.cc ncurses5 python27 ]} "$f" || true
done

View file

@ -9452,7 +9452,8 @@ in
gcc-arm-embedded-7 = callPackage ../development/compilers/gcc-arm-embedded/7 {};
gcc-arm-embedded-8 = callPackage ../development/compilers/gcc-arm-embedded/8 {};
gcc-arm-embedded-9 = callPackage ../development/compilers/gcc-arm-embedded/9 {};
gcc-arm-embedded = gcc-arm-embedded-9;
gcc-arm-embedded-10 = callPackage ../development/compilers/gcc-arm-embedded/10 {};
gcc-arm-embedded = gcc-arm-embedded-10;
gdc = gdc9;
gdc9 = wrapCC (gcc9.cc.override {