From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linux.ibm.com 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : from : subject : to : cc : content-type : content-transfer-encoding; s=pp1; bh=8ghq599pcmpsBwbN1P9sETGmXX20BxuJxWCLvB9f9i4=; b=OZwLR6k384wl6RE1NxxojZ3PjiGbUhEJpHSVl/onAVaI1E5uqZ20FZtzsHLlDyrEiuVo DW0x1S2zW3/x4dd8V30K32y/dO/vg6pUG0JubkoX347Ya0Sg+oaMXA/MXrv+25UlyzJc XC9HIVhTFthmMEN8NUr9SSoFyhDe/ghWw5L7zWO+MPPDGn6q0G2xlk2ZWe03hsEQ3BcK 25rGvNVvO2fd9cBA7eHJSuM4tKJ+RGohb4DfY0f/nkSIHJNQXQ/v4um/s2S0PYNEyHnz xmI/dzl21PO42X5pM33e74Ss2nQ80pmkQs/fsQSenHzT7MRWAG4FWkp+/aN3oNsZsEjx wA== 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 From: "Kewen.Lin" 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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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 List-Id: 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(-) 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) # # 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