From dd50ef2191f15b6be9b33b1eb2e1bc4e090719ad Mon Sep 17 00:00:00 2001 From: kszaq Date: Wed, 8 Feb 2017 16:14:55 +0100 Subject: [PATCH 1/3] scripts/create_addon: strip all addons This makes sure that all executables in addon install dir are stripped. We can now drop debug_strip in addons' package.mk. --- scripts/create_addon | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/create_addon b/scripts/create_addon index eac3bb590d..98af90bc05 100755 --- a/scripts/create_addon +++ b/scripts/create_addon @@ -167,6 +167,7 @@ if [ "$PKG_IS_ADDON" = "yes" ] ; then if [ "$(type -t addon)" = "function" ]; then addon + debug_strip $ADDON_BUILD/$PKG_ADDON_ID else echo "*** unsupported package format. please convert your package ***" exit 1 From 55bafe4c72991832882437a84f7381c24d3aa1d6 Mon Sep 17 00:00:00 2001 From: kszaq Date: Thu, 9 Feb 2017 00:03:44 +0100 Subject: [PATCH 2/3] config/functions: do not print strip errors We cannot strip scipts but we also don't want to see errors regarding this. --- config/functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/functions b/config/functions index dbfcf1eb98..44b9539772 100644 --- a/config/functions +++ b/config/functions @@ -507,7 +507,7 @@ show_config() { # strip debug_strip() { if [ ! "$DEBUG" = yes ]; then - find $* -type f -executable | xargs $STRIP 1>/dev/null || : + find $* -type f -executable | xargs $STRIP 2>/dev/null || : fi } From aa1edddea008f17b5e0cb298fbface0f8eda6d0a Mon Sep 17 00:00:00 2001 From: kszaq Date: Thu, 9 Feb 2017 00:05:26 +0100 Subject: [PATCH 3/3] scripts/create_addon: always setup toolchain when creating addon If addon wants to strip binaries we need to have STRIP set up. Without running 'build' setup_toolchain is not called and stripping fails. Make sure we also setup paths before creating package. --- scripts/create_addon | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/create_addon b/scripts/create_addon index 98af90bc05..23270a1f92 100755 --- a/scripts/create_addon +++ b/scripts/create_addon @@ -158,6 +158,8 @@ pack_addon() { } if [ "$PKG_IS_ADDON" = "yes" ] ; then + setup_toolchain $TARGET + $SCRIPTS/build $@ printf "%${BUILD_INDENT}c CREATE ADDON ($PROJECT/$TARGET_ARCH) $1\n" ' '>&$SILENT_OUT