meta-virtualization.lists.yoctoproject.org archive mirror
 help / color / mirror / Atom feed
From: Chen Qi <Qi.Chen@windriver.com>
To: meta-virtualization@lists.yoctoproject.org
Subject: [meta-virtualization][PATCH V2 9/9] netns: adjust GOROOT, CGO_CFLAGS and CGO_LDFALGS
Date: Sun, 12 Jun 2022 01:00:09 -0700	[thread overview]
Message-ID: <20220612080009.130993-9-Qi.Chen@windriver.com> (raw)
In-Reply-To: <20220612080009.130993-1-Qi.Chen@windriver.com>

Adjust the GOROOT setting as directory specified by the original
one does not exist.

The CGO_CFLAGS and CGO_LDFLAGS should use target flags instead
of the nativesdk ones.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 recipes-networking/netns/netns_git.bb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/recipes-networking/netns/netns_git.bb b/recipes-networking/netns/netns_git.bb
index cd17e1a..a4dcb42 100644
--- a/recipes-networking/netns/netns_git.bb
+++ b/recipes-networking/netns/netns_git.bb
@@ -19,7 +19,7 @@ EXTRA_OEMAKE = "GO='${GO}'"
 
 do_compile() {
 	export GOARCH="${TARGET_GOARCH}"
-	export GOROOT="${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go"
+	export GOROOT="${STAGING_LIBDIR}/go"
 	# Setup vendor directory so that it can be used in GOPATH.
 	#
 	# Go looks in a src directory under any directory in GOPATH but netns
@@ -37,8 +37,8 @@ do_compile() {
 	export CGO_ENABLED="1"
 	export CFLAGS=""
 	export LDFLAGS=""
-	export CGO_CFLAGS="${BUILDSDK_CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
-	export CGO_LDFLAGS="${BUILDSDK_LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
+	export CGO_CFLAGS="${TARGET_CFLAGS}"
+	export CGO_LDFLAGS="${TARGET_LDFLAGS}"
 	export GOFLAGS="-mod=vendor"
 
 	cd ${S}/src/import
-- 
2.36.0



  parent reply	other threads:[~2022-06-12  8:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-12  8:00 [meta-virtualization][PATCH V2 1/9] docker-distribution: fix the inehrit and systemd settings Chen Qi
2022-06-12  8:00 ` [meta-virtualization][PATCH V2 2/9] docker-distribution: fix build error on new hosts Chen Qi
2022-06-12  8:00 ` [meta-virtualization][PATCH V2 3/9] docker-distribution: upgrade to 2.8.1 Chen Qi
2022-06-12  8:00 ` [meta-virtualization][PATCH V2 4/9] skopeo: clean up depends and fix CGO settings Chen Qi
2022-06-12  8:00 ` [meta-virtualization][PATCH V2 5/9] umoci: adjust CGO_CFLAGS and CGO_LDFLAGS settings Chen Qi
2022-06-12  8:00 ` [meta-virtualization][PATCH V2 6/9] oci-runtime-tools: adjust GOROOT, CGO_CFLAGS and CGO_LDFALGS Chen Qi
2022-06-12  8:00 ` [meta-virtualization][PATCH V2 7/9] riddler: " Chen Qi
2022-06-12  8:00 ` [meta-virtualization][PATCH V2 8/9] oci-image-tools: " Chen Qi
2022-06-12  8:00 ` Chen Qi [this message]
2022-06-14 19:50 ` [meta-virtualization][PATCH V2 1/9] docker-distribution: fix the inehrit and systemd settings Bruce Ashfield

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=20220612080009.130993-9-Qi.Chen@windriver.com \
    --to=qi.chen@windriver.com \
    --cc=meta-virtualization@lists.yoctoproject.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;
as well as URLs for NNTP newsgroup(s).