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: 64316 Return-Path: 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 84034385840F for ; Sun, 5 Feb 2023 07:11:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 84034385840F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1675581075; 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=PxFOe2sIUUjAHis3DHCXdk1xynYrynBjrZAtQQIyiVXJYFIFNZBf26bN0R1en6ItH xflqs+WaeZqU0ekbYEDbuuXfR85MsVmMW4Ih24EKslKHQ1auSUF8+TSl+52bhlsyEu iA17tRGlJgCNekEdKBANLhlYje13kYIO23BW3n1U= 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+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" 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 + ;; "") ;; *)