Skip to content

Commit

Permalink
Merge pull request #220442 from pennae/avr
Browse files Browse the repository at this point in the history
avrlibc: build faster, make attiny devices work
  • Loading branch information
emilytrau authored Dec 3, 2023
2 parents d35201a + b2844f8 commit e2c4c9e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
6 changes: 0 additions & 6 deletions pkgs/build-support/bintools-wrapper/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -301,12 +301,6 @@ stdenv.mkDerivation {
hardening_unsupported_flags+=" relro bindnow"
''

+ optionalString (libc != null && targetPlatform.isAvr) ''
for isa in avr5 avr3 avr4 avr6 avr25 avr31 avr35 avr51 avrxmega2 avrxmega4 avrxmega5 avrxmega6 avrxmega7 tiny-stack; do
echo "-L${getLib libc}/avr/lib/$isa" >> $out/nix-support/libc-cflags
done
''

+ optionalString stdenv.targetPlatform.isDarwin ''
echo "-arch ${targetPlatform.darwinArch}" >> $out/nix-support/libc-ldflags
''
Expand Down
6 changes: 0 additions & 6 deletions pkgs/build-support/cc-wrapper/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -649,12 +649,6 @@ stdenv.mkDerivation {
hardening_unsupported_flags+=" stackprotector"
''

+ optionalString (libc != null && targetPlatform.isAvr) ''
for isa in avr5 avr3 avr4 avr6 avr25 avr31 avr35 avr51 avrxmega2 avrxmega4 avrxmega5 avrxmega6 avrxmega7 tiny-stack; do
echo "-B${getLib libc}/avr/lib/$isa" >> $out/nix-support/libc-crt1-cflags
done
''

+ optionalString stdenv.targetPlatform.isDarwin ''
echo "-arch ${targetPlatform.darwinArch}" >> $out/nix-support/cc-cflags
''
Expand Down
3 changes: 3 additions & 0 deletions pkgs/development/misc/avr/libc/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@ stdenv.mkDerivation rec {
stripDebugList = [ "bin" ];
dontPatchELF = true;

enableParallelBuilding = true;

passthru = {
incdir = "/avr/include";
libdir = "/avr/lib";
};

meta = with lib; {
Expand Down

0 comments on commit e2c4c9e

Please sign in to comment.