diff options
-rw-r--r-- | pkgs/build-support/bintools-wrapper/default.nix | 6 | ||||
-rw-r--r-- | pkgs/build-support/cc-wrapper/default.nix | 6 | ||||
-rw-r--r-- | pkgs/development/misc/avr/libc/default.nix | 1 |
3 files changed, 12 insertions, 1 deletions
diff --git a/pkgs/build-support/bintools-wrapper/default.nix b/pkgs/build-support/bintools-wrapper/default.nix index 66027485ee714..1a32f365bab2a 100644 --- a/pkgs/build-support/bintools-wrapper/default.nix +++ b/pkgs/build-support/bintools-wrapper/default.nix @@ -325,6 +325,12 @@ 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 '' diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix index d788076dda510..4e427bedc6536 100644 --- a/pkgs/build-support/cc-wrapper/default.nix +++ b/pkgs/build-support/cc-wrapper/default.nix @@ -668,6 +668,12 @@ 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 '' diff --git a/pkgs/development/misc/avr/libc/default.nix b/pkgs/development/misc/avr/libc/default.nix index d7e9f0efe9992..9b3ac75d11046 100644 --- a/pkgs/development/misc/avr/libc/default.nix +++ b/pkgs/development/misc/avr/libc/default.nix @@ -19,7 +19,6 @@ stdenv.mkDerivation rec { passthru = { incdir = "/avr/include"; - libdir = "/avr/lib"; }; meta = with lib; { |