diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix index f8e28c452c33..047cdf6a4911 100644 --- a/pkgs/build-support/cc-wrapper/default.nix +++ b/pkgs/build-support/cc-wrapper/default.nix @@ -480,7 +480,7 @@ stdenv.mkDerivation { hardening_unsupported_flags+=" stackprotector fortify" '' + optionalString targetPlatform.isAvr '' hardening_unsupported_flags+=" stackprotector pic" - '' + optionalString (targetPlatform.libc == "newlib") '' + '' + optionalString (targetPlatform.libc == "newlib" || targetPlatform.libc == "newlib-nano") '' hardening_unsupported_flags+=" stackprotector fortify pie pic" '' + optionalString (targetPlatform.libc == "musl" && targetPlatform.isx86_32) '' hardening_unsupported_flags+=" stackprotector" diff --git a/pkgs/development/compilers/gcc/common/configure-flags.nix b/pkgs/development/compilers/gcc/common/configure-flags.nix index 3bcfd4b3e891..8ac7152d7e28 100644 --- a/pkgs/development/compilers/gcc/common/configure-flags.nix +++ b/pkgs/development/compilers/gcc/common/configure-flags.nix @@ -97,7 +97,7 @@ let # In uclibc cases, libgomp needs an additional '-ldl' # and as I don't know how to pass it, I disable libgomp. "--disable-libgomp" - ] ++ lib.optional (targetPlatform.libc == "newlib") "--with-newlib" + ] ++ lib.optional (targetPlatform.libc == "newlib" || targetPlatform.libc == "newlib-nano") "--with-newlib" ++ lib.optional (targetPlatform.libc == "avrlibc") "--with-avrlibc" );