From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt1-x829.google.com (mail-qt1-x829.google.com [IPv6:2607:f8b0:4864:20::829]) by sourceware.org (Postfix) with ESMTPS id 3D68B3858D28 for ; Tue, 11 Apr 2023 22:06:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3D68B3858D28 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=acm.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-qt1-x829.google.com with SMTP id a23so6397569qtj.8 for ; Tue, 11 Apr 2023 15:06:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681250796; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=ZE6XNc6qJ0WuWDMiuI9ryif6++R2KtMh7PImemsvMJE=; b=mFdRuwqRqLiM52iH6UUuMIS7sb/MZBTKnF0GKUV/8RYyoMqPtN9tV95pgvOOQVtY8T PdFhbRRUea8k+KRiuqwmtHJ7+m0guwWhSxQk8AIQ+wHOJw7yXCM4n3ig4PwA5k2biTne CPjpHqrE+W2oE+YfSmwtjb2hsd67lpISWCql/NzIgmKbb3dAAF7gvZgLoOSeom4d9LlA fQ0gp3RCeXgCTkgvUHgocW4JzJhWZzgzJUDBM/6I2egi+tqmIXNyJrKsQ8bBWdKS5M1/ THa9lpyAoft8VZUbvj7m2JfYGsMdpskqFVSWlFwWfM3HjmjUQPx4797ZG5Hs4og9WX7n umGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681250796; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ZE6XNc6qJ0WuWDMiuI9ryif6++R2KtMh7PImemsvMJE=; b=SbWCChzXUMYiH7QxzagLXe2tl/dV7wSh6JlFnDpaR7eYLhi+FE5ydIfzGvHbHeAA7c KQEv8Q9Z/dibsH472GZ0h4nAWOc7sbRZl/7jl7q14ej4lEPpDv6xYznCCUhiGk9ZxKvy Kv/uAsza9lFlENMSdaaN6G4grhR8bpNKdMqEAtMWoDDtsePELYPCYSOyYZhWviGyB6g1 PMjuqMJznzswqnXERlWK73DF45RhBUH35dMwT8Vb0xXPV5COj4xlqwHGMD4QGAjzlStp nVRw7lZguRjYWUnOX49XMWLywqpi7uLvbn2s5Vjjs2S90FA4voZRkSapVlGUtwZQHv2f IHbA== X-Gm-Message-State: AAQBX9eDz6Fh4ytHXLUZMYmsrKqz12/n3fgNUdjUfFVyTpnrS69iQBLU 30AikJI1Ms0IhQD1wBHjJTo= X-Google-Smtp-Source: AKy350Z3n17KVcnntmp2sWQFT+FZGSRlDmgaRcHYSudqx40V+7TDtJxIHkviFepP3jXzz1Ae/yy8iQ== X-Received: by 2002:ac8:7fd5:0:b0:3e6:42a8:b074 with SMTP id b21-20020ac87fd5000000b003e642a8b074mr1405665qtk.26.1681250796399; Tue, 11 Apr 2023 15:06:36 -0700 (PDT) Received: from ?IPV6:2601:19c:527f:bfd0:cb20:e74:ead7:4cfe? ([2601:19c:527f:bfd0:cb20:e74:ead7:4cfe]) by smtp.googlemail.com with ESMTPSA id w23-20020ac86b17000000b003e6948a8966sm2771427qts.21.2023.04.11.15.06.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 11 Apr 2023 15:06:35 -0700 (PDT) Sender: Nathan Sidwell Message-ID: <52e00a19-2dfe-185f-a85e-8c5a1ea1524b@acm.org> Date: Tue, 11 Apr 2023 18:06:35 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: [PATCH] c++: Fix Solaris bootstraps across midnight Content-Language: en-US To: Jakub Jelinek , Jason Merrill Cc: gcc-patches@gcc.gnu.org References: From: Nathan Sidwell In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3032.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,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: On 4/11/23 04:12, Jakub Jelinek wrote: > Hi! > > When working on the PR109040 fix, I wanted to test it on some > WORD_REGISTER_OPERATIONS target and tried sparc-solaris on GCC Farm. > My bootstrap failed in comparison failure on cp/module.o, because > Solaris date doesn't support the -r option and one stage's cp/module.o > was built before midnight and next stage's cp/module.o after midnight, > so they had different -DMODULE_VERSION= value. > > Now, I think the advice (don't bootstrap at midnight) is something > we shouldn't have, so the following patch stores the module version > (still generated through the same way, date -r cp/module.cc > if it works, otherwise just date) into a temporary file, makes sure > that temporary file is updated when cp/module.cc source is updated > and when date -r doesn't work copies file from previous stage > if it is newer than cp/module.cc. looks good. one could tweak it slightly to avoid the MODULE_VERSION variable (but then I was the original lazy one!) Something like: .... s-cp-module-version: $(srcdir)/cp/module.cc if date -r $(srcdir)/cp/module.cc '+%y%m%d%H%MU' \ 2>/dev/null >$@; then :; \ elif test ../prev-gcc/$@ -nt \ $(srcdir)/cp/module.cc; then \ cp ../prev-gcc/$@ $@; \ else \ date '+%y%m%d0000U' 2>/dev/null >$@; \ fi`; \ .... nathan -- Nathan Sidwell