From patchwork Fri Oct 27 10:24:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 158888 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:d641:0:b0:403:3b70:6f57 with SMTP id cy1csp497224vqb; Fri, 27 Oct 2023 03:24:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHkSI4WXoQwWiFTIJ+EBdvQdnuXviq+fI1FJrf7OULDPMWWhe+LbiFo0InouY9ClktDWw8g X-Received: by 2002:a05:622a:1106:b0:41e:287d:f56a with SMTP id e6-20020a05622a110600b0041e287df56amr2913434qty.47.1698402292698; Fri, 27 Oct 2023 03:24:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1698402292; cv=pass; d=google.com; s=arc-20160816; b=s8nP5mY3v9k9VNUwfO0m/AKFYzmrupH4Gs3dq6vjmmbOXzSmOMZ63xqo5tP9FQsy3x 6c+WY3/vLYub1me9lHc3BJQtVcJSCG/R4QgmUj1OWZIdSWz/0JzFIrdyOwN4zzwV89ND 1Jp7JYVxbFQ4370MO8p3ltw/VIQT6/FUDbdsHAKQdwOuUqrn92zMhXPcWOA2VkKx8hHD rAUE/q7dFE3Zc11VcCLGEly4aZIZ6T84c+XWw0CDjrXP/eG7QbnXW+SGR148D6sHgvPa ChtWqiKqG7Uf/xH3jN+NC6Snyki82hsGDUmq02IglfDpAExjUG/mGIKX2fDTGtk4U0U5 YWxg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mime-version:message-id:date :user-agent:references:in-reply-to:subject:cc:to:from:ironport-sdr :arc-filter:dmarc-filter:delivered-to; bh=Zy+aMgyJfnO/jA0e+5BTEi/PQUbTCyjoXvgwgR4IPAY=; fh=0H8kHJx/HZGq2kzV4nntZngwhPI2WaFpbSWWPpynufQ=; b=hcljYWg0zK4v8m8jYW3jzwCHbnysoofd3O4L7tRJcjTgBkP7qDPZXRrE8r0za/ybj8 fviqB4qdIiMxO39R5i1PrBmCEagQU3NUBAYRhcabBJ7xiaB073NlkOGEAYwGhWpBp37I OR2OrT1j+w7g7kc0SpiqV33bUCE8NbDBL+/WgLjFq2dXPylyQommkuabAG6LuQl/LT+6 ll5y575k+scrVraKE9b3TIHETXfF40MgXnbZMoKnicKVQgH9frd0a5bZWk8GMw3Ar45/ FVR/FNG0yT1fkz59yvIGLHoAb3FQRdKTIC6BuaLqfC4XHZPq7xopiXl7IE1uxj9+mQmM GJUA== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id d17-20020ac85ad1000000b00418051c660esi562724qtd.625.2023.10.27.03.24.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Oct 2023 03:24:52 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 786463858D3C for ; Fri, 27 Oct 2023 10:24:52 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from esa1.mentor.iphmx.com (esa1.mentor.iphmx.com [68.232.129.153]) by sourceware.org (Postfix) with ESMTPS id C3C733858D35; Fri, 27 Oct 2023 10:24:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C3C733858D35 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C3C733858D35 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=68.232.129.153 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698402267; cv=none; b=TJ7TF445WQjZK9VYGeB12Tbc8XEI/40XTmOJcmbq8oMQ3lPaj+vWlv7blTbmQZukWFh23dcZEch68zksKICEvqelERBcejUMTusiJGxJ3FAa/tKs+z5hSMNR+/0xcs4b/bHlEHwkUd1xUm9iPYbhDTO6QZWBrJcNUhY7tJ7Rr0o= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698402267; c=relaxed/simple; bh=BxiYd5iopi5BlgRYYIqvgdEvPoylzU41PH62pq5HEBQ=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=Fi0m3eqZOLS6V6QnX/KYEVqdFh2AHhnc1E/MDisBy5tnU0ReEJ7hHAyuY2sgdJZ8faihnhtJXT/nkvq5LlZhBDEaZgss32eyZVM0d3e4Y1gkvX+bJCVaL/b6P8zyTTsiZGvHiIHcBHT9jF1JXYm032HrQK+HFzdWLYUhcQHx/8M= ARC-Authentication-Results: i=1; server2.sourceware.org X-CSE-ConnectionGUID: ajF9sQ+KSG2FKuDm1JZLgQ== X-CSE-MsgGUID: o7q+fCM0QbyvQIPw+jYiPQ== X-IronPort-AV: E=Sophos;i="6.03,255,1694764800"; d="scan'208,223";a="23737890" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa1.mentor.iphmx.com with ESMTP; 27 Oct 2023 02:24:24 -0800 IronPort-SDR: nOnjZukZHO6SCuDrqxQJ1l3t9Q7lS1zb8NUTsmjGriLrseiX7ENFaBJRLjYmsPc0H7cYCwKw8X 7ljoE5EFYRxhPgfh6qSgOSsTElIS1Mu2FOGQI5px2eiqAYMVGsuaJOBzYtbgcAGOLlvawIE52k b8U4FVXs0rKShfxRtiXReQ70iu/foSTqXfIzyhjIsaxhevnwnEWh1ue/4AG03+DeAhnJJbvGu1 F4QUYxp1rqrlEw3Yv/VKRo3vZ+EjvnOnwQj1YF5yTcO6PV5qb1IfqnsGOZaqbmvhrg0ESzqbxj cuU= From: Thomas Schwinge To: Arthur Cohen , Pierre-Emmanuel Patry , , CC: Richard Biener Subject: Only build host libgrust if the Rust language is enabled (was: [PATCH v2 3/4] build: Add libgrust as compilation modules) In-Reply-To: <87sf5y1iuf.fsf@euler.schwinge.homeip.net> References: <20231025110658.1232737-1-arthur.cohen@embecosm.com> <20231025110658.1232737-5-arthur.cohen@embecosm.com> <87sf5y1iuf.fsf@euler.schwinge.homeip.net> User-Agent: Notmuch/0.29.3+94~g74c3f1b (https://notmuchmail.org) Emacs/28.2 (x86_64-pc-linux-gnu) Date: Fri, 27 Oct 2023 12:24:15 +0200 Message-ID: <87cyx01hyo.fsf@euler.schwinge.homeip.net> MIME-Version: 1.0 X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-14.mgc.mentorg.com (139.181.222.14) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780903882140733433 X-GMAIL-MSGID: 1780903882140733433 Hi! On 2023-10-25T23:40:40+0200, I wrote: > On 2023-10-25T13:06:48+0200, Arthur Cohen wrote: >> From: Pierre-Emmanuel Patry >> >> Define the libgrust directory as a host compilation module as well as >> for targets. > > I don't see a response to Richard's comments: > . > Re "doesn't build libgrust if [Rust is not enabled]", I suppose (but have > not checked) this works for the *target* libgrust module via > 'gcc/rust/config-lang.in:target_libs' requesting 'target-libgrust' only > if the Rust language is enabled? That aspect appears to work: testing a GCC configuration without the Rust language enabled, target libgrust doesn't get built, but... > I don't know what enables/disables the > *host* libgrust build? ... indeed, host libgrust still does get built. The attached "Only build host libgrust if the Rust language is enabled" ought to address this. Grüße Thomas ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955 From 403e6bf5349f8a22e4dc7b74ea80acb55e4f5133 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Fri, 27 Oct 2023 11:59:19 +0200 Subject: [PATCH] Only build host libgrust if the Rust language is enabled gcc/ * rust/config-lang.in (lang_dirs): Set to 'libgrust'. --- gcc/rust/config-lang.in | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/rust/config-lang.in b/gcc/rust/config-lang.in index 8f071dcb0bf0..aee6f0eb468f 100644 --- a/gcc/rust/config-lang.in +++ b/gcc/rust/config-lang.in @@ -30,5 +30,6 @@ compilers="rust1\$(exeext)" build_by_default="no" target_libs="target-libffi target-libbacktrace target-libgrust" +lang_dirs=libgrust gtfiles="\$(srcdir)/rust/rust-lang.cc" -- 2.40.1