From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from elaine.keithp.com (home.keithp.com [63.227.221.253]) by sourceware.org (Postfix) with ESMTPS id B5DD13858C52 for ; Sun, 5 Feb 2023 07:10:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B5DD13858C52 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=keithp.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=keithp.com 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) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=keithp.com; s=mail; t=1675581045; bh=lPLr5aMlIgq5nyHPh0AvV3VlVCtip1TrxyQUJNbj2Ys=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BIolbcmGwNJGQYUfcLiNa8LUkQQ3WfhfvNnrJAcm2W5NKn2GYF0Wi9HCxQfCltm21 LMPaXiegLI+puyfJFkHeZi/ZPjF3mHeBrXvkdJvpi+SbaHOv9GTu+3A7vVR8EGZ920 KAt8m8lc7aXOf3GR0zo2zewXFv9psLmcITK7QXizqOAXKZ5jj64jcidc1FFVipTUMD 7tu7X5ofYtBN7m560/8nwEETGN+Xw8v2wsnu7nLXFRppv9KpedkQxxOicJuw6w0d+p T4qbhsZiGnlTH3ntWihg9qhihiIeoBLWYrBq1FCiz9P+OYESPIcKI7eR5ydHGoyLnY 4r8MYuBr+4fwA== 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) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=keithp.com; s=mail; t=1675581043; bh=lPLr5aMlIgq5nyHPh0AvV3VlVCtip1TrxyQUJNbj2Ys=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RZ5RktbjlBysW8mjmZ+di+bg0dwKBzfmXxECKCTgwtN686twSuDCA7fQIAmtHI1Gl nWuPcpvUN5/m3cNOkGmZ2mZ8CoR5r2yCU6zhmeBjCY6tpBCJMb7xZCQSrSPsD4zA9d T4lnrhUJeOmOYdpXJLwYNwsGdl9EFtn16Q/GT1E1yvizLrtETvNseNVfwx7AKsQHFO 5UtvmMcIiyfLgznMcVIp9splvav9pAiOgMV/z/5oU6x2RAE6Wp4KIFSMRkO+8PMqnd FBoeZ0EpCzNyiuFu61Zeq0D3e7BU4/mbTMEaL9+MFudptGI5rZ5lp0zesm1BNKcXiA 8P9BQ7Xqqat/g== Received: by keithp.com (Postfix, from userid 1000) id 985B71E600C7; Sat, 4 Feb 2023 23:10:42 -0800 (PST) From: Keith Packard To: gcc-patches@gcc.gnu.org Cc: Keith Packard , Andrew Pinski , Kito Cheng , Richard Sandiford , Sebastian Huber Subject: [PATCH 0/3] picolibc: Add picolibc linking help (v3) Date: Sat, 4 Feb 2023 23:10:33 -0800 Message-Id: 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 List-Id: 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