From patchwork Fri Oct 30 14:33:48 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Toke_H=C3=B8iland-J=C3=B8rgensen?= X-Patchwork-Id: 538355 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D80214027C for ; Sat, 31 Oct 2015 01:34:08 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=toke.dk header.i=@toke.dk header.b=eDbwdT7Q; dkim-atps=neutral Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 01219280618; Fri, 30 Oct 2015 15:32:13 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 4899C28A90B for ; Fri, 30 Oct 2015 15:32:07 +0100 (CET) X-policyd-weight: using cached result; rate: -7.6 Received: from mail2.tohojo.dk (mail2.tohojo.dk [77.235.48.147]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Fri, 30 Oct 2015 15:32:06 +0100 (CET) X-Virus-Scanned: amavisd-new at mail2.tohojo.dk DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=toke.dk; s=201310; t=1446215629; bh=BrI61v1AlKPUIm5KQLqFirKQedGXyUmEFAG/mVv3Cm4=; h=From:To:Cc:Subject:References:Date:In-Reply-To; b=eDbwdT7QM96vO+vDxf5ibYZkwCBY/vhafXJfvu9gnDASxSnydKxHuHL0685p4O+6S 3mMJHyfxX2kS6zE0OqBf1bweXVs8ragh6lgItH7+pFSKifIpeZn7XJPR1ERzQsezE4 T6OKFt64VzujHotZU0ukPSTpyFWbfJxnUP+azASA= Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id 0BC0D49EEC; Fri, 30 Oct 2015 15:33:49 +0100 (CET) From: =?utf-8?Q?Toke_H=C3=B8iland-J=C3=B8rgensen?= To: Felix Fietkau References: <1446201872-17474-1-git-send-email-toke@toke.dk> <563367B4.6080702@openwrt.org> <87611oecuc.fsf@toke.dk> <56336D9A.7020306@openwrt.org> <871tcceav2.fsf@toke.dk> <56337699.4030609@openwrt.org> <87wpu4cv29.fsf@toke.dk> <56337987.9000903@openwrt.org> <87r3kccuer.fsf@toke.dk> <56337CC4.1040408@openwrt.org> Date: Fri, 30 Oct 2015 15:33:48 +0100 In-Reply-To: <56337CC4.1040408@openwrt.org> (Felix Fietkau's message of "Fri, 30 Oct 2015 15:20:52 +0100") X-Clacks-Overhead: GNU Terry Pratchett Message-ID: <87mvv0cto3.fsf@toke.dk> MIME-Version: 1.0 Cc: openwrt-devel@lists.openwrt.org Subject: Re: [OpenWrt-Devel] [PATCH] Allow kernel modules to keep build ID debug symbol. X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" Felix Fietkau writes: >> Would definitely work. The problem is I'm not sure I quite grok the >> openwrt build system sufficiently to do this correctly. Guess I need to >> get the linker flag into KERNEL_MAKEOPTS? > Yes. It's in kernel-defaults.mk Cool, this part works. >> Can go looking for that, but >> that still leaves the problem of signaling the strip-kmod.sh script >> correctly -- can I get at per-package variables in rules.mk where the >> RSTRIP invocation is defined? > You can add it wrapped in $(if ...) to rules.mk to the other exports in > the RSTRIP variable. Yeah, that's what I thought; but the obvious way (below) doesn't seem to work. Can I not expand the PKG_* variables in rules.mk? -Toke diff --git a/rules.mk b/rules.mk index 819bea5..8e1cfe9 100644 --- a/rules.mk +++ b/rules.mk @@ -275,6 +275,7 @@ else endif RSTRIP:= \ export CROSS="$(TARGET_CROSS)" \ + $(if $(PKG_BUILD_ID),KEEP_BUILD_ID=1) \ $(if $(CONFIG_KERNEL_KALLSYMS),NO_RENAME=1) \ $(if $(CONFIG_KERNEL_PROFILING),KEEP_SYMBOLS=1); \ NM="$(TARGET_CROSS)nm" \