public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Keith Packard <keithp@keithp.com>
To: gcc-patches@gcc.gnu.org
Cc: Keith Packard <keithp@keithp.com>,
	Andrew Pinski <pinskia@gmail.com>,
	Kito Cheng <kito.cheng@gmail.com>,
	Richard Sandiford <richard.sandiford@arm.com>,
	Sebastian Huber <sebastian.huber@embedded-brains.de>
Subject: [PATCH 0/3] picolibc: Add picolibc linking help (v3)
Date: Sat,  4 Feb 2023 23:10:33 -0800	[thread overview]
Message-ID: <cover.1675579641.git.keithp@keithp.com> (raw)
In-Reply-To: <20220903060707.1622470-1-keithp@keithp.com>

Picolibc is a C library for embedded systems based on code from newlib
and avr libc. To connect some system-dependent picolibc functions
(like stdio) to an underlying platform, the platform may provide an OS
library.

This OS library must follow the C library in the link command line. In
current picolibc, that is done by providing an alternate .specs file
which can rewrite the *lib spec to insert the OS library in the right
spot.

This patch series adds the ability to specify the OS library on the
gcc command line when GCC is configured to us picolibc as the default
C library.

The second version of this series includes the following updates:

 1. Add a check for unrecognized C library passed to the
    --with-default-libc to catch errors. Suggested by Richard Sandiford.

The third version of this series includes the following updates:

 1. Replace the various target-specific hacks with a new file,
    gcc/config/picolibc.h which adjusts the LIB_SPEC, STARTFILE_SPEC
    and ENDFILE_SPEC values. Suggested by Sebastian Huber.

Keith Packard (3):
  Allow default libc to be specified to configure
  Add newlib and picolibc as default C library choices
  Add '--oslib=' option when default C library is picolibc

 gcc/config.gcc          | 66 +++++++++++++++++++++++++++++++++++------
 gcc/config/picolibc.h   | 32 ++++++++++++++++++++
 gcc/config/picolibc.opt | 26 ++++++++++++++++
 gcc/configure.ac        |  4 +++
 4 files changed, 119 insertions(+), 9 deletions(-)
 create mode 100644 gcc/config/picolibc.h
 create mode 100644 gcc/config/picolibc.opt

-- 
2.39.0


  parent reply	other threads:[~2023-02-05  7:10 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   ` [PATCH 2/3] Add newlib and picolibc as default C library choices Keith Packard
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   ` Keith Packard [this message]
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=cover.1675579641.git.keithp@keithp.com \
    --to=keithp@keithp.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=kito.cheng@gmail.com \
    --cc=pinskia@gmail.com \
    --cc=richard.sandiford@arm.com \
    --cc=sebastian.huber@embedded-brains.de \
    /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).