From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by sourceware.org (Postfix) with ESMTPS id 7C8EA38300A3; Wed, 24 Aug 2022 18:24:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7C8EA38300A3 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-x633.google.com with SMTP id 20so16370129plo.10; Wed, 24 Aug 2022 11:24:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=my5TV+PTyjSCQ0ltyrz2QClU3ZMDhMDHgWg+hzyaI68=; b=P5VemCeGYBQZkCvNG8mGZLe/+pLX0eONYey4KGSvGTXonQHZaXGjcb9VIyyDz0C9MX 6o7bnn8GL33gCS071toL5sT5pmSNuLFvCxckA3AXhBfYKXlw1jQ4afZ66jQP3lqOZmSj sN6AXE6JunatwUw8G9ClVLuJFqaP6knOaN+BHC6j4UqimYvLKEoM/xnhTbNASVudlSic r3rSioyaK8Ieg1f2bH44avAxBgTi7divKsei2up+szyIcF147ux1yC9FGkdAZk/RRois U8y0rVHgOx3+6Xe2kAJ7L34XoA1kDcSNS8DQRJgCQgw4f7I0udKHeTZs/xAurGB6a+dQ 6uPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=my5TV+PTyjSCQ0ltyrz2QClU3ZMDhMDHgWg+hzyaI68=; b=Bbzyzr5dSa8f8BmCoa+giM1jucaJNfYCD/zt+4fcHLMHaqHDjly+2XVodOIskPVN+A 0YN5L56eiNWebr+7jtEwUDJRz9J0Geck+cAJiyfiPBiKEozKOi0A33ZGcFNL6cVHU3X5 6hVItuibqkcEBzC7lCZ1AXMxnmB1NRZ9Yc229FYDDMo5iIC8QHBJ50tM+fjtvvpoLCO0 ffUrNXeVeIIixFjnhBSnlwCo/ZuyoCINizHM9i2NXcfEdYwXXFaxP6MB52nPBlEE6ssd 1N/igTHnKUetG2lzIThNMMEAHHuah9eo6Sudh57sMhDa0IjNgZB8zIXDTbeAxoRxS300 sMNw== X-Gm-Message-State: ACgBeo3vevmEDWJFGgW3EP/SX8K+Ogjw8edPGFtTpZ4GKsIzblMwCkmX xgg5F4mF5liVW7heJEKnMBbAOVOrKW5D6xir2F4= X-Google-Smtp-Source: AA6agR6xcIHhtIJyQpLEwpqi4lYwSSGiRSj2l+ho2+spCV2dCxxr2Q80UK9l4o+qvOXLJXGsIsHmLc7l9v6973Hre8Y= X-Received: by 2002:a17:90b:3684:b0:1fa:f48e:abd0 with SMTP id mj4-20020a17090b368400b001faf48eabd0mr410988pjb.180.1661365466413; Wed, 24 Aug 2022 11:24:26 -0700 (PDT) MIME-Version: 1.0 References: <20220824180426.820576-1-keithp@keithp.com> In-Reply-To: <20220824180426.820576-1-keithp@keithp.com> From: Andrew Pinski Date: Wed, 24 Aug 2022 11:24:12 -0700 Message-ID: Subject: Re: [PATCH 0/3] picolibc: Add picolibc linking help To: Keith Packard Cc: gcc@gcc.gnu.org, gcc-patches@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,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: On Wed, Aug 24, 2022 at 11:12 AM Keith Packard via Gcc-patches wrote: > > 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. Why do you need to change the specs to support picolibc? Why not have the library supply the specs file instead, like what is done for newlib and libgloss? > > 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. What OS libraries are not included in libc? I trying to figure out why this needs to be special cased here. Thanks, Andrew Pinski > > 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 | 56 ++++++++++++++++++++++++++++++++------- > 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, 95 insertions(+), 9 deletions(-) > create mode 100644 gcc/config/picolibc.opt > > -- > 2.36.1 >