Merge pull request #182187 from adisbladis/newlib-nano-cc

newlib-nano: Set same flags as regular newlib in cc-wrapper/gcc config
This commit is contained in:
adisbladis 2022-08-08 22:07:57 +08:00 committed by GitHub
commit 5cc12aa8cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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"

View File

@ -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"
);