diff options
author | Jeffery To <jeffery.to@gmail.com> | 2020-05-12 19:54:14 +0800 |
---|---|---|
committer | Jeffery To <jeffery.to@gmail.com> | 2020-05-13 00:18:50 +0800 |
commit | bcdd6e64fad2e04f06f62c32dd4d17ddcdeda5c8 (patch) | |
tree | de2d0518d95abdecfcb3a8c9df35eef2f47038c8 /lang/golang | |
parent | 49a2ff493b46029e5acc1a902a1e850307bc20bc (diff) |
golang: Remove RSTRIP definition from golang-package.mk
Since RSTRIP is defined in rules.mk as a recursively expanded variable,
there is no need to define it again after setting STRIP in
golang-package.mk.
This also adds a note to the comment for GO_PKG_LDFLAGS to say that -s
and -w flags are not necessary.
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
Diffstat (limited to 'lang/golang')
-rw-r--r-- | lang/golang/golang-package.mk | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/lang/golang/golang-package.mk b/lang/golang/golang-package.mk index 303ae0eb3..de7ef336d 100644 --- a/lang/golang/golang-package.mk +++ b/lang/golang/golang-package.mk @@ -89,7 +89,12 @@ include $(GO_INCLUDE_DIR)/golang-values.mk # # Additional go tool link arguments to use when building targets. # -# e.g. GO_PKG_LDFLAGS:=-s -w +# Note that the OpenWrt build system has an option to strip binaries +# (enabled by default), so -s (Omit the symbol table and debug +# information) and -w (Omit the DWARF symbol table) flags are not +# necessary. +# +# e.g. GO_PKG_LDFLAGS:=-r dir1:dir2 -u # # # GO_PKG_LDFLAGS_X - list of string variable definitions, default empty @@ -147,16 +152,6 @@ ifneq ($(CONFIG_USE_SSTRIP),) GO_PKG_STRIP_ARGS:=--strip-all endif STRIP:=$(TARGET_CROSS)strip $(GO_PKG_STRIP_ARGS) - RSTRIP= \ - export CROSS="$(TARGET_CROSS)" \ - $(if $(PKG_BUILD_ID),KEEP_BUILD_ID=1) \ - $(if $(CONFIG_KERNEL_KALLSYMS),NO_RENAME=1) \ - $(if $(CONFIG_KERNEL_PROFILING),KEEP_SYMBOLS=1); \ - NM="$(TARGET_CROSS)nm" \ - STRIP="$(STRIP)" \ - STRIP_KMOD="$(SCRIPT_DIR)/strip-kmod.sh" \ - PATCHELF="$(STAGING_DIR_HOST)/bin/patchelf" \ - $(SCRIPT_DIR)/rstrip.sh endif define GoPackage/GoSubMenu |