diff mbox series

tools: sstrip: reword compile patch and enable -z by default

Message ID 20201118091210.9864-1-rsalvaterra@gmail.com
State Changes Requested
Headers show
Series tools: sstrip: reword compile patch and enable -z by default | expand

Commit Message

Rui Salvaterra Nov. 18, 2020, 9:12 a.m. UTC
Match the previous behaviour of removing trailing zero bytes by default (-z
option). Additionally, rename and reword the patch required for successful
compilation.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
---
 config/Config-build.in                                   | 2 +-
 ...ompile.patch => 001-disable-elftoc-compilation.patch} | 9 +++++++++
 2 files changed, 10 insertions(+), 1 deletion(-)
 rename tools/sstrip/patches/{001-compile.patch => 001-disable-elftoc-compilation.patch} (61%)
diff mbox series

Patch

diff --git a/config/Config-build.in b/config/Config-build.in
index c54bc243c5..2d97691104 100644
--- a/config/Config-build.in
+++ b/config/Config-build.in
@@ -186,7 +186,7 @@  menu "Global build settings"
 		string
 		prompt "Sstrip arguments"
 		depends on USE_SSTRIP
-		default ""
+		default "-z"
 		help
 		  Specifies arguments passed to the sstrip command when stripping binaries.
 
diff --git a/tools/sstrip/patches/001-compile.patch b/tools/sstrip/patches/001-disable-elftoc-compilation.patch
similarity index 61%
rename from tools/sstrip/patches/001-compile.patch
rename to tools/sstrip/patches/001-disable-elftoc-compilation.patch
index 9d3346edfb..787c51ce5b 100644
--- a/tools/sstrip/patches/001-compile.patch
+++ b/tools/sstrip/patches/001-disable-elftoc-compilation.patch
@@ -1,3 +1,12 @@ 
+From: Rui Salvaterra <rsalvaterra@gmail.com>
+Subject: sstrip: don't try to compile elftoc
+
+We only need sstrip itself and elftoc doesn't compile with musl's elf.h, so
+disable the elftoc compilation in the makefile.
+
+Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
+---
+
 --- a/Makefile
 +++ b/Makefile
 @@ -2,7 +2,7 @@