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: 65207 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 25F2E38493C3 for ; Fri, 17 Feb 2023 23:12:07 +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+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" 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