@@ -642,7 +642,7 @@ case ${target} in
esac
# Common C libraries.
-tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 LIBC_MUSL=4"
+tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 LIBC_MUSL=4 LIBC_NEWLIB=5 LIBC_PICOLIBC=6"
default_libc=""
@@ -5789,6 +5789,17 @@ bionic)
musl)
default_libc=LIBC_MUSL
;;
+newlib)
+
+ # Newlib configurations don't set the DEFAULT_LIBC variable, so
+ # avoid changing those allowing --with-default-libc=newlib but
+ # don't actually set the DEFAULT_LIBC variable.
+
+ default_libc=
+ ;;
+picolibc)
+ default_libc=LIBC_PICOLIBC
+ ;;
*)
echo "Unknown libc in --with-default-libc=$with_default_libc" 1>&2
exit 1
Don't set the DEFAULT_LIBC variable for newlib configurations as that is how it currently works for systems using newlib as the default. Signed-off-by: Keith Packard <keithp@keithp.com> --- gcc/config.gcc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)