From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-x22d.google.com (mail-oi1-x22d.google.com [IPv6:2607:f8b0:4864:20::22d]) by sourceware.org (Postfix) with ESMTPS id A79903858D37 for ; Sat, 18 Nov 2023 23:20:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A79903858D37 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org A79903858D37 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::22d ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700349656; cv=none; b=tOYCS93GLK7cEZBgXkNF8ZegDI6oKAMEoZ2HHOT66NSwpADtgetacN65VS+cS3VSV4WAPllsBo2ciYy0JlRD/+E6XdzQ2NsN5OECEs+DKuGKjoGpDnmjGSucgmpzQhSMkKESCjWkvqbCuIuoeEwbUYlyxe/mxCsc55zTs8NfESo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700349656; c=relaxed/simple; bh=+JPnyLQp77896Gb82eIgiL1UrFsePEsdp/wCPh+lIjM=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=REghTgvn9Wh2+2hMf4iHXkXnJH3WoL8ue5DRqL6VP2r2xi9W1HS5VIGIHrlQCWXGX5MmfRA/uQGeNbvPocm20qhUtu0XBiBUKjLX2ToizRRQAoE00WmqJiC4anqxNBEGw+84SjS6VE+WJZjeIhLHXADkb7i2CZpZ6qSiInAiyw0= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-oi1-x22d.google.com with SMTP id 5614622812f47-3b2df2fb611so2360185b6e.0 for ; Sat, 18 Nov 2023 15:20:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700349654; x=1700954454; darn=gcc.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=B8ji9vgI153YWspOZt0c/y4sKJwyGm+Gi2dYfSffYjA=; b=IFva7SWKhWG7XpuP1Flj/kgpYKNakhHhPazdv8Kix4lXZ8wSRexwknwpLwZWKnkSl7 9byzEI7UUBKK9E3t//6FA4pxRUq4SOH2KSFD3+58cpLfOqDvC/tayQ0YjcTx7eeoExAE 3qs0CVxSiLKB4+Wq7rzB4k84srGdqs1/H/u3D1bnbtwoCGJNyisxwi1cH96UnoHmOg2b 4OAoZOJCsWZg/s3w59As2ip4ahukm7rqhj4H9jLSNh54vJawlZK6tAvmnHwY1X1gzG9c myiDkNbt2/o+cnOiQx3WWlPagMnZ3MBLevvv59GNnXLjeFBvU73u2gF/jKaZtRoiZOfb Y7vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700349654; x=1700954454; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=B8ji9vgI153YWspOZt0c/y4sKJwyGm+Gi2dYfSffYjA=; b=aS0C104E0NCjZRneS2EAMGIZXBk647z2KZQH94gVqM2qMdmS2vI3LZp6JClU9GZ4zt 400aWOuZm0xfCVazXicaSVEIFzfVJC+1CqVmR0vYPtcDrk8ZsAnf6yxBWqT6ig1Jqapa +svCk13whIho04aRVc/kaDGKuabm0kURz+gJYAcSPQevkZCFivCH23ZHg/iuWvHNPttL mN/xHi+6Wcbg0Agud2SqlemQVGtP7+C316w3XZMDtEBNEEEu4hegs8+41GAMSddXAFEl C8+nQw6S4Z783fqZJc5WFOR5KS0bz8AvfscoEM89k9LIzwkMNAOH65bMe7E7rLfkgKOM k9Rw== X-Gm-Message-State: AOJu0YyuG80mAS1NgJI2lFnbtCxDu7vhQ0Nv/ojQLnkqC/drMoXzqkNZ m0R4m04b0VMmRwF2OiA2R24= X-Google-Smtp-Source: AGHT+IFMO+BirbIyvXQJB8t65cnn1vWf5gDS3Xzmoy73azbLTIWlUyCln9WGUd7npqnpTE7D610f8Q== X-Received: by 2002:a05:6808:1b21:b0:3b5:84b0:6be0 with SMTP id bx33-20020a0568081b2100b003b584b06be0mr5049786oib.47.1700349653781; Sat, 18 Nov 2023 15:20:53 -0800 (PST) Received: from [172.31.0.109] ([136.36.130.248]) by smtp.gmail.com with ESMTPSA id en11-20020a056808394b00b003b2e4b72a75sm800487oib.52.2023.11.18.15.20.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 18 Nov 2023 15:20:53 -0800 (PST) Message-ID: Date: Sat, 18 Nov 2023 16:20:51 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] Makefile.tpl: Avoid race condition in generating site.exp from the top level Content-Language: en-US To: Lewis Hyatt , gcc-patches@gcc.gnu.org References: <20231117221923.2751146-1-lhyatt@gmail.com> From: Jeff Law In-Reply-To: <20231117221923.2751146-1-lhyatt@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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: On 11/17/23 15:19, Lewis Hyatt wrote: > Hello- > > I often find it convenient to run a new c-c++-common test from the > main build dir like: > > $ make -j 2 RUNTESTFLAGS=dg.exp=new-test.c check-gcc-{c,c++} > > I noticed that sometimes this produces a corrupted site.exp and then no > tests work until it is remade manually. To avoid the issue, it is necessary > to do "cd gcc; make site.exp" before running a parallel make from the top > level directory. The below patch fixes it by just making that dependency on > site.exp explicit in the top level Makefile. Is it OK please? Thanks... > > -Lewis > > -- >8 -- > > A command like "make -j 2 check-gcc-c check-gcc-c++" run in the top level of > a fresh build directory does not work reliably. That will spawn two > independent make processes inside the "gcc" directory, and each of those > will attempt to create site.exp if it doesn't exist and will interfere with > each other, producing often a corrupted or empty site.exp. Resolve that by > making these targets depend on a new phony target which makes sure site.exp > is created first before starting the recursive makes. > > ChangeLog: > > * Makefile.in: Regenerate. > * Makefile.tpl: Add dependency on site.exp to check-gcc-* targets OK jeff