This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

gcc-arm-none-eabi: what were the Newlib compilation options?

This question has been asked before, but ignored (https://community.arm.com/support-forums/f/compilers-and-libraries-forum/52220/gnu-arm-embedded-what-were-the-newlib-compilation-options).

I would dare to ask it again:

Exactly what compilation options were used to build Newlib?

The versions of GCC tools of interest are:

  • gcc-arm-none-eabi-9-2020-q2-update
  • gcc-arm-none-eabi-10.3-2021.10

It's not just an idle interest, or an attempt to waste your valuable time. I've got a practical need to rebuild Newlib as position-independent code, if you need to know why.

Is any real developer with access to build scripts reading this?

Thank you in advance,

    Vadim Barshaw

  • Is that in the "manifests" here: https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/downloads-1

    The arm-none-eabi manifest says:

    # Component data for newlib
    newlib_url=https://developer.arm.com/-/media/Files/downloads/gnu/11.2-2022.02/src
    newlib_filespec=newlib-cygwin.tar.xz
    newlib_mingw_only="no"
    newlib_linuxhost_only="no"
    newlib_staticlink="yes"
    newlib_configure="--disable-newlib-supplied-syscalls --enable-newlib-io-long-long --enable-newlib-io-c99-formats --enable-newlib-mb --enable-newlib-reent-check-verify"
    

  • Hi both,

    Sadly, those options have changed a little since the GCC 9, 10 Embedded releases... For those releases the options should have been:

    For Newlib:

    --enable-newlib-io-long-long \
    --enable-newlib-io-c99-formats \
    --enable-newlib-reent-check-verify \
    --enable-newlib-register-fini \
    --enable-newlib-retargetable-locking \
    --disable-newlib-supplied-syscalls \
    --disable-nls
    For Newlib-nano:
    --disable-newlib-supplied-syscalls \
    --enable-newlib-reent-check-verify \
    --enable-newlib-reent-small \
    --enable-newlib-retargetable-locking \
    --disable-newlib-fvwrite-in-streamio \
    --disable-newlib-fseek-optimization \
    --disable-newlib-wide-orient \
    --enable-newlib-nano-malloc \
    --disable-newlib-unbuf-stream-opt \
    --enable-lite-exit \
    --enable-newlib-global-atexit \
    --enable-newlib-nano-formatted-io \
    --disable-nls

    (as well as the usual --build, --host, --target, --prefix options)

    Hope this helps!
  • Hi Stam,

    Thanks a lot, this is exactly what I was after. I suspected that those listed in GCC 11 manifest, as Bill suggested, are not all options.

    Kind regards,

        Vadim