From patchwork Wed Aug 16 02:31:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kewen.Lin" X-Patchwork-Id: 135714 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a888:0:b0:3f2:4152:657d with SMTP id x8csp834218vqo; Tue, 15 Aug 2023 19:56:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEnZuHtfq6ejnnFmVXwuVROFI2E6aIVs5ZDAFTrmeFNVy79lRQA0I/c3CScI44IocCZgTz1 X-Received: by 2002:a17:907:d94:b0:99b:fcd7:2d7a with SMTP id go20-20020a1709070d9400b0099bfcd72d7amr4473471ejc.34.1692154574495; Tue, 15 Aug 2023 19:56:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692154574; cv=none; d=google.com; s=arc-20160816; b=VTBaI94W3GrzVSCWx1NBXbTddEdAt21BDx9VRJA9BBuLcC3uL2pFuyQPD9VWSRH08Z wSVaRKFeokvhEOT8DdHIsPkheSzSuzf0ABTpy67PKXLOp11Icvpoz0UrdWH4E5tIrZ9o fIL25oDF3Wa3qMu9Ax9Oe1iP3/Cv7NbtTdGLFifdufyWOsaqFszTZy1HQkUxqafNTkY/ TvqLB3bKQVGdrKm7VlUj1hATDkSXNEwavk82palSj7oL2PSTBsh+YukY4oW0qlcnx+Xi ezYaj7BTduzxVJ/RaAblzEBc3OBUXenVUizDTWt96yS0rj7/D9eiKDaMri68ldiNkYP5 ojJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:cc:to:subject:content-language:user-agent :mime-version:date:message-id:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=8ghq599pcmpsBwbN1P9sETGmXX20BxuJxWCLvB9f9i4=; fh=7gh2TwzdDbcBUVNO+5Q5mo8u0MpkPGc9XAMelRzJSUM=; b=SuKBNla5vgiYfeOzj/x2TTv675uFLBUWjdHpWDmk6WgEfy/Ieghfzu5bzP0Dg94qew Ee7zwr5xWyW54tn6006NQoTTzlOpSS+ga8h81Nj1MWhlIoMsa+XeDbuTU7Q1/dMJ5NKQ nNCXBphcQ3hYiczmMnGhGQbeUrJVuVp9uMkg6hfQUjhD1W83/WF+ofclhbKIF7H9o2nM MlRIoLdgla852RkynCfLT7ajuUuwz98ZfkQBlbG3BBtVFakZpA//qjEAud4B0I1yWv79 JR6NsALkSB5Eitr+tPa2Yx5AaCXrrzYOLm3F6N/fHwxhsbTGdkrdJe1D+f8MuzVotPsC 358g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=ZUNxty47; 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"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id x10-20020a170906298a00b00988da29a08fsi9742149eje.841.2023.08.15.19.56.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Aug 2023 19:56:14 -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; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=ZUNxty47; 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"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 714DE385770D for ; Wed, 16 Aug 2023 02:56:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 714DE385770D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1692154573; bh=8ghq599pcmpsBwbN1P9sETGmXX20BxuJxWCLvB9f9i4=; h=Date:Subject:To:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=ZUNxty47FWAUnILCUs83lqggiqwm8f9L+kc1Xj2GdHvEQGJk5nc764pB8yLF/KaTf d41yEk5oER7Zp1gMaEWD5sXi9VQE9Zh/+htjLhBEycwadf//SIc19Ohijs9nJeKBWM VtULrleeeebvHgOCsiGNvCChu73aynD0GkoZTme4= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 62CDE3858288 for ; Wed, 16 Aug 2023 02:55:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 62CDE3858288 Received: from pps.filterd (m0353724.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 37G2VFvh029231; Wed, 16 Aug 2023 02:55:23 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3sgnrc0ewu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 16 Aug 2023 02:55:23 +0000 Received: from m0353724.ppops.net (m0353724.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 37G2pj1A006559; Wed, 16 Aug 2023 02:55:23 GMT Received: from ppma12.dal12v.mail.ibm.com (dc.9e.1632.ip4.static.sl-reverse.com [50.22.158.220]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3sgnrc0ew6-4 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 16 Aug 2023 02:55:23 +0000 Received: from pps.filterd (ppma12.dal12v.mail.ibm.com [127.0.0.1]) by ppma12.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 37G1D8IL003495; Wed, 16 Aug 2023 02:31:16 GMT Received: from smtprelay07.fra02v.mail.ibm.com ([9.218.2.229]) by ppma12.dal12v.mail.ibm.com (PPS) with ESMTPS id 3semdshud6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 16 Aug 2023 02:31:16 +0000 Received: from smtpav05.fra02v.mail.ibm.com (smtpav05.fra02v.mail.ibm.com [10.20.54.104]) by smtprelay07.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 37G2VE7Z63766934 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 16 Aug 2023 02:31:14 GMT Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 715A72004B; Wed, 16 Aug 2023 02:31:14 +0000 (GMT) Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E013420040; Wed, 16 Aug 2023 02:31:12 +0000 (GMT) Received: from [9.197.244.163] (unknown [9.197.244.163]) by smtpav05.fra02v.mail.ibm.com (Postfix) with ESMTP; Wed, 16 Aug 2023 02:31:12 +0000 (GMT) Message-ID: Date: Wed, 16 Aug 2023 10:31:11 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Content-Language: en-US Subject: [PATCH] Makefile.in: Add variable TM_P_H2 for TM_P_H dependency [PR111021] To: GCC Patches Cc: Richard Biener , Richard Sandiford , Hans-Peter Nilsson X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: jOXF-thlCCOIieEZQ0RDrx_zyNVFBuLK X-Proofpoint-GUID: 3q_EPkWwTcwbZFYTJ3k6UBt6o76u8Uzi X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-08-15_22,2023-08-15_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 impostorscore=0 suspectscore=0 lowpriorityscore=0 adultscore=0 spamscore=0 bulkscore=0 mlxscore=0 mlxlogscore=999 clxscore=1011 priorityscore=1501 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2306200000 definitions=main-2308160022 X-Spam-Status: No, score=-11.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, 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: "Kewen.Lin via Gcc-patches" From: "Kewen.Lin" Reply-To: "Kewen.Lin" Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1774352675134007884 X-GMAIL-MSGID: 1774352675134007884 Hi, As PR111021 shows, the below ${port}-protos.h include tree.h for code_helper and tree_code: arm/arm-protos.h:#include "tree.h" cris/cris-protos.h:#include "tree.h" (H-P removed this in r14-3218) microblaze/microblaze-protos.h:#include "tree.h" rl78/rl78-protos.h:#include "tree.h" stormy16/stormy16-protos.h:#include "tree.h" , when compiling build/gencondmd.cc, the include hierarchy makes it depend on tm_p.h -> ${port}-protos.h -> tree.h, which further includes (depends on) some files that are generated during the building, such as: all-tree.def, tree-check.h and so on. The previous commit r14-3215 should already force build/gencondmd.cc to depend on ${TREE_H}, so the reported build failure should be gone. But for a long term maintenance, especially one day some build/xxx.cc requires tm_p.h but not recog.h, the ${TREE_H} dependence could be missed and a build failure will show up. So this patch is to add one variable under section "# Shorthand variables for dependency lists.", to explicit indicate tm_p.h which includes ${port}-protos.h should depend on ${TREE_H}. Then any new build/xxx.cc depending on tm_p.h will be able to consider ${TREE_H}. Note that the existing ${TM_P_H} variable is also used for "generated_files", it isn't dedicated for dependencies, so a variable named ${TM_P_H2} is proposed and put under the "# Shorthand variables for dependency lists.", also the only use as dependence is updated accordingly. It's tested with cross-builds for the affected ports with steps: 1) dropped the fix r14-3215; 2) reproduced the build failure with serial build; 3) applied this patch, serial built and verified all passed; 4) added back r14-3215, serial built and verified all passed; Is it ok for trunk? BR, Kewen ----- PR bootstrap/111021 gcc/ChangeLog: * Makefile.in (TM_P_H2): New variable for tm_p.h dependence. --- gcc/Makefile.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) # Now figure out from those variables how to compile and link. @@ -2905,7 +2906,7 @@ build/inchash.o : inchash.cc $(BCONFIG_H) $(SYSTEM_H) $(CORETYPES_H) \ $(HASHTAB_H) inchash.h build/gencondmd.o : build/gencondmd.cc $(BCONFIG_H) $(SYSTEM_H) \ $(CORETYPES_H) $(GTM_H) insn-constants.h \ - $(filter-out insn-flags.h, $(RTL_H) $(TM_P_H) $(FUNCTION_H) $(REGS_H) \ + $(filter-out insn-flags.h, $(RTL_H) $(TM_P_H2) $(FUNCTION_H) $(REGS_H) \ $(RECOG_H) output.h $(FLAGS_H) $(RESOURCE_H) toplev.h $(DIAGNOSTIC_CORE_H) reload.h \ $(EXCEPT_H) tm-constrs.h) # This pulls in tm-pred.h which contains inline functions wrapping up -- 2.39.1 diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 9dddb65b45d..192dc76f294 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -1062,6 +1062,7 @@ RTL_SSA_H = $(PRETTY_PRINT_H) insn-config.h splay-tree-utils.h \ rtl-ssa/changes.h rtl-ssa/functions.h rtl-ssa/is-a.inl \ rtl-ssa/access-utils.h rtl-ssa/insn-utils.h rtl-ssa/movement.h \ rtl-ssa/change-utils.h rtl-ssa/member-fns.inl +TM_P_H2 = $(TM_P_H) $(TREE_H) #