meta-virtualization.lists.yoctoproject.org archive mirror
 help / color / mirror / Atom feed
* [meta-virtualization][PATCH 1/5] umoci: adjust inherit and fix CGO settings
@ 2022-06-10  9:45 Chen Qi
  2022-06-10  9:45 ` [meta-virtualization][PATCH 2/5] oci-runtime-tools: " Chen Qi
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Chen Qi @ 2022-06-10  9:45 UTC (permalink / raw)
  To: meta-virtualization

go.bbclass already inherits goarch.bbclass.

The CGO_CFLAGS and CGO_LDFLAGS should use target flags as set in
oe-core's go.bbclass, not the SDK related ones.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 recipes-containers/umoci/umoci_git.bb | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/recipes-containers/umoci/umoci_git.bb b/recipes-containers/umoci/umoci_git.bb
index a2c0827..525a967 100644
--- a/recipes-containers/umoci/umoci_git.bb
+++ b/recipes-containers/umoci/umoci_git.bb
@@ -14,7 +14,6 @@ PV = "v0.4.7-dev+git${SRCPV}"
 S = "${WORKDIR}/github.com/opencontainers/umoci"
 GO_IMPORT = "github.com/opencontainers/umoci"
 
-inherit goarch
 inherit go
 
 # This disables seccomp and apparmor, which are on by default in the
@@ -53,7 +52,6 @@ do_compile:class-native () {
 }
 
 do_compile() {
-    export GOARCH="${TARGET_GOARCH}"
     export GOPATH="${WORKDIR}/git/"
 
     # Pass the needed cflags/ldflags so that cgo
@@ -61,8 +59,6 @@ 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 GO111MODULE=off
 
-- 
2.36.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [meta-virtualization][PATCH 2/5] oci-runtime-tools: adjust inherit and fix CGO settings
  2022-06-10  9:45 [meta-virtualization][PATCH 1/5] umoci: adjust inherit and fix CGO settings Chen Qi
@ 2022-06-10  9:45 ` Chen Qi
  2022-06-10 12:55   ` Bruce Ashfield
  2022-06-10  9:45 ` [meta-virtualization][PATCH 3/5] riddler: " Chen Qi
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 6+ messages in thread
From: Chen Qi @ 2022-06-10  9:45 UTC (permalink / raw)
  To: meta-virtualization

go.bbclass already inherits goarch.bbclass.

The CGO_CFLAGS and CGO_LDFLAGS should use target flags as set in
oe-core's go.bbclass, not the SDK related ones.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 .../oci-runtime-tools/oci-runtime-tools_git.bb               | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/recipes-containers/oci-runtime-tools/oci-runtime-tools_git.bb b/recipes-containers/oci-runtime-tools/oci-runtime-tools_git.bb
index 838d24b..b953ab4 100644
--- a/recipes-containers/oci-runtime-tools/oci-runtime-tools_git.bb
+++ b/recipes-containers/oci-runtime-tools/oci-runtime-tools_git.bb
@@ -13,12 +13,9 @@ GO_IMPORT = "import"
 
 INSANE_SKIP:${PN} += "ldflags textrel"
 
-inherit goarch
 inherit go
 
 do_compile() {
-	export GOARCH="${TARGET_GOARCH}"
-	export GOROOT="${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go"
 	export GOPATH="${S}/src/import:${S}/src/import/vendor"
 
 	# Pass the needed cflags/ldflags so that cgo
@@ -26,8 +23,6 @@ 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 GO111MODULE=off
 
 	# fixes:
-- 
2.36.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [meta-virtualization][PATCH 3/5] riddler: adjust inherit and fix CGO settings
  2022-06-10  9:45 [meta-virtualization][PATCH 1/5] umoci: adjust inherit and fix CGO settings Chen Qi
  2022-06-10  9:45 ` [meta-virtualization][PATCH 2/5] oci-runtime-tools: " Chen Qi
@ 2022-06-10  9:45 ` Chen Qi
  2022-06-10  9:45 ` [meta-virtualization][PATCH 4/5] oci-image-tools: " Chen Qi
  2022-06-10  9:45 ` [meta-virtualization][PATCH 5/5] netns: " Chen Qi
  3 siblings, 0 replies; 6+ messages in thread
From: Chen Qi @ 2022-06-10  9:45 UTC (permalink / raw)
  To: meta-virtualization

go.bbclass already inherits goarch.bbclass.

The CGO_CFLAGS and CGO_LDFLAGS should use target flags as set in
oe-core's go.bbclass, not the SDK related ones.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 recipes-containers/riddler/riddler_git.bb | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/recipes-containers/riddler/riddler_git.bb b/recipes-containers/riddler/riddler_git.bb
index be751d6..d92e732 100644
--- a/recipes-containers/riddler/riddler_git.bb
+++ b/recipes-containers/riddler/riddler_git.bb
@@ -13,7 +13,6 @@ GO_IMPORT = "import"
 
 S = "${WORKDIR}/git"
 
-inherit goarch
 inherit go
 
 # In addition to hosts go does not like, we do not build for mips.
@@ -25,8 +24,6 @@ COMPATIBLE_HOST:mipsarch = "null"
 EXTRA_OEMAKE="BUILDTAGS=''"
 
 do_compile() {
-	export GOARCH="${TARGET_GOARCH}"
-	export GOROOT="${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go"
 	# Setup vendor directory so that it can be used in GOPATH.
 	#
 	# Go looks in a src directory under any directory in GOPATH but riddler
@@ -44,8 +41,6 @@ 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 GO111MODULE=off
 
 	cd ${S}/src/import
-- 
2.36.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [meta-virtualization][PATCH 4/5] oci-image-tools: adjust inherit and fix CGO settings
  2022-06-10  9:45 [meta-virtualization][PATCH 1/5] umoci: adjust inherit and fix CGO settings Chen Qi
  2022-06-10  9:45 ` [meta-virtualization][PATCH 2/5] oci-runtime-tools: " Chen Qi
  2022-06-10  9:45 ` [meta-virtualization][PATCH 3/5] riddler: " Chen Qi
@ 2022-06-10  9:45 ` Chen Qi
  2022-06-10  9:45 ` [meta-virtualization][PATCH 5/5] netns: " Chen Qi
  3 siblings, 0 replies; 6+ messages in thread
From: Chen Qi @ 2022-06-10  9:45 UTC (permalink / raw)
  To: meta-virtualization

go.bbclass already inherits goarch.bbclass.

The CGO_CFLAGS and CGO_LDFLAGS should use target flags as set in
oe-core's go.bbclass, not the SDK related ones.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 recipes-containers/oci-image-tools/oci-image-tools_git.bb | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/recipes-containers/oci-image-tools/oci-image-tools_git.bb b/recipes-containers/oci-image-tools/oci-image-tools_git.bb
index 8bafd2a..5d2f7c9 100644
--- a/recipes-containers/oci-image-tools/oci-image-tools_git.bb
+++ b/recipes-containers/oci-image-tools/oci-image-tools_git.bb
@@ -20,7 +20,6 @@ SRCREV = "11f9988298305d36f64248a6ee55318e60bf170b"
 PV = "1.0.0-rc3+git${SRCPV}"
 GO_IMPORT = "import"
 
-inherit goarch
 inherit go
 
 # This disables seccomp and apparmor, which are on by default in the
@@ -28,8 +27,6 @@ inherit go
 EXTRA_OEMAKE="BUILDTAGS=''"
 
 do_compile() {
-	export GOARCH="${TARGET_GOARCH}"
-	export GOROOT="${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go"
 	# Setup vendor directory so that it can be used in GOPATH.
 	#
 	# Go looks in a src directory under any directory in GOPATH but riddler
@@ -48,8 +45,6 @@ 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 GO111MODULE=off
 
 	cd ${S}/src/import
-- 
2.36.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [meta-virtualization][PATCH 5/5] netns: adjust inherit and fix CGO settings
  2022-06-10  9:45 [meta-virtualization][PATCH 1/5] umoci: adjust inherit and fix CGO settings Chen Qi
                   ` (2 preceding siblings ...)
  2022-06-10  9:45 ` [meta-virtualization][PATCH 4/5] oci-image-tools: " Chen Qi
@ 2022-06-10  9:45 ` Chen Qi
  3 siblings, 0 replies; 6+ messages in thread
From: Chen Qi @ 2022-06-10  9:45 UTC (permalink / raw)
  To: meta-virtualization

go.bbclass already inherits goarch.bbclass.

The CGO_CFLAGS and CGO_LDFLAGS should use target flags as set in
oe-core's go.bbclass, not the SDK related ones.

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

diff --git a/recipes-networking/netns/netns_git.bb b/recipes-networking/netns/netns_git.bb
index cd17e1a..cf5ce39 100644
--- a/recipes-networking/netns/netns_git.bb
+++ b/recipes-networking/netns/netns_git.bb
@@ -12,14 +12,11 @@ GO_IMPORT = "import"
 
 S = "${WORKDIR}/git"
 
-inherit goarch
 inherit go
 
 EXTRA_OEMAKE = "GO='${GO}'"
 
 do_compile() {
-	export GOARCH="${TARGET_GOARCH}"
-	export GOROOT="${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/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 +34,6 @@ 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 GOFLAGS="-mod=vendor"
 
 	cd ${S}/src/import
-- 
2.36.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [meta-virtualization][PATCH 2/5] oci-runtime-tools: adjust inherit and fix CGO settings
  2022-06-10  9:45 ` [meta-virtualization][PATCH 2/5] oci-runtime-tools: " Chen Qi
@ 2022-06-10 12:55   ` Bruce Ashfield
  0 siblings, 0 replies; 6+ messages in thread
From: Bruce Ashfield @ 2022-06-10 12:55 UTC (permalink / raw)
  To: Chen Qi; +Cc: meta-virtualization

On Fri, Jun 10, 2022 at 5:45 AM Chen Qi <Qi.Chen@windriver.com> wrote:
>
> go.bbclass already inherits goarch.bbclass.
>
> The CGO_CFLAGS and CGO_LDFLAGS should use target flags as set in
> oe-core's go.bbclass, not the SDK related ones.

While that may be true, I've had significant issues with the go
bbclass in the past, so I'm going to keep all of the explicit flag
setting.

Feel free to send adjustments to the flags, but I won't be dropping them.

Bruce

>
> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> ---
>  .../oci-runtime-tools/oci-runtime-tools_git.bb               | 5 -----
>  1 file changed, 5 deletions(-)
>
> diff --git a/recipes-containers/oci-runtime-tools/oci-runtime-tools_git.bb b/recipes-containers/oci-runtime-tools/oci-runtime-tools_git.bb
> index 838d24b..b953ab4 100644
> --- a/recipes-containers/oci-runtime-tools/oci-runtime-tools_git.bb
> +++ b/recipes-containers/oci-runtime-tools/oci-runtime-tools_git.bb
> @@ -13,12 +13,9 @@ GO_IMPORT = "import"
>
>  INSANE_SKIP:${PN} += "ldflags textrel"
>
> -inherit goarch
>  inherit go
>
>  do_compile() {
> -       export GOARCH="${TARGET_GOARCH}"
> -       export GOROOT="${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go"
>         export GOPATH="${S}/src/import:${S}/src/import/vendor"
>
>         # Pass the needed cflags/ldflags so that cgo
> @@ -26,8 +23,6 @@ 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 GO111MODULE=off
>
>         # fixes:
> --
> 2.36.0
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#7359): https://lists.yoctoproject.org/g/meta-virtualization/message/7359
> Mute This Topic: https://lists.yoctoproject.org/mt/91664849/1050810
> Group Owner: meta-virtualization+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [bruce.ashfield@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


-- 
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-06-10 12:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-10  9:45 [meta-virtualization][PATCH 1/5] umoci: adjust inherit and fix CGO settings Chen Qi
2022-06-10  9:45 ` [meta-virtualization][PATCH 2/5] oci-runtime-tools: " Chen Qi
2022-06-10 12:55   ` Bruce Ashfield
2022-06-10  9:45 ` [meta-virtualization][PATCH 3/5] riddler: " Chen Qi
2022-06-10  9:45 ` [meta-virtualization][PATCH 4/5] oci-image-tools: " Chen Qi
2022-06-10  9:45 ` [meta-virtualization][PATCH 5/5] netns: " Chen Qi

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).