public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Khem Raj <raj.khem@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: Khem Raj <raj.khem@gmail.com>
Subject: [PATCH v2 4/4] go-target: Pass -trimpath to go linker
Date: Mon, 28 Mar 2022 11:07:07 -0700	[thread overview]
Message-ID: <20220328180707.3565916-4-raj.khem@gmail.com> (raw)
In-Reply-To: <20220328180707.3565916-1-raj.khem@gmail.com>

This is for improving reproducibility to trim absolute paths as these
recipes do not inherit go bbclass where it would be set automatically

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/recipes-devtools/go/go-target.inc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-devtools/go/go-target.inc b/meta/recipes-devtools/go/go-target.inc
index d085643036a..aaaaa125f79 100644
--- a/meta/recipes-devtools/go/go-target.inc
+++ b/meta/recipes-devtools/go/go-target.inc
@@ -13,8 +13,8 @@ export CGO_CXXFLAGS = "${CXXFLAGS}"
 export CGO_LDFLAGS = "${@ ' '.join(filter(lambda f: not f.startswith('-fdebug-prefix-map'), d.getVar('LDFLAGS').split())) }"
 
 export GOCACHE = "${B}/.cache"
-GO_LDFLAGS = ""
-GO_LDFLAGS:class-nativesdk = "-linkmode external"
+GO_LDFLAGS = "-trimpath"
+GO_LDFLAGS:append:class-nativesdk = " -linkmode external"
 export GO_LDFLAGS
 
 CC:append:class-nativesdk = " ${SECURITY_NOPIE_CFLAGS}"
-- 
2.35.1



  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 ` [PATCH v2 3/4] go: Disable pie in cgo for mips Khem Raj
2022-03-28 18:07 ` Khem Raj [this message]
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-4-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox