sdk: expose binary strip settings
authorDavid Bauer <mail@david-bauer.net>
Fri, 20 Nov 2020 02:03:54 +0000 (03:03 +0100)
committerChristian Marangi <ansuelsmth@gmail.com>
Tue, 6 Dec 2022 00:01:09 +0000 (01:01 +0100)
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 <mail@david-bauer.net>
(cherry picked from commit bb817bb4b8b0b546a70e45bd907ebfeea2370dcd)

target/sdk/files/Config.in

index 4393daab5ba3113004ef21730202bfbc358a32b3..f6879924975885a7bcad85ca7ca5a3c1738fd499 100644 (file)
@@ -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)"