From patchwork Fri Feb 17 23:11:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 58800 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp114524wrn; Fri, 17 Feb 2023 15:12:18 -0800 (PST) X-Google-Smtp-Source: AK7set8xVQG+JugaCyV7kaoYmRPUdyTEV+L0KIGK7Aizch71OXoXG0lXEdN9GhqPbTm3nN8UzdoA X-Received: by 2002:a17:907:9715:b0:7c1:458b:a947 with SMTP id jg21-20020a170907971500b007c1458ba947mr3077135ejc.26.1676675538058; Fri, 17 Feb 2023 15:12:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676675538; cv=none; d=google.com; s=arc-20160816; b=vVLRBsYYhEEETq4MLt4sFHSqMIIlQ179ATT1p9ClDYTGGLchaJb1FkbcJhAu88/p7s C/no/KbyW1PGI3/UAuMOeqMOJ71EUb6QNuxBTpmimEqDnMAaHuoWeFTQDCmXhccoLUfu sg/ZQaFr2x8nCYAFp8V+MnfnEUexNxGEkwQ6SYF3/HXAwB4xmMppHA007lzARUwf2JJJ uzEClhgXI5T1ydNy2M4mU83LYw24AJkFTGZ0XfVh5bm5Ln/y5TsPDPBai+oXPK8VAJYb pIYUwiVBjqvGxVQZz3QHC3eus0sMennyIqmye/eC9CqZxB8uIJTGzZOpkx57429+7RXM zP3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender: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 :dmarc-filter:delivered-to; bh=A9eFbgeMcfiubXLBd0tTeup7sRdIfpWAj+7h6JjNN9c=; b=J0dAjPfWhoS/xHMQxYYXxNMXo1IF8MZ002lh83HR2idzxn2ZnBbXshKK8CE11yWj9s 1L3yV6LE1ZMimrHsw0+OTA6mFOLuMKYU5miRiXQIXIMbT87fXjP5Wm9NXQuKdiRqIe3N /wbzNThhvtQM/XXBYueLVps71/n4XmZLYvk1nfgc+KzRrxFweKVpOKlCuY0+HTyxzWHZ ZWt4dnGt5yG5VfY7Md7WBYiUt+mny4eRnwPLgD+cWuLKmK58IA1HH/KdG2gIhSwihUgV 6zho+fASbyjOhANnBeOsHlZv20tgIbhHB758x5z/IdG/pSXzmBa+6HucdXr9EickpsGG T4Vw== ARC-Authentication-Results: i=1; mx.google.com; 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" Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id c23-20020a17090620d700b008b177104a57si5424504ejc.344.2023.02.17.15.12.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Feb 2023 15:12:18 -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; 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" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3A48C38493D0 for ; Fri, 17 Feb 2023 23:12:15 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com [68.232.137.252]) by sourceware.org (Postfix) with ESMTPS id 34FCD385842D; Fri, 17 Feb 2023 23:11:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 34FCD385842D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="5.97,306,1669104000"; d="scan'208,223";a="97396877" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa4.mentor.iphmx.com with ESMTP; 17 Feb 2023 15:11:40 -0800 IronPort-SDR: z3k6iVzqB3FZGSu7fLbs4r5dOGOmeLkkGscP1xYSfrjD8MRkiBVTVEv56tRtdvZsAQoEo9ovw4 oLHhGNfP2Nlmx2hjf1Y69r8uSFzIIMi1K/WxTG/ZFedAjX/YH4mtCfXAYmkEWFoBVwbZpjC7cE eNv4yKOnQTghiXuy7XAsJRjownBIRD7z3cqcJuR2gqaGl8NL7gwVMLm9c8qfISt6LDUnKka+Vv eB9qaMHE5M/7dL7BSRw04woJBvB/r91TZo/o+gwxE44t8hOUdhOPMFXz/R6i0+CHjIwUbv689N 7wQ= From: Thomas Schwinge To: , CC: Faisal Abbas <90.abbasfaisal@gmail.com>, Arthur Cohen , Jan-Benedict Glaw Subject: '#include "tm_p.h"' in 'gcc/rust/backend/rust-tree.cc' (was: [gcc r13-5533] gccrs: const folding port) In-Reply-To: <20230131131410.BC6503858426@sourceware.org> References: <20230131131410.BC6503858426@sourceware.org> User-Agent: Notmuch/0.29.3+94~g74c3f1b (https://notmuchmail.org) Emacs/28.2 (x86_64-pc-linux-gnu) Date: Sat, 18 Feb 2023 00:11:30 +0100 Message-ID: <87lekv3n19.fsf@euler.schwinge.homeip.net> MIME-Version: 1.0 X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-13.mgc.mentorg.com (139.181.222.13) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-11.9 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.29 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 Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758121729003766404?= X-GMAIL-MSGID: =?utf-8?q?1758121729003766404?= Hi! On 2023-01-31T13:14:10+0000, Arthur Cohen via Gcc-cvs wrote: > commit r13-5533-ge66fec8e6ba35edf01f86c2bf6514109aba4ded2 > Author: Faisal Abbas <90.abbasfaisal@gmail.com> > Date: Mon Jun 27 16:05:49 2022 +0100 > > gccrs: const folding port > --- a/gcc/rust/backend/rust-tree.cc > +++ b/gcc/rust/backend/rust-tree.cc > @@ -21,12 +21,37 @@ > #include "stringpool.h" > #include "attribs.h" > #include "escaped_string.h" > +#include "libiberty.h" > +#include "stor-layout.h" > +#include "hash-map.h" > +#include "diagnostic.h" > +#include "timevar.h" > +#include "convert.h" > +#include "gimple-expr.h" > +#include "gimplify.h" > +#include "function.h" > +#include "gcc-rich-location.h" > +#include "target.h" > +#include "file-prefix-map.h" > +#include "cgraph.h" > + > +#include "output.h" GCC's '#include' is a m...ystery -- I've pushed to master branch commit 27a89f84c458ae938bc3eb92ad0d594c06fc3b42 "'#include "tm_p.h"' in 'gcc/rust/backend/rust-tree.cc'", see attached. 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 27a89f84c458ae938bc3eb92ad0d594c06fc3b42 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Fri, 17 Feb 2023 23:36:20 +0100 Subject: [PATCH] '#include "tm_p.h"' in 'gcc/rust/backend/rust-tree.cc' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ... to resolve issues like: "Upstream GCC broken for --target=pdp11-aout": In file included from ./tm.h:18:0, from [...]/gcc/target.h:52, from [...]/gcc/rust/backend/rust-tree.cc:34: [...]/gcc/rust/backend/rust-tree.cc: In function ‘void Rust::mark_exp_read(tree)’: [...]/gcc/config/pdp11/pdp11.h:572:48: error: ‘pdp11_gen_int_label’ was not declared in this scope pdp11_gen_int_label ((LABEL), (PREFIX), (NUM)) ^ [...]/gcc/rust/backend/rust-tree.cc:53:3: note: in expansion of macro ‘ASM_GENERATE_INTERNAL_LABEL’ ASM_GENERATE_INTERNAL_LABEL (tmp_name, "Lsrc_loc", 1); ^ [...]/gcc/rust/backend/rust-tree.cc: In function ‘tree_node* Rust::fold_builtin_source_location(location_t)’: [...]/gcc/config/pdp11/pdp11.h:572:48: error: ‘pdp11_gen_int_label’ was not declared in this scope pdp11_gen_int_label ((LABEL), (PREFIX), (NUM)) ^ [...]/gcc/rust/backend/rust-tree.cc:4799:7: note: in expansion of macro ‘ASM_GENERATE_INTERNAL_LABEL’ ASM_GENERATE_INTERNAL_LABEL (tmp_name, "Lsrc_loc", source_location_id++); ^ make[1]: *** [rust/rust-tree.o] Error 1 "New build failure on upstream GCC for --target=powerpc-ibm-aix7.{1,2}": In file included from ./tm.h:22:0, from [...]/gcc/target.h:52, from [...]/gcc/rust/backend/rust-tree.cc:34: [...]/gcc/rust/backend/rust-tree.cc: In function ‘void Rust::mark_exp_read(tree)’: [...]/gcc/config/rs6000/xcoff.h:206:63: error: ‘rs6000_xcoff_strip_dollar’ was not declared in this scope sprintf (LABEL, "*%s..%u", rs6000_xcoff_strip_dollar (PREFIX), (unsigned) (NUM)) ^ [...]/gcc/rust/backend/rust-tree.cc:53:3: note: in expansion of macro ‘ASM_GENERATE_INTERNAL_LABEL’ ASM_GENERATE_INTERNAL_LABEL (tmp_name, "Lsrc_loc", 1); ^ [...]/gcc/rust/backend/rust-tree.cc: In function ‘tree_node* Rust::fold_builtin_source_location(location_t)’: [...]/gcc/config/rs6000/xcoff.h:206:63: error: ‘rs6000_xcoff_strip_dollar’ was not declared in this scope sprintf (LABEL, "*%s..%u", rs6000_xcoff_strip_dollar (PREFIX), (unsigned) (NUM)) ^ [...]/gcc/rust/backend/rust-tree.cc:4799:7: note: in expansion of macro ‘ASM_GENERATE_INTERNAL_LABEL’ ASM_GENERATE_INTERNAL_LABEL (tmp_name, "Lsrc_loc", source_location_id++); ^ make[1]: *** [rust/rust-tree.o] Error 1 Fix-up for recent commit e66fec8e6ba35edf01f86c2bf6514109aba4ded2 "gccrs: const folding port". gcc/rust/ * backend/rust-tree.cc: '#include "tm_p.h"'. --- gcc/rust/backend/rust-tree.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/rust/backend/rust-tree.cc b/gcc/rust/backend/rust-tree.cc index 47506d6792a..e2595b59aa8 100644 --- a/gcc/rust/backend/rust-tree.cc +++ b/gcc/rust/backend/rust-tree.cc @@ -34,8 +34,8 @@ #include "target.h" #include "file-prefix-map.h" #include "cgraph.h" - #include "output.h" +#include "tm_p.h" // forked from gcc/c-family/c-common.cc c_global_trees tree c_global_trees[CTI_MAX]; -- 2.25.1