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 4736F3858418 for ; Sat, 3 Sep 2022 06:07:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4736F3858418 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 5C1973F32F78; Fri, 2 Sep 2022 23:07:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=keithp.com; s=mail; t=1662185271; bh=N8+sOdm9eD680c9Sfs3GmFLDzStqJUaOoCWWWOEg1W4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kF3muAOaZiyOp+kZmgqx2hwt3asMgDxNfgESF1Cgm8AdHR0Ng7re70gYX3bfWwQpK wmrMJRitVifGy3m0yeiPY6W3rYnBOGASSFW703F6AC2CaNe/jbgR+eOungu7aVeX8p Xvy3n38YoQzYZyNHlrjQ8ZRbdvUqaDXJn8P47onwjmV8VabdtB/mVa/S5HZYfceqH2 Pw12Qdp3ePkvq4X2X7KdnXQpP1ugM3KW9ebZ1mhKiTBZ1WKmxcrOGUZPB6F14wUvHH a+uPqHD4KtLuCnVmn9Lq1W9s4Fwawuj9xK+9aDRb4n2U0tqDTdh3jBxlCnbkEO5lyI QHLEdkPECXiSg== 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 jE8aVAFJlmZz; Fri, 2 Sep 2022 23:07:51 -0700 (PDT) Received: from keithp.com (unknown [204.134.242.194]) by elaine.keithp.com (Postfix) with ESMTPSA id 32D8B3F32FC4; 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=N8+sOdm9eD680c9Sfs3GmFLDzStqJUaOoCWWWOEg1W4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=c+G9Zqr8BkSVvWW+v5RYISFSWGc/uu+TIQ/2+mlI5Ie04xSYo3k+0JcFfgDc8tFIt AZHyzAwDnFbb2chvNkDe5QakiY3A65VQSiDa2omBTjQEEpT5q8evNoGtZzclZKNiJY SZshMZrr4I0wP/55LskbqoI5SZz2Sz2NL5/QYk/ffOmDt1crqdLt4Kw+7b8DUgZx9v m8CHDVQD/F5S7jn0hCPq4aH8AxYiVvamHh2k7J3N/owwUcUf6Q3kK1a9HYeaxGDFqM NyWGUaY7Y/2B9u3MI95yMMzVdRMbBZ2csdTjDl4quo4DHKv8d4jyKoADRzo/cMRol1 sD2kUPOWuTE8A== Received: by keithp.com (Postfix, from userid 1000) id C2E3A1E600C9; 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 2/3] Add newlib and picolibc as default C library choices Date: Fri, 2 Sep 2022 23:07:06 -0700 Message-Id: <20220903060707.1622470-3-keithp@keithp.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220903060707.1622470-1-keithp@keithp.com> References: <20220824180426.820576-1-keithp@keithp.com> <20220903060707.1622470-1-keithp@keithp.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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,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: Don't set the DEFAULT_LIBC variable for newlib configurations as that is how it currently works for systems using newlib as the default. Signed-off-by: Keith Packard --- gcc/config.gcc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/gcc/config.gcc b/gcc/config.gcc index bf838b1545d..6f8f13a811a 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -642,7 +642,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="" @@ -5789,6 +5789,17 @@ bionic) musl) default_libc=LIBC_MUSL ;; +newlib) + + # Newlib configurations don't set the DEFAULT_LIBC variable, so + # avoid changing those allowing --with-default-libc=newlib but + # don't actually set the DEFAULT_LIBC variable. + + default_libc= + ;; +picolibc) + default_libc=LIBC_PICOLIBC + ;; *) echo "Unknown libc in --with-default-libc=$with_default_libc" 1>&2 exit 1 -- 2.36.1