From patchwork Wed Feb 22 12:19:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yash Shinde X-Patchwork-Id: 60514 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp544749wrd; Wed, 22 Feb 2023 04:22:24 -0800 (PST) X-Google-Smtp-Source: AK7set9sSpWGEYC76ukpFc+lseMYTfCEPseyr7PGH/n4ndUWgCyqoXDgNVGxPJmUkW87D3FvzbUB X-Received: by 2002:a17:906:f0d1:b0:881:4d98:fe2e with SMTP id dk17-20020a170906f0d100b008814d98fe2emr14503440ejb.29.1677068544912; Wed, 22 Feb 2023 04:22:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677068544; cv=none; d=google.com; s=arc-20160816; b=mDovgp4K5SnBT4wLJDY9eEqW/mLariIviWazP4NhXgePh3GSSlnyGb2oF4dlEaqrjd LPUAcWKjbc6hCg3m37SShpFjfsKwAgVGfmDqTQEqkWlNUhJIoVlumZVCfLLs5V869jY0 HXlk2QVqlAnL9yhbSyCE193Pdc1uVTM3QvJ63RSMdbh90mOcYa7JjsI2rJDOqwEfHo5h i2k1+EjnUCl38WnajXc0zYKux2C/by8G7iADlr50ytKKumeEeFEup+0I0SuQjwtJE55K TjdSIfksMl4OtgXerBfuvsI73+UzJt76UZPYp5b3MK7OCJcFmG22dhZ/UGr/o/aIDIeG kzLg== 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:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature :dmarc-filter:delivered-to; bh=DpcEr6vzLB7Gv8AR8WNSs/tuJsL7dteEDFr1UqHof2Q=; b=kazNlRrvDiP5BNRc5k8BL4yjCV7iSTODH8MZpf7+n8GLZkP8h9qWY2BTl55Npah0qb ObkviQ30A9bkPmupr/TeQdxlDKTTbrsyn5Ulu+7aiGG/Zz6/rCVE4k7OxJq5xNg/nWye WEuJe5VcgSwKm4E9SeILMcQZu0TlK+dbtzgnaLwNxcXKqopTqCAbZC1SzbRxW0Eryl5G zNO2koK3EtAGl16jmccd0zAS/50w9pqj8c3Z0bDCVrfglzJRVJFUoIc4ltatS4GWxGn+ TGWmsD1JN8XV1soXYCTyNl+RFby+O0QANnHlYgvj2rBLkz78EXm5dMylcYdyKuaiXaDf 4c7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@windriver.com header.s=PPS06212021 header.b=IgN2Tg91; 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"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=windriver.com Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id ft31-20020a170907801f00b008e6f1360782si1701523ejc.964.2023.02.22.04.22.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Feb 2023 04:22:24 -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; dkim=pass header.i=@windriver.com header.s=PPS06212021 header.b=IgN2Tg91; 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"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=windriver.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B4453385B50A for ; Wed, 22 Feb 2023 12:21:57 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0b-0064b401.pphosted.com (mx0b-0064b401.pphosted.com [205.220.178.238]) by sourceware.org (Postfix) with ESMTPS id 0F5763858431 for ; Wed, 22 Feb 2023 12:21:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0F5763858431 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=windriver.com Authentication-Results: sourceware.org; spf=none smtp.mailfrom=ala-lpggp3.wrs.com Received: from pps.filterd (m0250811.ppops.net [127.0.0.1]) by mx0a-0064b401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 31MBIfbV031317; Wed, 22 Feb 2023 12:21:31 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=windriver.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=PPS06212021; bh=DpcEr6vzLB7Gv8AR8WNSs/tuJsL7dteEDFr1UqHof2Q=; b=IgN2Tg91b1Rvlhcn5yzXZRKU2RvIApkM740g2nrCTxbhMFtDFbHFKCOJE6nzv9F0D2ZF Sm6E2VP1X9XE/AkvuuYEGb1Y+JZBUcmXQGAqd9g3oIK4UNdKbMA5fLyphwfDGrIywhqu ixXimRZMHr3gEkzMXgzYur/7JMYcFAISHJ+QG+37r7l++UNHSl3pjAMKQ7L7peGt+3o+ FG+i1fuh9hbWpNkZUXRD5g1uvRMaS+cXmymgvVdEzkXdDM5xRZmcHkx4JTPbfQ6GBrfn 3Lpoj3mly+eOTLyHvrgHGsiSl2K4Mh9oYqZmKnoHquvGr1ZeTcUMaopPUCTv2yOXhOMm bg== Received: from ala-exchng02.corp.ad.wrs.com (unknown-82-254.windriver.com [147.11.82.254]) by mx0a-0064b401.pphosted.com (PPS) with ESMTPS id 3ntpd3uqdh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Wed, 22 Feb 2023 12:21:31 +0000 Received: from ALA-EXCHNG02.corp.ad.wrs.com (147.11.82.254) by ALA-EXCHNG02.corp.ad.wrs.com (147.11.82.254) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.18; Wed, 22 Feb 2023 04:21:30 -0800 Received: from ala-lpggp3.wrs.com (147.11.136.210) by ALA-EXCHNG02.corp.ad.wrs.com (147.11.82.254) with Microsoft SMTP Server id 15.1.2507.18 via Frontend Transport; Wed, 22 Feb 2023 04:21:30 -0800 Received: by ala-lpggp3.wrs.com (Postfix, from userid 23306) id 0725D90387C; Wed, 22 Feb 2023 04:21:30 -0800 (PST) From: Yash Shinde To: CC: , , Subject: [PATCH] Share work directories Date: Wed, 22 Feb 2023 04:19:04 -0800 Message-ID: <20230222121904.4087522-1-Yash.Shinde@windriver.com> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 X-Proofpoint-GUID: 1fUieVOoFE-HRfEXiU6xuBHmPs3d6prq X-Proofpoint-ORIG-GUID: 1fUieVOoFE-HRfEXiU6xuBHmPs3d6prq X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.170.22 definitions=2023-02-22_05,2023-02-22_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 impostorscore=0 priorityscore=1501 bulkscore=0 spamscore=0 malwarescore=0 mlxlogscore=999 clxscore=1011 lowpriorityscore=0 phishscore=0 adultscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2302220109 X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, NO_DNS_FOR_FROM, SPF_HELO_NONE, SPF_NONE, 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?1758533826551537647?= X-GMAIL-MSGID: =?utf-8?q?1758533826551537647?= From: Khem Raj Fix configure and Makefile files to read the defaults.hand t-oe from build directory, so that the source can be shared between gcc-cross-initial, gcc-cross-intermediate, gcc-cross, gcc-runtime, and also the sdk build which use a separate build directory compared to source directory. While compiling gcc-crosssdk-initial-x86_64 on some host, there is occasionally failure that test the existance of default.h doesn't work, the reason is tm_include_list='** defaults.h' rather than tm_include_list='** ./defaults.h'. So we add the test condition for this situation. gcc/ChangeLog: * configure * configure.ac * mkconfig.sh Signed-off-by: Khem Raj Signed-off-by: Hongxu Jia --- gcc/configure | 4 ++-- gcc/configure.ac | 4 ++-- gcc/mkconfig.sh | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gcc/configure b/gcc/configure index 254f9b6c943..ff2a3e26049 100755 --- a/gcc/configure +++ b/gcc/configure @@ -13471,8 +13471,8 @@ for f in $tm_file; do tm_include_list="${tm_include_list} $f" ;; defaults.h ) - tm_file_list="${tm_file_list} \$(srcdir)/$f" - tm_include_list="${tm_include_list} $f" + tm_file_list="${tm_file_list} ./$f" + tm_include_list="${tm_include_list} ./$f" ;; * ) tm_file_list="${tm_file_list} \$(srcdir)/config/$f" diff --git a/gcc/configure.ac b/gcc/configure.ac index 62bc908b991..d36830cf2fb 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -2336,8 +2336,8 @@ for f in $tm_file; do tm_include_list="${tm_include_list} $f" ;; defaults.h ) - tm_file_list="${tm_file_list} \$(srcdir)/$f" - tm_include_list="${tm_include_list} $f" + tm_file_list="${tm_file_list} ./$f" + tm_include_list="${tm_include_list} ./$f" ;; * ) tm_file_list="${tm_file_list} \$(srcdir)/config/$f" diff --git a/gcc/mkconfig.sh b/gcc/mkconfig.sh index 054ede89647..3b2c2b9df37 100644 --- a/gcc/mkconfig.sh +++ b/gcc/mkconfig.sh @@ -77,7 +77,7 @@ if [ -n "$HEADERS" ]; then if [ $# -ge 1 ]; then echo '#ifdef IN_GCC' >> ${output}T for file in "$@"; do - if test x"$file" = x"defaults.h"; then + if test x"$file" = x"./defaults.h" -o x"$file" = x"defaults.h"; then postpone_defaults_h="yes" else echo "# include \"$file\"" >> ${output}T @@ -106,7 +106,7 @@ esac # If we postponed including defaults.h, add the #include now. if test x"$postpone_defaults_h" = x"yes"; then - echo "# include \"defaults.h\"" >> ${output}T + echo "# include \"./defaults.h\"" >> ${output}T fi # Add multiple inclusion protection guard, part two.