From patchwork Sat Sep 3 19:58:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Borislav Petkov X-Patchwork-Id: 9312205 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 72C8060756 for ; Sat, 3 Sep 2016 19:59:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 61FF528ABB for ; Sat, 3 Sep 2016 19:59:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5671228AC1; Sat, 3 Sep 2016 19:59:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8BA0E28ABB for ; Sat, 3 Sep 2016 19:59:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753827AbcICT7E (ORCPT ); Sat, 3 Sep 2016 15:59:04 -0400 Received: from mail.skyhub.de ([78.46.96.112]:50488 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753962AbcICT7E (ORCPT ); Sat, 3 Sep 2016 15:59:04 -0400 X-Virus-Scanned: Nedap ESD1 at mail.skyhub.de Received: from mail.skyhub.de ([127.0.0.1]) by localhost (door.skyhub.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id uQg7PWNkxaRh; Sat, 3 Sep 2016 21:58:51 +0200 (CEST) Received: from pd.tnic (p200300454B4C6300715B8A590EC1667B.dip0.t-ipconnect.de [IPv6:2003:45:4b4c:6300:715b:8a59:ec1:667b]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 899E91DA20E; Sat, 3 Sep 2016 21:58:51 +0200 (CEST) Received: by pd.tnic (Postfix, from userid 1000) id 04C7A161D18; Sat, 3 Sep 2016 21:58:51 +0200 (CEST) From: Borislav Petkov To: LKML Cc: linux-kbuild@vger.kernel.org, Emese Revfy , Michal Marek Subject: [PATCH] kbuild/builddeb: Fix !CONFIG_GCC_PLUGINS build Date: Sat, 3 Sep 2016 21:58:50 +0200 Message-Id: <1472932730-1098-1-git-send-email-bp@alien8.de> X-Mailer: git-send-email 2.7.3 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 From: Borislav Petkov When building a bindeb-pkg target into an object output dir, i.e., O=, I get: find: `scripts/gcc-plugins': No such file or directory /mnt/kernel/kernel/linux-2.6/scripts/package/Makefile:97: recipe for target 'bindeb-pkg' failed make[3]: *** [bindeb-pkg] Error 1 /mnt/kernel/kernel/linux-2.6/Makefile:1310: recipe for target 'bindeb-pkg' failed ... Check whether CONFIG_GCC_PLUGINS is enabled before collecting .so plugin names. Signed-off-by: Borislav Petkov Cc: Emese Revfy Cc: Michal Marek --- scripts/package/builddeb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/package/builddeb b/scripts/package/builddeb index e1c09e2f9be7..2e5b5f582365 100755 --- a/scripts/package/builddeb +++ b/scripts/package/builddeb @@ -332,7 +332,11 @@ if grep -q '^CONFIG_STACK_VALIDATION=y' $KCONFIG_CONFIG ; then (cd $objtree; find tools/objtool -type f -executable) >> "$objtree/debian/hdrobjfiles" fi (cd $objtree; find arch/$SRCARCH/include Module.symvers include scripts -type f) >> "$objtree/debian/hdrobjfiles" -(cd $objtree; find scripts/gcc-plugins -name \*.so -o -name gcc-common.h) >> "$objtree/debian/hdrobjfiles" + +if grep -q '^CONFIG_GCC_PLUGINS=y' $KCONFIG_CONFIG ; then + (cd $objtree; find scripts/gcc-plugins -name \*.so -o -name gcc-common.h) >> "$objtree/debian/hdrobjfiles" +fi + destdir=$kernel_headers_dir/usr/src/linux-headers-$version mkdir -p "$destdir" (cd $srctree; tar -c -f - -T -) < "$objtree/debian/hdrsrcfiles" | (cd $destdir; tar -xf -)