From patchwork Sun Feb 5 07:10:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Keith Packard X-Patchwork-Id: 52870 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1668246wrn; Sat, 4 Feb 2023 23:11:41 -0800 (PST) X-Google-Smtp-Source: AK7set+2QnwLovNkkb+0su24SxFou4c9bgqpO3d046lDBNmnrIf2Sw4uT+Oq3rOyvXLCFHCO4fbw X-Received: by 2002:a50:8e50:0:b0:4a2:3636:141d with SMTP id 16-20020a508e50000000b004a23636141dmr17006839edx.29.1675581101806; Sat, 04 Feb 2023 23:11:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675581101; cv=none; d=google.com; s=arc-20160816; b=EUMLarPcLaGJYQmd7RJ2dyu6UQfPR8FGkWq9KRcV5Q/+uM7qfiUovC3NK+bYpPRSxV q94raf51awMoF5l44CD5U6bxWGy9DTv0by6dbMptsBceLKPSAc7jo+OijZLb7eUJxiwB 0j5tNW9KhHKP/Qbzg822KMskllIM4/m3lCYnwIB+JZOSNLpMYZFVGg7GE2eNiN67J+Zx qhsyKxYy6qhuk8NfYQ51Wt91H0jw6dlQJXvhEfRHlWsY7szo1MYA0pwDRZLJDRt0KwK/ cbU+UsvLN1TwvmoV5obMKBFNeqGxif/5+Xm7qqpY+kKGfdwiCu0fg3dR5ctEaQNLMepg 2jVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=f/k/Ov/w8X3RoClet5DZ/WD4HZwXvfoQgXvSwlgvU9s=; b=RUlNMK6pMszoW+1T4QM8s+5a9SHNdXW/w8c1NxR2C7WqU/foNMXfNg3fKzdkm+Y76g c0+/dZ4TXZxBVO4TQMpbASO+5tjeOg8n3Z5cZ+qyoKqU7zHqOXHOsJrb0eti1tN7YahX r8u6jEjjOcjPhnP/QB82i+VNvTDHT54fALIq8tPFvUx6FA6vPoiBrnmsCOgkFwRGGy78 omP9+dTEbLTwVCtqF/acwH1T2BA09iZyqnYW3CawSHCU1EDSuxy/57LTGBEd9Xp1o3SP WgkqlAgjvUjO46lOvQ/W7ExOZZW90vVKSp3Lz/mRgT191tsv1V2sHFgrlMZUMjYNwT6l ECFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=b6YG5uMz; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id c10-20020aa7d60a000000b004aaa8293201si1413412edr.355.2023.02.04.23.11.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Feb 2023 23:11:41 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=b6YG5uMz; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2ABEE385B536 for ; Sun, 5 Feb 2023 07:11:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2ABEE385B536 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1675581090; bh=f/k/Ov/w8X3RoClet5DZ/WD4HZwXvfoQgXvSwlgvU9s=; 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=b6YG5uMzO6hPcwR6loMF3Q/wTYZXz6wSg4sujlvAR6V4d8YtJG8P5r6OeltxRGYgU Xmbuu73PS1LwOM2dK3SrglnmnXlKz1QZxjyULPKwosx8CliwZJHIAdwfpGOtS04M/N v1KbxqFYmtj4F3jW48s6VtCb+BlmmeF0Y0BRLjdg= 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 ED8663858D28 for ; Sun, 5 Feb 2023 07:10:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org ED8663858D28 Received: from localhost (localhost [127.0.0.1]) by elaine.keithp.com (Postfix) with ESMTP id 7C2BE3F33F0C; Sat, 4 Feb 2023 23:10:43 -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 2CZbTYxftdt3; 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 F39B83F33F09; Sat, 4 Feb 2023 23:10:42 -0800 (PST) Received: by keithp.com (Postfix, from userid 1000) id A2A771E600C9; Sat, 4 Feb 2023 23:10:42 -0800 (PST) To: gcc-patches@gcc.gnu.org Cc: Keith Packard , Andrew Pinski , Kito Cheng , Richard Sandiford , Sebastian Huber Subject: [PATCH 2/3] Add newlib and picolibc as default C library choices Date: Sat, 4 Feb 2023 23:10:35 -0800 Message-Id: <7fa04bf66973de28961edeef470266caeaa348fc.1675579641.git.keithp@keithp.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: References: <20220903060707.1622470-1-keithp@keithp.com> MIME-Version: 1.0 X-Spam-Status: No, score=-10.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Keith Packard via Gcc-patches From: Keith Packard Reply-To: Keith Packard Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1742927633521251042?= X-GMAIL-MSGID: =?utf-8?q?1756974129199302492?= Signed-off-by: Keith Packard --- gcc/config.gcc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/gcc/config.gcc b/gcc/config.gcc index 0679a76bebb..84bca8df615 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -661,7 +661,7 @@ case ${target} in esac # Common C libraries. -tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 LIBC_MUSL=4" +tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 LIBC_MUSL=4 LIBC_NEWLIB=5 LIBC_PICOLIBC=6" default_libc="" @@ -5879,6 +5879,15 @@ bionic) musl) default_libc=LIBC_MUSL ;; +newlib) + # Newlib configurations don't set the DEFAULT_LIBC variable, so + # avoid changing those by allowing --with-default-libc=newlib but + # not actually setting the DEFAULT_LIBC variable. + default_libc= + ;; +picolibc) + default_libc=LIBC_PICOLIBC + ;; "") ;; *)