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 475F73858281 for ; Sat, 3 Sep 2022 06:07:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 475F73858281 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 E8BA23F32FE2; Fri, 2 Sep 2022 23:07:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=keithp.com; s=mail; t=1662185270; bh=ySTpUtXvA0mMQ8QZQ/gzVr+Ci/s5NMEGJq1BEqpeZBI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WR9SLX5X4iBwWpQRCSiWEG0Nxd8AGTdvk6j5kkg+zraRttzK+o4R/OWh5/Uw108u0 Aw8cVVuRiimD6o43DvImlrQfugaN/9hQQcLhaSXUj/cMDIPUdmAwoerpomdnlDPQ7/ W6ITAYccT+vN+j+3l8GZjzX2dFvw8Pi8XDQw5jMRuo5830vC9aUP8gTfB3yDPngmV3 m0QNwkVVJISmclbiNoH/ZgdjLMvsNeTZ4PoAYu6aRdlImGtUUDXB562ehM/y9zvyl/ +R+Pm1UH+I4fzEANiZJIv2xfW3NPCS8WCGMdwWm5yoIymtNWPyFEgaovImUsJSQqkh FbxUhqChyDjJQ== 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 YDsIHyOI2y_n; Fri, 2 Sep 2022 23:07:46 -0700 (PDT) Received: from keithp.com (unknown [204.134.242.194]) by elaine.keithp.com (Postfix) with ESMTPSA id 37D283F32FDE; Fri, 2 Sep 2022 23:07:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=keithp.com; s=mail; t=1662185266; bh=ySTpUtXvA0mMQ8QZQ/gzVr+Ci/s5NMEGJq1BEqpeZBI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SKq5qRtrIurThEFIj547hpTjLMFgOtD0tueiphHhl/2zwBYxANYg1WIhOukdFmMs7 Rdrjk3m2mXiqCzsdleTGxpAhcUKxsJgTtiApbcJS8p+AryjR42AmtvCAWsRIZyaPg+ /O9HbJnxRtEi6HQdkab3F92T8FnVpRHzHaqNYF7+mx4KhfvGoX5Hluhx9b98aRGQeU 4D1aB6yIsR54z9GRq6R8K4lvfc2ZF1Nvw35NvW9GLI+qodomXiEYJNDyAi7CGf4sF0 193LjpgF2u+HBoyDJ1R7t+CSIi/1GmbnR4xlw+ZY1Rd6FvIpRrI9kV36NQgo5LsRPj O0ny8IZxpGhXg== Received: by keithp.com (Postfix, from userid 1000) id BCB651E600C3; Fri, 2 Sep 2022 23:07:34 -0700 (PDT) From: Keith Packard To: gcc-patches@gcc.gnu.org Cc: Keith Packard , Richard Sandiford Subject: [PATCH 0/3] picolibc: Add picolibc linking help Date: Fri, 2 Sep 2022 23:07:04 -0700 Message-Id: <20220903060707.1622470-1-keithp@keithp.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220824180426.820576-1-keithp@keithp.com> References: <20220824180426.820576-1-keithp@keithp.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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, and then hooks that up for arm, nds32, riscv and sh targets. This is the second version of these patches which address several issues raised in review by Richard Sandiford. 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 | 65 +++++++++++++++++++++++++++++++++------ gcc/config/arm/elf.h | 5 +++ gcc/config/nds32/elf.h | 4 +++ gcc/config/picolibc.opt | 26 ++++++++++++++++ gcc/config/riscv/elf.h | 4 +++ gcc/config/sh/embed-elf.h | 5 +++ gcc/configure.ac | 4 +++ 7 files changed, 104 insertions(+), 9 deletions(-) create mode 100644 gcc/config/picolibc.opt -- 2.36.1