From patchwork Wed May 4 13:35:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Bj=C3=B8rn_Mork?= X-Patchwork-Id: 9014071 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D1BADBF29F for ; Wed, 4 May 2016 13:36:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0B55820397 for ; Wed, 4 May 2016 13:36:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9E0D920395 for ; Wed, 4 May 2016 13:36:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751643AbcEDNf6 (ORCPT ); Wed, 4 May 2016 09:35:58 -0400 Received: from canardo.mork.no ([148.122.252.1]:59218 "EHLO canardo.mork.no" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751621AbcEDNfy (ORCPT ); Wed, 4 May 2016 09:35:54 -0400 Received: from canardo.mork.no (ip6-localhost [IPv6:::1]) by canardo.mork.no (8.14.4/8.14.4) with ESMTP id u44DZjZj001074 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 4 May 2016 15:35:45 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mork.no; s=a; t=1462368946; bh=aYuO5GoAtf7zyXPQDBA5QlyLpKfHHYHLpA8Ax0k2Ij8=; h=From:To:Cc:Date:Message-Id:From; b=CO+HEZtK2J8UFX+5+YvXpof1LbhUh22g1N7T/PDe7nFVeKRgvpXMfSMUaybFZhAiN 1rM0n3235pGD8mfK7BrUVd6YubeT6JFKcyjcKj1c4L/nRpEnDBvf8cxiZtGkwoZRxq x0rSaMPbjEENL1/zlv7Hihlv5szsXn2ugQ03FH7Z0CJc12Cb1nwdQnkqU9HT9LL7Me xL9EYrzEwQYKMVTBBFi0lMhe0JRJs5SZ93h07Le0IUCs0KafMfsSmyGa+krVazaIMl tBdLgu3q5MhX8HliNau2pH2jZimzK9WRRTAtnOHXZqGGRZ0V6+lV0zeyNpWhNKZ9/h qMDy1SlHYa6mQ== Received: (from bjorn@localhost) by canardo.mork.no (8.14.4/8.14.4/Submit) id u44DZj19001073; Wed, 4 May 2016 15:35:45 +0200 From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= To: Michal Marek Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, =?UTF-8?q?Bj=C3=B8rn=20Mork?= Subject: [PATCH] builddeb: include objtool binary in headers package Date: Wed, 4 May 2016 15:35:39 +0200 Message-Id: <1462368939-1018-1-git-send-email-bjorn@mork.no> X-Mailer: git-send-email 2.1.4 MIME-Version: 1.0 X-Spam-Status: No, score=-8.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,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-milter 0.99 at canardo X-Virus-Status: Clean Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP "objtool" is required for building external m dules if "Compile-time stack metadata validation" is enabled. Otherwise all builds based on the headers package fail with: make[1]: Entering directory '/usr/src/linux-headers-4.6.0-rc6' make[2]: *** No rule to make target 'tools/objtool/objtool', needed by 'foo.o'. Stop. Makefile:1598: recipe for target 'foo.ko' failed make[1]: *** [foo.ko] Error 2 make[1]: Leaving directory '/usr/src/linux-headers-4.6.0-rc6' Signed-off-by: Bjørn Mork --- scripts/package/builddeb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/package/builddeb b/scripts/package/builddeb index 6c3b038ef40d..93d3b157298d 100755 --- a/scripts/package/builddeb +++ b/scripts/package/builddeb @@ -322,6 +322,9 @@ fi # Build kernel header package (cd $srctree; find . -name Makefile\* -o -name Kconfig\* -o -name \*.pl) > "$objtree/debian/hdrsrcfiles" +if grep -q '^CONFIG_STACK_VALIDATION=y' $KCONFIG_CONFIG ; then + (cd $srctree; find tools/objtool -type f -executable) >> "$objtree/debian/hdrsrcfiles" +fi (cd $srctree; find arch/$SRCARCH/include include scripts -type f) >> "$objtree/debian/hdrsrcfiles" (cd $srctree; find arch/$SRCARCH -name module.lds -o -name Kbuild.platforms -o -name Platform) >> "$objtree/debian/hdrsrcfiles" (cd $srctree; find $(find arch/$SRCARCH -name include -o -name scripts -type d) -type f) >> "$objtree/debian/hdrsrcfiles"