Message ID | cover.1675579641.git.keithp@keithp.com |
---|---|
Headers |
Return-Path: <gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 44B7238555B6 for <patchwork@sourceware.org>; Sun, 5 Feb 2023 07:11:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 44B7238555B6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1675581076; bh=rJ6gto6SfVY60n4jvDzTi82ui0ot4ChICpo7KJCO1KI=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=SCDD024ScmEbcQc+8rdkQ1rrhchEB0pKusNIAgb8CccFk1LAz2aZa18fart4JxWB5 3k9qJPiGUFCrXBkVsLbya24/f2enHfBiNgxCg+1gqEJUX43UbAk0dWq04wtVSfX/YA VVnPd3khFFHmBq+Wj9IS0VR9ivGJwaJcrXzOb+Xw= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from elaine.keithp.com (home.keithp.com [63.227.221.253]) by sourceware.org (Postfix) with ESMTPS id B5DD13858C52 for <gcc-patches@gcc.gnu.org>; Sun, 5 Feb 2023 07:10:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B5DD13858C52 Received: from localhost (localhost [127.0.0.1]) by elaine.keithp.com (Postfix) with ESMTP id D5D6C3F33F0B; Sat, 4 Feb 2023 23:10:45 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at keithp.com Received: from elaine.keithp.com ([127.0.0.1]) by localhost (elaine.keithp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id tdVETu6ruiTZ; Sat, 4 Feb 2023 23:10:43 -0800 (PST) Received: from keithp.com (koto.keithp.com [192.168.11.2]) by elaine.keithp.com (Postfix) with ESMTPSA id 05BBA3F33F0A; Sat, 4 Feb 2023 23:10:42 -0800 (PST) Received: by keithp.com (Postfix, from userid 1000) id 985B71E600C7; Sat, 4 Feb 2023 23:10:42 -0800 (PST) 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 Message-Id: <cover.1675579641.git.keithp@keithp.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20220903060707.1622470-1-keithp@keithp.com> References: <20220903060707.1622470-1-keithp@keithp.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> From: Keith Packard via Gcc-patches <gcc-patches@gcc.gnu.org> Reply-To: Keith Packard <keithp@keithp.com> Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org> |
Series |
picolibc: Add picolibc linking help (v3)
|
|
Message
Keith Packard
Feb. 5, 2023, 7:10 a.m. UTC
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