Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp43147pxj; Wed, 16 Jun 2021 19:47:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzkxzSMD3pTpWeW7lrBDisEnfJ9ImJC3hw4+4Yz4ECWR1X+mAQexEMR+XsKHoyk1WLVLX+q X-Received: by 2002:a05:6402:50d1:: with SMTP id h17mr3392849edb.214.1623898056072; Wed, 16 Jun 2021 19:47:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623898056; cv=none; d=google.com; s=arc-20160816; b=qrhXtHfErB89VMCZCpt0oFPWbaqyXG0rljL5wqsufC4QnArHA/47IcweKBUuIIbmh3 fGO/m+MpqORzG9KO6rRpYACwH57k45H7U2F4ZSvxPLVGh8rW5mlc2On+D14+7udiH0y+ uV7YbU1D+FyVfFpK4iLmNgIEo9pWs3hPWQwZfBA0OyUlHWF9z6PAlujY9SlUfiB4mxGK szY8iZoWd2rWBUxN5JMzZxtUsaVbDafCj0LARrayWBbM1U785MNAC1snuHvm/tY8PBxn fqPzp6HZzZ+efZD/HPfIbB2UWQ5nmTsOZRBvs0/v1zuRDEbqBX2JsoUWpcBW9JbtsaMu u6oA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature:dkim-filter; bh=wjle6ONnIAord5cqRzKuWQUDNDJxzTYVAbaSXw18SKs=; b=DYknpA4ggX2MQq7PPzn5nuZ/REPvcPO86rm13gmlk7IcayT4a5X3QBt17kr9pSwqjT pTYKf+8x1DrPRzUDERk2bZ43J9juFzsL/YaI5lQtg2r4OVU6ePLHsdxcntVt0BiBDwzm epzUJHTqf5pHoYiICwrzOXGQKq+ohFavM1ijSGGfU5WVOR3DLhnktn7T4qmaVf5k5QVe B9gMbj9IOYwtdguOWo6UM27t/2mNAEsZM3o7ytBfkwVSFFqY1FA9qUNsGhRmTbwrszI5 u/b/0piOSEBEz/54k0M1tQbTlnMX/WuYKq4Z/aVmON8cFGoMnRL5ai+1CgKSgynfuMtq Xivw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=qU6uBj2X; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j7si4350604ejc.247.2021.06.16.19.47.13; Wed, 16 Jun 2021 19:47:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=qU6uBj2X; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232196AbhFQBqY (ORCPT + 99 others); Wed, 16 Jun 2021 21:46:24 -0400 Received: from conssluserg-04.nifty.com ([210.131.2.83]:20274 "EHLO conssluserg-04.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232184AbhFQBqX (ORCPT ); Wed, 16 Jun 2021 21:46:23 -0400 Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182]) (authenticated) by conssluserg-04.nifty.com with ESMTP id 15H1huVf009347; Thu, 17 Jun 2021 10:43:57 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-04.nifty.com 15H1huVf009347 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1623894237; bh=wjle6ONnIAord5cqRzKuWQUDNDJxzTYVAbaSXw18SKs=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=qU6uBj2X7Hnfapm7LiTzm1euiOSK+bL4VVZnJ7KVTn/i5DahMqcuYZu53QEIWy3Td szDZjRxMEbGVeye0BDWsFQ3KwUWiIMEY7gZOyiv+b5zi7WgC/q/4rV+8PpkwJbYFBo ukreAtJk5gasEwCXa12unM/azjyYYuv8yyw0Or6wjdaZY3CUg6CnYoLM1Mq+rDFTMP O4eqMzijOQMk3c46xMw12PDvOaT9y4/9Je0ewRfnBHjb3u8MY8JxI9vd5C7FtfMbyG S1gjnLpE4xTSh4HTSqbr7XJ+qVOG6Iog+ZeuvYC8KoKw9ZOfEJrQODMkBFGy27BYzj cna8L74KOZEiw== X-Nifty-SrcIP: [209.85.210.182] Received: by mail-pf1-f182.google.com with SMTP id g6so3703525pfq.1; Wed, 16 Jun 2021 18:43:57 -0700 (PDT) X-Gm-Message-State: AOAM5336ZK6b3HXOdm3fJUJBKEEnMJQuJNhu5FT6guawJe29HWOYVELr lFLpQz+Z8EAmM5GxL1zk53VVGkKZ1BH/+EmmX/A= X-Received: by 2002:aa7:962f:0:b029:2ed:cf:1f90 with SMTP id r15-20020aa7962f0000b02902ed00cf1f90mr2761373pfg.76.1623894236332; Wed, 16 Jun 2021 18:43:56 -0700 (PDT) MIME-Version: 1.0 References: <20210612141838.1073085-1-maennich@google.com> In-Reply-To: From: Masahiro Yamada Date: Thu, 17 Jun 2021 10:43:19 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] kbuild: mkcompile_h: consider timestamp if KBUILD_BUILD_TIMESTAMP is set To: Matthias Maennich Cc: Linux Kernel Mailing List , "Cc: Android Kernel" , Linux Kbuild mailing list Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 17, 2021 at 10:05 AM Masahiro Yamada wrote: > > On Sat, Jun 12, 2021 at 11:18 PM Matthias Maennich wrote: > > > > To avoid unnecessary recompilations, mkcompile_h does not regenerate > > compile.h if just the timestamp changed. > > Though, if KBUILD_BUILD_TIMESTAMP is set, an explicit timestamp for the > > build was requested, in which case we should not ignore it. > > > > If a user follows the documentation for reproducible builds [1] and > > defines KBUILD_BUILD_TIMESTAMP as the git commit timestamp, a clean > > build will have the correct timestamp. A subsequent cherry-pick (or > > amend) changes the commit timestamp and if an incremental build is done > > with a different KBUILD_BUILD_TIMESTAMP now, that new value is not taken > > into consideration. But it should for reproducibility. > > > > Hence, whenever KBUILD_BUILD_TIMESTAMP is explicitly set, do not ignore > > UTS_VERSION when making a decision about whether the regenerated version > > of compile.h should be moved into place. > > > > [1] https://www.kernel.org/doc/html/latest/kbuild/reproducible-builds.html > > > > Cc: Masahiro Yamada > > Cc: linux-kbuild@vger.kernel.org > > Signed-off-by: Matthias Maennich > > --- > > > Applied to linux-kbuild. Thanks. > This may not be a big deal, but when KBUILD_BUILD_TIMESTAMP is unset, the timestamp is not updated. It still has a user-specified string. -- Best Regards Masahiro Yamada