From patchwork Thu Jul 11 13:54:45 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Marek X-Patchwork-Id: 2826354 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6849A9F7D6 for ; Thu, 11 Jul 2013 13:55:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 23FE4201EC for ; Thu, 11 Jul 2013 13:55:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C3437201EB for ; Thu, 11 Jul 2013 13:55:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756065Ab3GKNyy (ORCPT ); Thu, 11 Jul 2013 09:54:54 -0400 Received: from cantor2.suse.de ([195.135.220.15]:47190 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755025Ab3GKNyw (ORCPT ); Thu, 11 Jul 2013 09:54:52 -0400 Received: from relay1.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id D4B8EA51B7; Thu, 11 Jul 2013 15:54:50 +0200 (CEST) Received: by sepie.suse.cz (Postfix, from userid 10020) id 4E29A7640B; Thu, 11 Jul 2013 15:54:45 +0200 (CEST) Date: Thu, 11 Jul 2013 15:54:45 +0200 From: Michal Marek To: Linus Torvalds Cc: Jan Beulich , dt.tangr@gmail.com, Geert Uytterhoeven , James Hogan , Christian Kujau , Mike Marciniszyn , Nicolas Dichtel , robert.richter@calxeda.com, "Yaakov (Cygwin/X)" , zzs0213@gmail.com, Linux Kbuild mailing list , Linux Kernel Mailing List Subject: Re: [GIT] kbuild changes for v3.11-rc1 Message-ID: <20130711135445.GA21500@sepie.suse.cz> References: <20130710133742.GA29368@emu.suse.cz> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Wed, Jul 10, 2013 at 07:11:53PM -0700, Linus Torvalds wrote: > You need to start being more careful. And I would seriously suggest > you start doing some explicit testing for this. You can do things like > "find . -user root", and if that shows a single file in the kernel > tree after a "make [modules_]install", then there's a problem. Good idea. I added this after the *install calls in my test script. > Commit d2aae8477cd00325bb7c7c7e95be488088900c48 is broken. It causes > root to re-write "include/config/kernel.release". Yeah. It also reveals another bug that we rewrite the kernel.release file each time. This patch should fix it, but please do not apply it yet: From f522eef24216f229c82b6bbb55f326814db2bac0 Mon Sep 17 00:00:00 2001 From: Michal Marek Date: Thu, 11 Jul 2013 15:34:51 +0200 Subject: [PATCH] kbuild: Do not overwrite include/config/kernel.release needlessly Use filechk to detect if the content changed or not. > There is no excuse for this. That commit is shit. There's no way in > hell that "make modules_install" should ever rebuild anything, so > adding that kind of dependency is fundamentally wrong and broken. We also run dozens of gcc checks during every make invocation, including make install or make help, so there is some room for improvement. But at least, these do not write to the source or object tree. Michal --- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/Makefile b/Makefile index 4e3575c..3aa232f 100644 --- a/Makefile +++ b/Makefile @@ -794,10 +794,13 @@ PHONY += $(vmlinux-dirs) $(vmlinux-dirs): prepare scripts $(Q)$(MAKE) $(build)=$@ +define filechk_kernel.release + echo "$(KERNELVERSION)$$($(CONFIG_SHELL) $(srctree)/scripts/setlocalversion $(srctree))" +endef + # Store (new) KERNELRELEASE string in include/config/kernel.release include/config/kernel.release: include/config/auto.conf FORCE - $(Q)rm -f $@ - $(Q)echo "$(KERNELVERSION)$$($(CONFIG_SHELL) $(srctree)/scripts/setlocalversion $(srctree))" > $@ + $(call filechk,kernel.release) # Things we need to do before we recursively start building the kernel