* [PATCH] go.bbclass: Use external linker for native packages
@ 2020-12-15 8:49 Khem Raj
0 siblings, 0 replies; only message in thread
From: Khem Raj @ 2020-12-15 8:49 UTC (permalink / raw)
To: openembedded-core; +Cc: Khem Raj, Otavio Salvador, Konrad Weihmann
go 1.15 has reworked internal linker, which has resulted in regressions
in OE where native binaries generated using internal linker in some
cases result in corruption during populate_sysroot e.g. glide-native
crashing when used after relocation.
This improved reliability of native binaries working especially when
they use cgo or pie build modes
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Otavio Salvador <otavio.salvador@ossystems.com.br>
Cc: Konrad Weihmann <kweihmann@outlook.com>
---
meta/classes/go.bbclass | 1 +
1 file changed, 1 insertion(+)
diff --git a/meta/classes/go.bbclass b/meta/classes/go.bbclass
index a9e31b50ea..5b26378a4e 100644
--- a/meta/classes/go.bbclass
+++ b/meta/classes/go.bbclass
@@ -40,6 +40,7 @@ GO_RPATH_LINK_class-native = "${@'-Wl,-rpath-link=${STAGING_LIBDIR_NATIVE}/go/pk
GO_EXTLDFLAGS ?= "${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} ${GO_RPATH_LINK} ${LDFLAGS}"
GO_LINKMODE ?= ""
GO_LINKMODE_class-nativesdk = "--linkmode=external"
+GO_LINKMODE_class-native = "--linkmode=external"
GO_LDFLAGS ?= '-ldflags="${GO_RPATH} ${GO_LINKMODE} -extldflags '${GO_EXTLDFLAGS}'"'
export GOBUILDFLAGS ?= "-v ${GO_LDFLAGS} -trimpath"
export GOPATH_OMIT_IN_ACTIONID ?= "1"
--
2.29.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-12-15 8:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-15 8:49 [PATCH] go.bbclass: Use external linker for native packages Khem Raj
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox