Admins will be upgrading ORNL GitLab Servers on Saturday, 16 May 2026, from 7 AM until 11 AM EST. Repositories will experience intermittent outages during this time.
# newlib expects CC to build for build platform, not host platform
preConfigure=''
@@ -22,31 +34,65 @@ stdenv.mkDerivation rec {
'';
configurePlatforms=["build""target"];
# flags copied from https://community.arm.com/support-forums/f/compilers-and-libraries-forum/53310/gcc-arm-none-eabi-what-were-the-newlib-compilation-options
# sort alphabetically
configureFlags=[
"--host=${stdenv.buildPlatform.config}"
]++(if!nanoizeNewlibthen[
"--disable-newlib-supplied-syscalls"
"--disable-nls"
"--enable-newlib-retargetable-locking"
]++(if!nanoizeNewlibthen[
"--enable-newlib-io-c99-formats"
"--enable-newlib-io-long-long"
"--enable-newlib-reent-check-verify"
"--enable-newlib-register-fini"
"--enable-newlib-retargetable-locking"
]else[
"--enable-newlib-reent-small"
"--disable-newlib-fvwrite-in-streamio"
"--disable-newlib-fseek-optimization"
"--disable-newlib-wide-orient"
"--enable-newlib-nano-malloc"
"--disable-newlib-fvwrite-in-streamio"
"--disable-newlib-supplied-syscalls"
"--disable-newlib-unbuf-stream-opt"
"--disable-newlib-wide-orient"
"--disable-nls"
"--enable-lite-exit"
"--enable-newlib-global-atexit"
"--enable-newlib-nano-formatted-io"
"--enable-newlib-nano-malloc"
"--enable-newlib-reent-check-verify"
"--enable-newlib-reent-small"
"--enable-newlib-retargetable-locking"
]);
dontDisableStatic=true;
# apply necessary nano changes from https://developer.arm.com/-/media/Files/downloads/gnu/12.2.rel1/manifest/copy_nano_libraries.sh?rev=4c50be6ccb9c4205a5262a3925317073&hash=1375A7B0A1CD0DB9B9EB0D2B574ADF66