Merge pull request #9981 from jefferyto/go-1.13-trimpath
golang: Use new -trimpath option when compiling Go packages
This commit is contained in:
commit
6468932200
2 changed files with 2 additions and 3 deletions
|
@ -275,7 +275,6 @@ define GoPackage/Build/Compile
|
||||||
mips|mipsle) installsuffix="$(GO_MIPS)" ;; \
|
mips|mipsle) installsuffix="$(GO_MIPS)" ;; \
|
||||||
mips64|mips64le) installsuffix="$(GO_MIPS64)" ;; \
|
mips64|mips64le) installsuffix="$(GO_MIPS64)" ;; \
|
||||||
esac ; \
|
esac ; \
|
||||||
trimpath="all=-trimpath=$(GO_PKG_BUILD_DIR)" ; \
|
|
||||||
ldflags="all=-linkmode external -extldflags '$(TARGET_LDFLAGS)'" ; \
|
ldflags="all=-linkmode external -extldflags '$(TARGET_LDFLAGS)'" ; \
|
||||||
pkg_gcflags="$(GO_PKG_GCFLAGS)" ; \
|
pkg_gcflags="$(GO_PKG_GCFLAGS)" ; \
|
||||||
pkg_ldflags="$(GO_PKG_LDFLAGS)" ; \
|
pkg_ldflags="$(GO_PKG_LDFLAGS)" ; \
|
||||||
|
@ -284,8 +283,7 @@ define GoPackage/Build/Compile
|
||||||
done ; \
|
done ; \
|
||||||
go install \
|
go install \
|
||||||
$$$${installsuffix:+-installsuffix $$$$installsuffix} \
|
$$$${installsuffix:+-installsuffix $$$$installsuffix} \
|
||||||
-gcflags "$$$$trimpath" \
|
-trimpath \
|
||||||
-asmflags "$$$$trimpath" \
|
|
||||||
-ldflags "$$$$ldflags" \
|
-ldflags "$$$$ldflags" \
|
||||||
-v \
|
-v \
|
||||||
$$$${pkg_gcflags:+-gcflags "$$$$pkg_gcflags"} \
|
$$$${pkg_gcflags:+-gcflags "$$$$pkg_gcflags"} \
|
||||||
|
|
|
@ -27,6 +27,7 @@ unexport \
|
||||||
CC_FOR_TARGET CXX_FOR_TARGET GO_DISTFLAGS GO_GCFLAGS GO_LDFLAGS GOBUILDTIMELOGFILE GOROOT_BOOTSTRAP \
|
CC_FOR_TARGET CXX_FOR_TARGET GO_DISTFLAGS GO_GCFLAGS GO_LDFLAGS GOBUILDTIMELOGFILE GOROOT_BOOTSTRAP \
|
||||||
BOOT_GO_GCFLAGS GOEXPERIMENT GOBOOTSTRAP_TOOLEXEC
|
BOOT_GO_GCFLAGS GOEXPERIMENT GOBOOTSTRAP_TOOLEXEC
|
||||||
# there are more magic environment variables to track down, but ain't nobody got time for that
|
# there are more magic environment variables to track down, but ain't nobody got time for that
|
||||||
|
# deliberately left untouched: GOPROXY GONOPROXY GOSUMDB GONOSUMDB GOPRIVATE
|
||||||
|
|
||||||
go_arch=$(subst \
|
go_arch=$(subst \
|
||||||
aarch64,arm64,$(subst \
|
aarch64,arm64,$(subst \
|
||||||
|
|
Loading…
Reference in a new issue