From: Khem Raj <raj.khem@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: Khem Raj <raj.khem@gmail.com>
Subject: [PATCH v2 3/4] go: Disable pie in cgo for mips
Date: Mon, 28 Mar 2022 11:07:06 -0700 [thread overview]
Message-ID: <20220328180707.3565916-3-raj.khem@gmail.com> (raw)
In-Reply-To: <20220328180707.3565916-1-raj.khem@gmail.com>
This overcomes the linking errors e.g.
| /usr/lib/go/src/cmd/go/internal/base/base.go:110:(.text+0x60fef8): relocation R_MIPS_26 against `a local symbol' cannot be used when making a shared object; recompile with -fPIC | /usr/lib/go/src/cmd/go/internal/base/base.go:110:(.text+0x60ff0c): relocation R_MIPS_HI16 against `a local symbol' cannot be used when making a shared object; recompile with -fPIC
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
meta/recipes-devtools/go/go_1.18.bb | 2 ++
1 file changed, 2 insertions(+)
diff --git a/meta/recipes-devtools/go/go_1.18.bb b/meta/recipes-devtools/go/go_1.18.bb
index a492d7e64a1..98977673ee4 100644
--- a/meta/recipes-devtools/go/go_1.18.bb
+++ b/meta/recipes-devtools/go/go_1.18.bb
@@ -3,6 +3,8 @@ require go-target.inc
inherit linuxloader
+CGO_LDFLAGS:append:mips = " -no-pie"
+
export GO_LDSO = "${@get_linuxloader(d)}"
export CC_FOR_TARGET = "gcc"
export CXX_FOR_TARGET = "g++"
--
2.35.1
next prev parent reply other threads:[~2022-03-28 18:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-28 18:07 [PATCH v2 1/4] go: Upgrade to 1.18 Khem Raj
2022-03-28 18:07 ` [PATCH v2 2/4] go: Drop GOBUILDMODE Khem Raj
2022-03-28 18:07 ` Khem Raj [this message]
2022-03-28 18:07 ` [PATCH v2 4/4] go-target: Pass -trimpath to go linker Khem Raj
2022-03-29 10:14 ` [OE-core] [PATCH v2 1/4] go: Upgrade to 1.18 Alexandre Belloni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220328180707.3565916-3-raj.khem@gmail.com \
--to=raj.khem@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.