* [dunfell][PATCH 1/2] goarch: map target os to windows for mingw* TARGET_OS
@ 2021-04-06 13:07 Peter Morrow
2021-04-06 13:07 ` [dunfell][PATCH 2/2] go_1.14: don't set -buildmode=pie when building for windows targets Peter Morrow
2021-04-06 15:21 ` [dunfell][PATCH 1/2] goarch: map target os to windows for mingw* TARGET_OS Khem Raj
0 siblings, 2 replies; 5+ messages in thread
From: Peter Morrow @ 2021-04-06 13:07 UTC (permalink / raw)
To: openembedded-core; +Cc: peter.morrow, raj.khem
mingw32/mingw64 is not a supported value for GOOS, so map from 'mingw*' to
'windows' to enable building for windows targets.
Signed-off-by: Peter Morrow <pemorrow@linux.microsoft.com>
---
meta/classes/goarch.bbclass | 2 ++
1 file changed, 2 insertions(+)
diff --git a/meta/classes/goarch.bbclass b/meta/classes/goarch.bbclass
index 1099b95..ecd3044 100644
--- a/meta/classes/goarch.bbclass
+++ b/meta/classes/goarch.bbclass
@@ -114,6 +114,8 @@ def go_map_mips(a, f, d):
def go_map_os(o, d):
if o.startswith('linux'):
return 'linux'
+ elif o.startswith('mingw'):
+ return 'windows'
return o
--
1.8.3.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [dunfell][PATCH 2/2] go_1.14: don't set -buildmode=pie when building for windows targets
2021-04-06 13:07 [dunfell][PATCH 1/2] goarch: map target os to windows for mingw* TARGET_OS Peter Morrow
@ 2021-04-06 13:07 ` Peter Morrow
2021-04-06 15:21 ` Khem Raj
2021-04-06 15:21 ` [dunfell][PATCH 1/2] goarch: map target os to windows for mingw* TARGET_OS Khem Raj
1 sibling, 1 reply; 5+ messages in thread
From: Peter Morrow @ 2021-04-06 13:07 UTC (permalink / raw)
To: openembedded-core; +Cc: peter.morrow, raj.khem
go 1.14 for windows targets does not support -buildmode=pie, disable it and use
the default buildmode instead. Support for -buildmode=pie for windows targets
is added with go 1.15 (https://golang.org/doc/go1.15) which is added to poky in
gatesgarth.
Signed-off-by: Peter Morrow <pemorrow@linux.microsoft.com>
---
meta/classes/go.bbclass | 8 ++++----
meta/recipes-devtools/go/go_1.14.bb | 8 ++++----
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/meta/classes/go.bbclass b/meta/classes/go.bbclass
index a9e31b5..8ff482b 100644
--- a/meta/classes/go.bbclass
+++ b/meta/classes/go.bbclass
@@ -144,11 +144,11 @@ FILES_${PN}-staticdev = "${libdir}/go/pkg"
INSANE_SKIP_${PN} += "ldflags"
-# Add -buildmode=pie to GOBUILDFLAGS to satisfy "textrel" QA checking, but mips
-# doesn't support -buildmode=pie, so skip the QA checking for mips and its
-# variants.
+# Add -buildmode=pie to GOBUILDFLAGS to satisfy "textrel" QA checking, but
+# windows/mips/riscv doesn't support -buildmode=pie, so skip the QA checking
+# for windows/mips/riscv and their variants.
python() {
- if 'mips' in d.getVar('TARGET_ARCH') or 'riscv' in d.getVar('TARGET_ARCH'):
+ if 'mips' in d.getVar('TARGET_ARCH') or 'riscv' in d.getVar('TARGET_ARCH') or 'windows' in d.getVar('TARGET_GOOS'):
d.appendVar('INSANE_SKIP_%s' % d.getVar('PN'), " textrel")
else:
d.appendVar('GOBUILDFLAGS', ' -buildmode=pie')
diff --git a/meta/recipes-devtools/go/go_1.14.bb b/meta/recipes-devtools/go/go_1.14.bb
index bc90a13..c175279 100644
--- a/meta/recipes-devtools/go/go_1.14.bb
+++ b/meta/recipes-devtools/go/go_1.14.bb
@@ -3,11 +3,11 @@ require go-target.inc
export GOBUILDMODE=""
export CGO_ENABLED_riscv64 = ""
-# Add pie to GOBUILDMODE to satisfy "textrel" QA checking, but mips/riscv
-# doesn't support -buildmode=pie, so skip the QA checking for mips/riscv and its
-# variants.
+# Add pie to GOBUILDMODE to satisfy "textrel" QA checking, but
+# windows/mips/riscv doesn't support -buildmode=pie, so skip the QA checking
+# for windows/mips/riscv and their variants.
python() {
- if 'mips' in d.getVar('TARGET_ARCH',True) or 'riscv' in d.getVar('TARGET_ARCH',True):
+ if 'mips' in d.getVar('TARGET_ARCH',True) or 'riscv' in d.getVar('TARGET_ARCH',True) or 'windows' in d.getVar('TARGET_GOOS', True):
d.appendVar('INSANE_SKIP_%s' % d.getVar('PN',True), " textrel")
else:
d.setVar('GOBUILDMODE', 'pie')
--
1.8.3.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [dunfell][PATCH 2/2] go_1.14: don't set -buildmode=pie when building for windows targets
2021-04-06 13:07 ` [dunfell][PATCH 2/2] go_1.14: don't set -buildmode=pie when building for windows targets Peter Morrow
@ 2021-04-06 15:21 ` Khem Raj
0 siblings, 0 replies; 5+ messages in thread
From: Khem Raj @ 2021-04-06 15:21 UTC (permalink / raw)
To: Peter Morrow; +Cc: openembedded-core, peter.morrow
[-- Attachment #1: Type: text/plain, Size: 2774 bytes --]
This looks good to me
On Tue, Apr 6, 2021 at 6:08 AM Peter Morrow <pemorrow@linux.microsoft.com>
wrote:
> go 1.14 for windows targets does not support -buildmode=pie, disable it
> and use
> the default buildmode instead. Support for -buildmode=pie for windows
> targets
> is added with go 1.15 (https://golang.org/doc/go1.15) which is added to
> poky in
> gatesgarth.
>
> Signed-off-by: Peter Morrow <pemorrow@linux.microsoft.com>
> ---
> meta/classes/go.bbclass | 8 ++++----
> meta/recipes-devtools/go/go_1.14.bb | 8 ++++----
> 2 files changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/meta/classes/go.bbclass b/meta/classes/go.bbclass
> index a9e31b5..8ff482b 100644
> --- a/meta/classes/go.bbclass
> +++ b/meta/classes/go.bbclass
> @@ -144,11 +144,11 @@ FILES_${PN}-staticdev = "${libdir}/go/pkg"
>
> INSANE_SKIP_${PN} += "ldflags"
>
> -# Add -buildmode=pie to GOBUILDFLAGS to satisfy "textrel" QA checking,
> but mips
> -# doesn't support -buildmode=pie, so skip the QA checking for mips and its
> -# variants.
> +# Add -buildmode=pie to GOBUILDFLAGS to satisfy "textrel" QA checking, but
> +# windows/mips/riscv doesn't support -buildmode=pie, so skip the QA
> checking
> +# for windows/mips/riscv and their variants.
> python() {
> - if 'mips' in d.getVar('TARGET_ARCH') or 'riscv' in
> d.getVar('TARGET_ARCH'):
> + if 'mips' in d.getVar('TARGET_ARCH') or 'riscv' in
> d.getVar('TARGET_ARCH') or 'windows' in d.getVar('TARGET_GOOS'):
> d.appendVar('INSANE_SKIP_%s' % d.getVar('PN'), " textrel")
> else:
> d.appendVar('GOBUILDFLAGS', ' -buildmode=pie')
> diff --git a/meta/recipes-devtools/go/go_1.14.bb
> b/meta/recipes-devtools/go/go_1.14.bb
> index bc90a13..c175279 100644
> --- a/meta/recipes-devtools/go/go_1.14.bb
> +++ b/meta/recipes-devtools/go/go_1.14.bb
> @@ -3,11 +3,11 @@ require go-target.inc
>
> export GOBUILDMODE=""
> export CGO_ENABLED_riscv64 = ""
> -# Add pie to GOBUILDMODE to satisfy "textrel" QA checking, but mips/riscv
> -# doesn't support -buildmode=pie, so skip the QA checking for mips/riscv
> and its
> -# variants.
> +# Add pie to GOBUILDMODE to satisfy "textrel" QA checking, but
> +# windows/mips/riscv doesn't support -buildmode=pie, so skip the QA
> checking
> +# for windows/mips/riscv and their variants.
> python() {
> - if 'mips' in d.getVar('TARGET_ARCH',True) or 'riscv' in
> d.getVar('TARGET_ARCH',True):
> + if 'mips' in d.getVar('TARGET_ARCH',True) or 'riscv' in
> d.getVar('TARGET_ARCH',True) or 'windows' in d.getVar('TARGET_GOOS', True):
> d.appendVar('INSANE_SKIP_%s' % d.getVar('PN',True), " textrel")
> else:
> d.setVar('GOBUILDMODE', 'pie')
> --
> 1.8.3.1
>
>
[-- Attachment #2: Type: text/html, Size: 3991 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dunfell][PATCH 1/2] goarch: map target os to windows for mingw* TARGET_OS
2021-04-06 13:07 [dunfell][PATCH 1/2] goarch: map target os to windows for mingw* TARGET_OS Peter Morrow
2021-04-06 13:07 ` [dunfell][PATCH 2/2] go_1.14: don't set -buildmode=pie when building for windows targets Peter Morrow
@ 2021-04-06 15:21 ` Khem Raj
2021-04-09 9:31 ` Peter Morrow
1 sibling, 1 reply; 5+ messages in thread
From: Khem Raj @ 2021-04-06 15:21 UTC (permalink / raw)
To: Peter Morrow; +Cc: openembedded-core, peter.morrow
[-- Attachment #1: Type: text/plain, Size: 802 bytes --]
Lgtm
On Tue, Apr 6, 2021 at 6:08 AM Peter Morrow <pemorrow@linux.microsoft.com>
wrote:
> mingw32/mingw64 is not a supported value for GOOS, so map from 'mingw*' to
> 'windows' to enable building for windows targets.
>
> Signed-off-by: Peter Morrow <pemorrow@linux.microsoft.com>
> ---
> meta/classes/goarch.bbclass | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/meta/classes/goarch.bbclass b/meta/classes/goarch.bbclass
> index 1099b95..ecd3044 100644
> --- a/meta/classes/goarch.bbclass
> +++ b/meta/classes/goarch.bbclass
> @@ -114,6 +114,8 @@ def go_map_mips(a, f, d):
> def go_map_os(o, d):
> if o.startswith('linux'):
> return 'linux'
> + elif o.startswith('mingw'):
> + return 'windows'
> return o
>
>
> --
> 1.8.3.1
>
>
[-- Attachment #2: Type: text/html, Size: 1271 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dunfell][PATCH 1/2] goarch: map target os to windows for mingw* TARGET_OS
2021-04-06 15:21 ` [dunfell][PATCH 1/2] goarch: map target os to windows for mingw* TARGET_OS Khem Raj
@ 2021-04-09 9:31 ` Peter Morrow
0 siblings, 0 replies; 5+ messages in thread
From: Peter Morrow @ 2021-04-09 9:31 UTC (permalink / raw)
To: Khem Raj; +Cc: openembedded-core, peter.morrow
On Tue, Apr 06, 2021 at 08:21:59AM -0700, Khem Raj wrote:
> Lgtm
Thanks Khem!
Peter.
>
> On Tue, Apr 6, 2021 at 6:08 AM Peter Morrow <pemorrow@linux.microsoft.com>
> wrote:
>
> > mingw32/mingw64 is not a supported value for GOOS, so map from 'mingw*' to
> > 'windows' to enable building for windows targets.
> >
> > Signed-off-by: Peter Morrow <pemorrow@linux.microsoft.com>
> > ---
> > meta/classes/goarch.bbclass | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/meta/classes/goarch.bbclass b/meta/classes/goarch.bbclass
> > index 1099b95..ecd3044 100644
> > --- a/meta/classes/goarch.bbclass
> > +++ b/meta/classes/goarch.bbclass
> > @@ -114,6 +114,8 @@ def go_map_mips(a, f, d):
> > def go_map_os(o, d):
> > if o.startswith('linux'):
> > return 'linux'
> > + elif o.startswith('mingw'):
> > + return 'windows'
> > return o
> >
> >
> > --
> > 1.8.3.1
> >
> >
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-04-09 9:31 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-06 13:07 [dunfell][PATCH 1/2] goarch: map target os to windows for mingw* TARGET_OS Peter Morrow
2021-04-06 13:07 ` [dunfell][PATCH 2/2] go_1.14: don't set -buildmode=pie when building for windows targets Peter Morrow
2021-04-06 15:21 ` Khem Raj
2021-04-06 15:21 ` [dunfell][PATCH 1/2] goarch: map target os to windows for mingw* TARGET_OS Khem Raj
2021-04-09 9:31 ` Peter Morrow
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.