From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qv1-xf30.google.com (mail-qv1-xf30.google.com [IPv6:2607:f8b0:4864:20::f30]) by sourceware.org (Postfix) with ESMTPS id 3DDC13858D28 for ; Tue, 11 Apr 2023 22:55:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3DDC13858D28 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-qv1-xf30.google.com with SMTP id lz6so6549254qvb.6 for ; Tue, 11 Apr 2023 15:55:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681253756; h=content-transfer-encoding:in-reply-to:references:cc:to:from :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=MBtmCVEJPAw+M087Xd6MyVj699bUNBUdlCf/yxateGg=; b=OW5OjYGU4vd/8ndN+ZuoqwvFGzn5uim+oxbVo3UmArw9LT9hNPIlIsfDkojyrPhcAd UBPhQsNRBkX9Zixo7OYjqo6M/J0wGvMtEDiyzeyAkYlQdNQS3T7g2nr2/fs081qV3vit q5HugD6lruWf68c+LI3nFE3chn2QJ0Frq5f/lFIxzau/y1jM+xne5c2z1rHcVTSnU3D0 RcIcXSWB4zh42NyWEGGGj70SDKIm66XhzDCTNDTKf+PzYFkLd316xX5hSEfLQBt8GJh7 ItMqelJN3Dmcne7EHtlslnRY6eaX2k5bRTVB74z/WiC+elS2ZNBJDTuXZiVJj+Xji8mC 0wOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681253756; h=content-transfer-encoding:in-reply-to:references:cc:to:from :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=MBtmCVEJPAw+M087Xd6MyVj699bUNBUdlCf/yxateGg=; b=bahpqFHQzBjy3SYxbQkvM/Iin5FWFgnQ/aWnj2cKEVqcKaniLNC2atGGL1KYYnjrFF RJAg46otjidvEP6pfgGFubMQ6cFMzsdT/Zuvt6kgE5hNXfags+lGZSeWSI3H+ZAz4mui 8mDxJk+H5/ueox5H1oV+7yTo2CddDOxVG/lWWPWllz/CnG+Va21+IL2DtUlAfpYBUpMO 94jjpuY1rNs3S618SJ86h2L7I2YzBmc93psReYsdZBdpGsXUl9EKjHoDSN9eQV3RSQX8 i4QjZvkcSygmK+11bMm4b3vBHWqQ4rVjI+9HUmYCkPyQy1MfMdm/uf4Op1uJ/7vIJtXa Z8iw== X-Gm-Message-State: AAQBX9ct+C0nFzY5H+KpG69xtnv2ERXBaItnR6NuwCiJePFNeLS3d0s6 /MO29o245sxQXkSqpBfvEEo= X-Google-Smtp-Source: AKy350Z0jiDCPwO5V4gR33xFP6RSqyac2LsgUJdgo5QbCT7AA4MFy1tiAq6kebX4+rqnT1O6DP2BaA== X-Received: by 2002:a05:6214:cab:b0:5e6:88f5:5681 with SMTP id s11-20020a0562140cab00b005e688f55681mr30847873qvs.49.1681253756509; Tue, 11 Apr 2023 15:55:56 -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 m5-20020ad44d45000000b005dd8b9345cfsm4396994qvm.103.2023.04.11.15.55.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 11 Apr 2023 15:55:56 -0700 (PDT) Sender: Nathan Sidwell Message-ID: <41cd4d9f-f541-e070-024a-b18f49addeb3@acm.org> Date: Tue, 11 Apr 2023 18:55:55 -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 From: Nathan Sidwell To: Jakub Jelinek , Jason Merrill Cc: gcc-patches@gcc.gnu.org References: <52e00a19-2dfe-185f-a85e-8c5a1ea1524b@acm.org> In-Reply-To: <52e00a19-2dfe-185f-a85e-8c5a1ea1524b@acm.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3031.0 required=5.0 tests=BAYES_00,BODY_8BITS,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: Jakub, for avoidance of doubt, your version is fine. nathan On 4/11/23 18:06, Nathan Sidwell wrote: > 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