From c5a17024a9af713a218d533fe78b7cf9a02ec67e Mon Sep 17 00:00:00 2001 From: Nik Konyuchenko Date: Fri, 17 May 2024 00:11:50 -0700 Subject: 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 --- scripts/build/libc/newlib.sh | 3 +++ 1 file changed, 3 insertions(+) (limited to 'scripts') diff --git a/scripts/build/libc/newlib.sh b/scripts/build/libc/newlib.sh index 72111a93..21d13773 100644 --- a/scripts/build/libc/newlib.sh +++ b/scripts/build/libc/newlib.sh @@ -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 -- cgit v1.2.3