From: Jose Quaresma Date: Mon, 6 May 2024 10:20:18 +0000 (+0100) Subject: go: Drop the linkmode completely X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=941c8535eaaca5790c9bc2b3d21d8ce402dbb431;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git go: Drop the linkmode completely This will make possible to restore the default dynamic linking globally which is what we had before the 1.20.X release. Signed-off-by: Jose Quaresma Signed-off-by: Richard Purdie (cherry picked from commit 6ad90fc2fc49c4199a59dfb1c1d81a7ba184a522) Signed-off-by: Jose Quaresma Signed-off-by: Steve Sakoman --- diff --git a/meta/classes-recipe/go.bbclass b/meta/classes-recipe/go.bbclass index cc3564c36a9..d32509aa6d1 100644 --- a/meta/classes-recipe/go.bbclass +++ b/meta/classes-recipe/go.bbclass @@ -48,8 +48,6 @@ GO_RPATH:class-native = "${@'-r ${STAGING_LIBDIR_NATIVE}/go/pkg/${TARGET_GOTUPLE GO_RPATH_LINK:class-native = "${@'-Wl,-rpath-link=${STAGING_LIBDIR_NATIVE}/go/pkg/${TARGET_GOTUPLE}_dynlink' if d.getVar('GO_DYNLINK') else ''}" 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_EXTRA_LDFLAGS ?= "" GO_LINUXLOADER ?= "-I ${@get_linuxloader(d)}" # Use system loader. If uninative is used, the uninative loader will be patched automatically diff --git a/meta/recipes-devtools/go/go-runtime.inc b/meta/recipes-devtools/go/go-runtime.inc index 3f1e795dd9e..413cf6d33f0 100644 --- a/meta/recipes-devtools/go/go-runtime.inc +++ b/meta/recipes-devtools/go/go-runtime.inc @@ -15,7 +15,7 @@ export CGO_LDFLAGS = "${@ ' '.join(filter(lambda f: not f.startswith('-fdebug-pr export GOCACHE = "${B}/.cache" GO_EXTLDFLAGS ?= "${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} ${LDFLAGS}" -GO_SHLIB_LDFLAGS ?= '-ldflags="--linkmode=external -extldflags '${GO_EXTLDFLAGS}'"' +GO_SHLIB_LDFLAGS ?= '-ldflags="-extldflags '${GO_EXTLDFLAGS}'"' do_configure() { :