From patchwork Wed Jan 15 10:30:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Richard Earnshaw \(lists\)" X-Patchwork-Id: 182831 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp6705561ile; Wed, 15 Jan 2020 02:31:13 -0800 (PST) X-Google-Smtp-Source: APXvYqzRX7rWIyIps5H2FWe4DWoHgV0KrmPrda+lP5cDhkTGuv0ycNRrAQzYLh4ROMhER9piFhBv X-Received: by 2002:a05:6830:1116:: with SMTP id w22mr2282237otq.216.1579084272912; Wed, 15 Jan 2020 02:31:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579084272; cv=none; d=google.com; s=arc-20160816; b=CgEcY1N1A4aLTtrPXBqugGneXREQzRQoEjxOmYS29ft/D+2E2QHCrI+eTSb1qVUsLo m4AzIFx4K76mN5qpbIeNq3hbeqdCOHGI26cj0BAqi3JCZgSywFi+OfUR+KU21MwePRoG 6FWI5QgdzCiSyo3s4TNhr8n+/UdX0H3P5h6spMNeTpzqoWbsJhJHslsSgi27ZfyVENEf XyWN8t3bH5mmFsMZcVEYmQTF82tYfxz1z6i0s/sK63X2ozQ0EBlwqXwFwdIVm/6kb4rK cRvKzZly1qyt6Wa9+LA/998omWALsaxCem/HqHatJwRUPXHJj/z1Iv/Bhr8uGAx/GVVr ACFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:user-agent:date:message-id:subject:from:cc:to :delivered-to:sender:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mailing-list:dkim-signature :domainkey-signature; bh=gzKdF1e/AtoR1vxdhsDaSNIGVjCEdCY4z3D3SVQcVwQ=; b=vYZOEFvkkpgMxSqGfMVSu3pB1ARbsS7EPh8Qs+OUsJvfd/ZKZfeTY658CIven3pmyU LdnKQsm5Ip/VBH7va6h6WdOJKL2R4HU3CD2ilkTiuW4nAfEDPtyCGUuzijzhEYZhhJWC BrOajzFf8FR4df9UNcF2z2iRQoPwSX0q5BAgJhluNeTnqPf3C5wVcrY4SPNztvjptlR3 xE+ar5B5EZzBkJdhttkz8LTMWWbXXq8SA5npJpcfuO6R67CyOIukJ0Pg5sQ7O9d6MN3+ Boroh+TalqiG1cGxzvME0K1gkZqjhDt2eEcolvotH2qHO2zSWxe9Tx0S+QyDWV16p6de uppA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b="osQ/GvTR"; spf=pass (google.com: domain of gcc-patches-return-517423-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="gcc-patches-return-517423-patch=linaro.org@gcc.gnu.org" Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id 38si11086065otj.136.2020.01.15.02.31.12 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Jan 2020 02:31:12 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-517423-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b="osQ/GvTR"; spf=pass (google.com: domain of gcc-patches-return-517423-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="gcc-patches-return-517423-patch=linaro.org@gcc.gnu.org" DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to:cc :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=MRdmpDLi4nSsDR/dbVfu9unUb5AD4RgyfUUFtgZIvnyGY1inhu Zi7pIDGXwLaam/dBc+lk9txL2tNP7E4q4a2C6zzQmEc4RAl2+6D63IPxxmZGFg5y vqshZJ5/3bX2AZIuB01j4uMfjCNglEgQf4X3SWJLW9nPJPqiNHMgtZP2A= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to:cc :from:subject:message-id:date:mime-version:content-type; s= default; bh=NjQ/0807MBEAIFaKJA67sx3ZFdk=; b=osQ/GvTR6Kar02cYdeGt ad/w0JBkRJ05aMbcBqpFsbHDUTrkZoU+cLp+Bch7FUXsMlui0KmL4Xbwg+27UeWP 4l5xb3YJHg513KQSeXhu6O1CZR4GZpP3HWAFM66SPPq1buR9W+o/e9qVpkYITli3 oapEJdkUigsS941IFEWYWlw= Received: (qmail 35116 invoked by alias); 15 Jan 2020 10:31:01 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 35108 invoked by uid 89); 15 Jan 2020 10:31:00 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-18.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_SHORT, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=wilson, Wilson X-HELO: foss.arm.com Received: from foss.arm.com (HELO foss.arm.com) (217.140.110.172) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 15 Jan 2020 10:30:50 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2E45231B; Wed, 15 Jan 2020 02:30:49 -0800 (PST) Received: from e120077-lin.cambridge.arm.com (e120077-lin.cambridge.arm.com [10.2.78.81]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 85AF33F6C4; Wed, 15 Jan 2020 02:30:48 -0800 (PST) To: "gcc-patches@gcc.gnu.org" Cc: Jim Wilson From: "Richard Earnshaw (lists)" Subject: Backport: Add support for gcc as git submodule of another repository. Message-ID: <82793a9f-230a-6809-0354-91497e6265d6@arm.com> Date: Wed, 15 Jan 2020 10:30:47 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 This is a straight backport of https://gcc.gnu.org/ml/gcc-patches/2018-04/msg01352.html. Without this contrib/gcc_update fails if run from a worktree, while git pull works just fine. Pushed to the gcc-8 branch. diff --git a/contrib/ChangeLog b/contrib/ChangeLog index 039dc251ebb..47ac7c47dcc 100644 --- a/contrib/ChangeLog +++ b/contrib/ChangeLog @@ -1,3 +1,10 @@ +2020-01-15 Richard Earnshaw + + Backport: + 2018-05-01 Jim Wilson + + * gcc_update: Check for .git as a file. + 2019-08-16 Uros Bizjak * test_summary: Do not escape "=". diff --git a/contrib/gcc_update b/contrib/gcc_update index a33bb543902..c9c71548f53 100755 --- a/contrib/gcc_update +++ b/contrib/gcc_update @@ -286,7 +286,7 @@ p esac # Check for known version control systems. -if [ -d .git ]; then +if [ -d .git ] || [ -f .git ]; then GCC_GIT=${GCC_GIT-${GIT-git}} vcs_type="git" elif [ -d .hg ]; then