Skip to content

Commit

Permalink
build: replace SSTRIP_ARGS with SSTRIP_DISCARD_TRAILING_ZEROES
Browse files Browse the repository at this point in the history
sstrip only has one functional arg. Make that a bool option, which can
easily depend on other knobs then.

This is required to be disabled for the mold linker.

Signed-off-by: Andre Heider <a.heider@gmail.com>
  • Loading branch information
dhewg authored and Ansuel committed Jul 4, 2023
1 parent ca788d6 commit d026b19
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
10 changes: 4 additions & 6 deletions config/Config-build.in
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ menu "Global build settings"
help
This will install binaries stripped using strip from binutils.


config USE_SSTRIP
bool "sstrip"
depends on !USE_GLIBC
Expand All @@ -199,13 +198,12 @@ menu "Global build settings"
help
Specifies arguments passed to the strip command when stripping binaries.

config SSTRIP_ARGS
string
prompt "Sstrip arguments"
config SSTRIP_DISCARD_TRAILING_ZEROES
bool "Strip trailing zero bytes"
depends on USE_SSTRIP
default "-z"
default y
help
Specifies arguments passed to the sstrip command when stripping binaries.
Use sstrip's -z option to discard trailing zero bytes

config STRIP_KERNEL_EXPORTS
bool "Strip unnecessary exports from the kernel image"
Expand Down
2 changes: 1 addition & 1 deletion rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ else
STRIP:=$(TARGET_CROSS)strip $(call qstrip,$(CONFIG_STRIP_ARGS))
else
ifneq ($(CONFIG_USE_SSTRIP),)
STRIP:=$(STAGING_DIR_HOST)/bin/sstrip $(call qstrip,$(CONFIG_SSTRIP_ARGS))
STRIP:=$(STAGING_DIR_HOST)/bin/sstrip $(if $(CONFIG_SSTRIP_DISCARD_TRAILING_ZEROES),-z)
endif
endif
RSTRIP= \
Expand Down

0 comments on commit d026b19

Please sign in to comment.