gcc: Add --disable-wchar_t and --enable-stdio=pure for picolibc

Picolibc needs two additional gcc build options so that libstdc++
works correctly. When building picolibc as a companion library, those
are added in do_cc_libstdcxx_picolibc, but when built with picolibc as
the main C libary, those need to be added in the main GCC build.

Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
Keith Packard 2023-02-12 23:20:44 -08:00 committed by Chris Packham
parent 90cbc880af
commit 9e13e83068

View File

@ -392,6 +392,12 @@ do_gcc_core_backend() {
extra_config+=(--disable-libstdcxx) extra_config+=(--disable-libstdcxx)
fi fi
if [ "${CT_LIBC_PICOLIBC}" = "y" ]; then
extra_config+=("--with-default-libc=picolibc")
extra_config+=("--enable-stdio=pure")
extra_config+=("--disable-wchar_t")
fi
core_LDFLAGS+=("${ldflags}") core_LDFLAGS+=("${ldflags}")
# *** WARNING ! *** # *** WARNING ! ***
@ -1043,6 +1049,12 @@ do_gcc_backend() {
extra_config+=(--disable-libstdcxx) extra_config+=(--disable-libstdcxx)
fi fi
if [ "${CT_LIBC_PICOLIBC}" = "y" ]; then
extra_config+=("--with-default-libc=picolibc")
extra_config+=("--enable-stdio=pure")
extra_config+=("--disable-wchar_t")
fi
final_LDFLAGS+=("${ldflags}") final_LDFLAGS+=("${ldflags}")
# *** WARNING ! *** # *** WARNING ! ***