From patchwork Sun Feb 7 19:05:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Bauer X-Patchwork-Id: 1437253 X-Patchwork-Delegate: mail@david-bauer.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=znC6qCD/; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DYdxp0NjDz9sBy for ; Mon, 8 Feb 2021 06:09:33 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe :List-Id:MIME-Version:Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Owner; bh=bwoMhJNt9r9p6XDiaRVfJj4soIXfiCr5FrE/N3iJxQc=; b=znC6qCD/dHpEG3FUa3Ll9iXRYQ SL4iyCov/1LPxSR1bgwXifBNA9pwvik4QKS+LKkuiQikfTFrfaBw1FmPdAwbAUZebx/swsD4QsEKj ZIbQV0Djq8tBuiT3tMGtpwhjau88GvQIBNqvmLzfA6ns88V9qx6dDA3x8xhVaAlBFsC8G8R0ayXwR ZGAUu+XHHjeKDVCGHXVo0g5fze+M9/vxiDZGHa3sRiHoIe28W1bLapnwtYLCFqY/V9WRFzyZ2wbls otRQc8prMuD1hF7yrrZAOtvSBwCP8L/I2f3YsvL3YhLbiSTaCi1QI0iPZgOVgenn4jy+p5NncDUue kRSEGhjA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l8pNi-0003zb-LA; Sun, 07 Feb 2021 19:06:02 +0000 Received: from mars.blocktrron.ovh ([51.254.112.43] helo=mail.blocktrron.ovh) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l8pNd-0003yX-V7 for openwrt-devel@lists.openwrt.org; Sun, 07 Feb 2021 19:06:00 +0000 Received: from localhost.localdomain (p200300e53f3fbd0026659f60a3db7f30.dip0.t-ipconnect.de [IPv6:2003:e5:3f3f:bd00:2665:9f60:a3db:7f30]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.blocktrron.ovh (Postfix) with ESMTPSA id B7E0C1E948 for ; Sun, 7 Feb 2021 20:05:52 +0100 (CET) From: David Bauer To: openwrt-devel@lists.openwrt.org Subject: [PATCH] sdk: expose binary strip settings Date: Sun, 7 Feb 2021 20:05:51 +0100 Message-Id: <20210207190551.98483-1-mail@david-bauer.net> X-Mailer: git-send-email 2.30.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210207_140558_142705_0107D785 X-CRM114-Status: GOOD ( 10.70 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Expose the SDK options for binary stripping to the menuconfig. This way, packages can easily be built with debug symbols using the SDK. Signed-off-by: David Bauer --- target/sdk/files/Config.in | 46 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/target/sdk/files/Config.in b/target/sdk/files/Config.in index 4393daab5b..f687992497 100644 --- a/target/sdk/files/Config.in +++ b/target/sdk/files/Config.in @@ -18,6 +18,52 @@ menu "Global build settings" bool "Cryptographically sign package lists" default y + comment "Package build options" + + config DEBUG + bool + prompt "Compile packages with debugging info" + default n + help + Adds -g3 to the CFLAGS. + + comment "Stripping options" + + choice + prompt "Binary stripping method" + default USE_STRIP if EXTERNAL_TOOLCHAIN + default USE_STRIP if USE_GLIBC + default USE_SSTRIP + help + Select the binary stripping method you wish to use. + + config NO_STRIP + bool "none" + help + This will install unstripped binaries (useful for native + compiling/debugging). + + config USE_STRIP + bool "strip" + help + This will install binaries stripped using strip from binutils. + + config USE_SSTRIP + bool "sstrip" + depends on !USE_GLIBC + help + This will install binaries stripped using sstrip. + endchoice + + config STRIP_ARGS + string + prompt "Strip arguments" + depends on USE_STRIP + default "--strip-unneeded --remove-section=.comment --remove-section=.note" if DEBUG + default "--strip-all" + help + Specifies arguments passed to the strip command when stripping binaries. + endmenu menu "Advanced configuration options (for developers)"