Disable implicit-function-declaration error for newlib

GCC14 will treat implicit-function-declaration as an error by default.
See https://gcc.gnu.org/gcc-14/porting_to.html for details.

Some libc function like __trap34 are defined in assembly and break this GCC diagnostic.

Signed-off-by: Nik Konyuchenko <spaun2002mobile@gmail.com>
This commit is contained in:
Nik Konyuchenko 2024-05-17 00:11:50 -07:00 committed by Chris Packham
parent d97a1ecdf0
commit c5a17024a9

View File

@ -89,6 +89,9 @@ ENABLE_TARGET_OPTSPACE:target-optspace
[ "${CT_LIBC_NEWLIB_LTO}" = "y" ] && \
CT_LIBC_NEWLIB_TARGET_CFLAGS="${CT_LIBC_NEWLIB_TARGET_CFLAGS} -flto"
[ "${CT_GCC_14_or_later}" = "y" ] && \
CT_LIBC_NEWLIB_TARGET_CFLAGS="${CT_LIBC_NEWLIB_TARGET_CFLAGS} -Wno-error=implicit-function-declaration -Wno-implicit-int"
cflags_for_target="${CT_ALL_TARGET_CFLAGS} ${CT_LIBC_NEWLIB_TARGET_CFLAGS}"
# Note: newlib handles the build/host/target a little bit differently