Skip to content

Commit

Permalink
newlib: workaround cflags issue in crosstool for newlib-nano
Browse files Browse the repository at this point in the history
When building newlib-nano because its treated as a companion_libs the
order it gets built ends up not having CT_ARCH_TARGET_CFLAGS set
correctly (as it gets cleared by a previous build stage).

This causes issues on ARM, so to workaround this we mimic the setting
of CT_ARCH_TARGET_CFLAGS in CT_LIBC_NEWLIB_NANO_TARGET_CFLAGS to
"-mthumb-interwork" (That mimics how CT_ARCH_TARGET_CFLAGS is set
because we enable CT_ARCH_ARM_INTERWORKING=y).

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
  • Loading branch information
galak committed Jul 30, 2021
1 parent 1bb31ea commit 10f1760
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions configs/arm.config
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ CT_NEWLIB_NANO_DEVEL_URL="https://github.com/zephyrproject-rtos/newlib-cygwin.gi
CT_NEWLIB_NANO_DEVEL_REVISION="4f5997d3c0f9011135e9627dad700c9d64be4a4b"
CT_NEWLIB_NANO_GCC_LIBSTDCXX=y
CT_NEWLIB_NANO_INSTALL_IN_TARGET=y
CT_LIBC_NEWLIB_NANO_TARGET_CFLAGS="-mthumb-interwork"
# CT_LIBC_NEWLIB_NANO_IO_C99FMT is not set
# CT_LIBC_NEWLIB_NANO_IO_LL is not set
CT_LIBC_NEWLIB_NANO_IO_FLOAT=y
Expand Down

0 comments on commit 10f1760

Please sign in to comment.