From: Keith Packard <keithp@keithp.com>
To: gcc-patches@gcc.gnu.org
Cc: Keith Packard <keithp@keithp.com>,
Richard Sandiford <richard.sandiford@arm.com>
Subject: [PATCH 2/3] Add newlib and picolibc as default C library choices
Date: Fri, 2 Sep 2022 23:07:06 -0700 [thread overview]
Message-ID: <20220903060707.1622470-3-keithp@keithp.com> (raw)
In-Reply-To: <20220903060707.1622470-1-keithp@keithp.com>
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(-)
diff --git a/gcc/config.gcc b/gcc/config.gcc
index bf838b1545d..6f8f13a811a 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -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
--
2.36.1
next prev parent reply other threads:[~2022-09-03 6:07 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-24 18:04 [PATCH 0/3] picolibc: Add picolibc linking help Keith Packard
2022-08-24 18:04 ` [PATCH 1/3] picolibc: Allow default libc to be specified to configure Keith Packard
2022-08-24 18:04 ` [PATCH 2/3] picolibc: Add newlib and picolibc as default C library choices Keith Packard
2022-08-24 18:04 ` [PATCH 3/3] picolibc: Add '--oslib=' option when default C library is picolibc Keith Packard
2022-08-24 18:24 ` [PATCH 0/3] picolibc: Add picolibc linking help Andrew Pinski
2022-08-24 19:32 ` Keith Packard
2022-08-25 7:16 ` Kito Cheng
2022-08-25 17:38 ` Keith Packard
2022-09-02 12:36 ` Richard Sandiford
2022-09-03 6:02 ` Keith Packard
2022-09-03 6:07 ` Keith Packard
2022-09-03 6:07 ` [PATCH 1/3] Allow default libc to be specified to configure Keith Packard
2022-09-03 6:07 ` Keith Packard [this message]
2022-09-03 6:07 ` [PATCH 3/3] Add '--oslib=' option when default C library is picolibc Keith Packard
2022-11-21 7:11 ` Sebastian Huber
2023-02-05 7:10 ` [PATCH 0/3] picolibc: Add picolibc linking help (v3) Keith Packard
2023-02-05 7:10 ` [PATCH 1/3] Allow default libc to be specified to configure Keith Packard
2023-02-05 7:10 ` [PATCH 2/3] Add newlib and picolibc as default C library choices Keith Packard
2023-02-05 7:10 ` [PATCH 3/3] Add '--oslib=' option when default C library is picolibc Keith Packard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220903060707.1622470-3-keithp@keithp.com \
--to=keithp@keithp.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=richard.sandiford@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).