Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932755Ab3CQVur (ORCPT ); Sun, 17 Mar 2013 17:50:47 -0400 Received: from mail-ob0-f182.google.com ([209.85.214.182]:62007 "EHLO mail-ob0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932567Ab3CQVup (ORCPT ); Sun, 17 Mar 2013 17:50:45 -0400 MIME-Version: 1.0 Date: Sun, 17 Mar 2013 14:50:44 -0700 X-Google-Sender-Auth: -jJ5E6YzabXBgAmriiM3oeciQ8s Message-ID: Subject: [RFC PATCH] kbuild: avoid some unnecessary rebuild From: Christopher Li To: Michal Marek , Sam Ravnborg Cc: linux-kernel Content-Type: multipart/mixed; boundary=f46d041c5f724980ae04d825dd2e Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3434 Lines: 60 --f46d041c5f724980ae04d825dd2e Content-Type: text/plain; charset=ISO-8859-1 In the current tip of git tree. If I do a allmodconfig full build, then follow by a "make" again without changing any code in the tree. There are some object will always get rebuild. e.g. eboot.o. I use "make V=2", it shows that the rebuild is due to some object file not in $(targets). I did not understand the $(targets) very well, the Kbuild.include mention that It is likely a bug in the kbuild if that happen. I add them in the $(targets) and that seems avoid the unnecessary rebuild of several objects. The second "make" has fewer output. The clean rebuild seems works fine too. Chris --f46d041c5f724980ae04d825dd2e Content-Type: application/octet-stream; name="kbuild-avoid-rebuild-some-object.patch" Content-Disposition: attachment; filename="kbuild-avoid-rebuild-some-object.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_heep743q0 dXNhZ2U6IGdpdCBbLS12ZXJzaW9uXSBbLS1leGVjLXBhdGhbPTxwYXRoPl1dIFstLWh0bWwtcGF0 aF0gWy0tbWFuLXBhdGhdIFstLWluZm8tcGF0aF0KICAgICAgICAgICBbLXB8LS1wYWdpbmF0ZXwt LW5vLXBhZ2VyXSBbLS1uby1yZXBsYWNlLW9iamVjdHNdIFstL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9yIG1vcmUgZGV2ZWxvcG1lbnQgaGlzdG9yaWVzIHRvZ2V0aGVyCiAgIG12ICAgICAgICAg TW92ZSBvciByZW5hbWUgYSBmaWxlLCBhIGRpcmVjdG9yeSwgb3IgYSBzeW1saW5rCiAgIHB1bGwg ICAgICAgRmV0Y2ggZnJvbSBhbmQgbWVyZ2Ugd2l0aCBhbm90aGVyIHJlcG9zaXRvcnkgb3IgYSBs b2NhbCBicmFuY2gKICAgcHVzaCAgICAgICBVcGRhdGUgcmVtb3RlIHJlZnMgYWxvbmcgd2l0aCBh c3NvY2lhdGVkIG9iamVjdHMKICAgcmViYXNlICAgICBGb3J3YXJkLXBvcnQgbG9jYWwgY29tbWl0 cyB0byB0aGUgdXBkYXRlZCB1cHN0cmVhbSBoZWFkCiAgIHJlc2V0ICAgICAgUmVzZXQgY3VycmVu dCBIRUFEIHRvIHRoZSBzcGVjaWZpZWQgc3RhdGUKICAgcm0gICAgICAgICBSZW1vdmUgZmlsZXMg ZnJvbSB0aGUgd29ya2luZyB0cmVlIGFuZCBmcm9tIHRoZSBpbmRleAogICBzaG93ICAgICAgIFNo b3cgdmFyaW91cyB0eXBlcyBvZiBvYmplY3RzCiAgIHN0YXR1cyAgICAgU2hvdyB0aGUgd29ya2lu ZyB0cmVlIHN0YXR1cwogICB0YWcgICAgICAgIENyZWF0ZSwgbGlzdCwgZGVsZXRlIG9yIHZlcmlm eSBhIHRhZyBvYmplY3Qgc2lnbmVkIHdpdGggR1BHCgpTZWUgJ2dpdCBoZWxwIDxjb21tYW5kPicg Zm9yIG1vcmUgaW5mb3JtYXRpb24gb24gYSBzcGVjaWZpYyBjb21tYW5kLgo= --f46d041c5f724980ae04d825dd2e-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/