build: add a config knob to enable gc-sections for all packages

This enables the linker's garbage collection for all packages which haven't
opted-out.

Signed-off-by: Andre Heider <a.heider@gmail.com>
This commit is contained in:
Andre Heider
2023-02-03 13:15:43 +01:00
committed by Christian Marangi
parent 07730ff346
commit aef8bab9d7
2 changed files with 9 additions and 1 deletions

View File

@@ -144,6 +144,14 @@ menu "Global build settings"
help
Adds -g3 to the CFLAGS.
config USE_GC_SECTIONS
bool
prompt "Dead code and data elimination for all packages (EXPERIMENTAL)"
help
Places functions and data items into its own sections to use the linker's
garbage collection capabilites.
Packages can choose to opt-out via setting PKG_BUILD_FLAGS:=no-gc-sections
config IPV6
def_bool y