[meta-mingw] Override SDK_VENDOR

Submitted by Samuli Piippo on Sept. 18, 2020, 12:29 p.m. | Patch ID: 176638

Details

Message ID 20200918122951.23340-1-samuli.piippo@qt.io
State New
Headers show

Commit Message

Samuli Piippo Sept. 18, 2020, 12:29 p.m.
Set SDK_VENDOR to '-w64', which makes the host triplet match what GCC
expect to find when using mingw32-w64. This enables features that are
not functional in the classic mingw32, but have been implemented in the
mingw32-w64.

Disable 32bit libs from the runtime component when compiling for 64bit,
which were enabled as a side effect of the GCC config change.

Signed-off-by: Samuli Piippo <samuli.piippo@qt.io>
---
 conf/machine-sdk/include/mingw32-common.inc                    | 3 +++
 .../mingw-w64/nativesdk-mingw-w64-runtime_7.0.0.bb             | 2 ++
 2 files changed, 5 insertions(+)

Patch hide | download patch | download mbox

diff --git a/conf/machine-sdk/include/mingw32-common.inc b/conf/machine-sdk/include/mingw32-common.inc
index 9011ded..bc6c91e 100644
--- a/conf/machine-sdk/include/mingw32-common.inc
+++ b/conf/machine-sdk/include/mingw32-common.inc
@@ -1,4 +1,7 @@ 
 SDK_OS = "mingw32"
+SDK_VENDOR_mingw32 = "-w64"
+SDK_VENDOR_sdkmingw32 = "-w64"
+
 NATIVESDKLIBC = "libc-mingw"
 
 PREFERRED_PROVIDER_virtual/nativesdk-${SDK_PREFIX}libc-for-gcc_mingw32 = "nativesdk-mingw-w64-runtime"
diff --git a/recipes-devtools/mingw-w64/nativesdk-mingw-w64-runtime_7.0.0.bb b/recipes-devtools/mingw-w64/nativesdk-mingw-w64-runtime_7.0.0.bb
index cf39c6a..9f79ffe 100644
--- a/recipes-devtools/mingw-w64/nativesdk-mingw-w64-runtime_7.0.0.bb
+++ b/recipes-devtools/mingw-w64/nativesdk-mingw-w64-runtime_7.0.0.bb
@@ -19,6 +19,8 @@  PROVIDES += "virtual/nativesdk-libintl"
 
 TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TARGET}"
 
+EXTRA_OECONF_x86-64 = "--disable-lib32"
+
 do_configure() {
     oe_runconf
 }

Comments

Joshua Watt Sept. 21, 2020, 12:53 p.m.
On Fri, Sep 18, 2020 at 7:30 AM Samuli Piippo <samuli.piippo@qt.io> wrote:
>
> Set SDK_VENDOR to '-w64', which makes the host triplet match what GCC
> expect to find when using mingw32-w64. This enables features that are
> not functional in the classic mingw32, but have been implemented in the
> mingw32-w64.

Does this enable it for the i686 toolchain also? Does that make sense?

>
> Disable 32bit libs from the runtime component when compiling for 64bit,
> which were enabled as a side effect of the GCC config change.
>
> Signed-off-by: Samuli Piippo <samuli.piippo@qt.io>
> ---
>  conf/machine-sdk/include/mingw32-common.inc                    | 3 +++
>  .../mingw-w64/nativesdk-mingw-w64-runtime_7.0.0.bb             | 2 ++
>  2 files changed, 5 insertions(+)
>
> diff --git a/conf/machine-sdk/include/mingw32-common.inc b/conf/machine-sdk/include/mingw32-common.inc
> index 9011ded..bc6c91e 100644
> --- a/conf/machine-sdk/include/mingw32-common.inc
> +++ b/conf/machine-sdk/include/mingw32-common.inc
> @@ -1,4 +1,7 @@
>  SDK_OS = "mingw32"
> +SDK_VENDOR_mingw32 = "-w64"
> +SDK_VENDOR_sdkmingw32 = "-w64"
> +
>  NATIVESDKLIBC = "libc-mingw"
>
>  PREFERRED_PROVIDER_virtual/nativesdk-${SDK_PREFIX}libc-for-gcc_mingw32 = "nativesdk-mingw-w64-runtime"
> diff --git a/recipes-devtools/mingw-w64/nativesdk-mingw-w64-runtime_7.0.0.bb b/recipes-devtools/mingw-w64/nativesdk-mingw-w64-runtime_7.0.0.bb
> index cf39c6a..9f79ffe 100644
> --- a/recipes-devtools/mingw-w64/nativesdk-mingw-w64-runtime_7.0.0.bb
> +++ b/recipes-devtools/mingw-w64/nativesdk-mingw-w64-runtime_7.0.0.bb
> @@ -19,6 +19,8 @@ PROVIDES += "virtual/nativesdk-libintl"
>
>  TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TARGET}"
>
> +EXTRA_OECONF_x86-64 = "--disable-lib32"
> +
>  do_configure() {
>      oe_runconf
>  }
> --
> 2.17.1
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#50751): https://lists.yoctoproject.org/g/yocto/message/50751
Mute This Topic: https://lists.yoctoproject.org/mt/76929287/3617530
Group Owner: yocto+owner@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [oe-patchwork@oe-patch.openembedded.org]
-=-=-=-=-=-=-=-=-=-=-=-
Samuli Piippo Sept. 21, 2020, 1:12 p.m.
On Mon, 21 Sep 2020 at 15:53, Joshua Watt <JPEWhacker@gmail.com> wrote:

> On Fri, Sep 18, 2020 at 7:30 AM Samuli Piippo <samuli.piippo@qt.io> wrote:
> >
> > Set SDK_VENDOR to '-w64', which makes the host triplet match what GCC
> > expect to find when using mingw32-w64. This enables features that are
> > not functional in the classic mingw32, but have been implemented in the
> > mingw32-w64.
>
> Does this enable it for the i686 toolchain also? Does that make sense?
>

This enables it for both x86_64-mingw32 and i686-mingw32 targets and it
makes sense
since it's not about the target bitness but the mingw implementation. w64
has support
for both targets and provides improved support over the original mingw32.


> >
> > Disable 32bit libs from the runtime component when compiling for 64bit,
> > which were enabled as a side effect of the GCC config change.
> >
> > Signed-off-by: Samuli Piippo <samuli.piippo@qt.io>
> > ---
> >  conf/machine-sdk/include/mingw32-common.inc                    | 3 +++
> >  .../mingw-w64/nativesdk-mingw-w64-runtime_7.0.0.bb             | 2 ++
> >  2 files changed, 5 insertions(+)
> >
> > diff --git a/conf/machine-sdk/include/mingw32-common.inc
> b/conf/machine-sdk/include/mingw32-common.inc
> > index 9011ded..bc6c91e 100644
> > --- a/conf/machine-sdk/include/mingw32-common.inc
> > +++ b/conf/machine-sdk/include/mingw32-common.inc
> > @@ -1,4 +1,7 @@
> >  SDK_OS = "mingw32"
> > +SDK_VENDOR_mingw32 = "-w64"
> > +SDK_VENDOR_sdkmingw32 = "-w64"
> > +
> >  NATIVESDKLIBC = "libc-mingw"
> >
> >  PREFERRED_PROVIDER_virtual/nativesdk-${SDK_PREFIX}libc-for-gcc_mingw32
> = "nativesdk-mingw-w64-runtime"
> > diff --git a/recipes-devtools/mingw-w64/
> nativesdk-mingw-w64-runtime_7.0.0.bb b/recipes-devtools/mingw-w64/
> nativesdk-mingw-w64-runtime_7.0.0.bb
> > index cf39c6a..9f79ffe 100644
> > --- a/recipes-devtools/mingw-w64/nativesdk-mingw-w64-runtime_7.0.0.bb
> > +++ b/recipes-devtools/mingw-w64/nativesdk-mingw-w64-runtime_7.0.0.bb
> > @@ -19,6 +19,8 @@ PROVIDES += "virtual/nativesdk-libintl"
> >
> >  TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TARGET}"
> >
> > +EXTRA_OECONF_x86-64 = "--disable-lib32"
> > +
> >  do_configure() {
> >      oe_runconf
> >  }
> > --
> > 2.17.1
> >
>
> 
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#50752): https://lists.yoctoproject.org/g/yocto/message/50752
Mute This Topic: https://lists.yoctoproject.org/mt/76929287/3617530
Group Owner: yocto+owner@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [oe-patchwork@oe-patch.openembedded.org]
-=-=-=-=-=-=-=-=-=-=-=-
Joshua Watt Sept. 21, 2020, 1:14 p.m.
On Mon, Sep 21, 2020, 8:12 AM Samuli Piippo <samuli.piippo@gmail.com> wrote:

>
> On Mon, 21 Sep 2020 at 15:53, Joshua Watt <JPEWhacker@gmail.com> wrote:
>
>> On Fri, Sep 18, 2020 at 7:30 AM Samuli Piippo <samuli.piippo@qt.io>
>> wrote:
>> >
>> > Set SDK_VENDOR to '-w64', which makes the host triplet match what GCC
>> > expect to find when using mingw32-w64. This enables features that are
>> > not functional in the classic mingw32, but have been implemented in the
>> > mingw32-w64.
>>
>> Does this enable it for the i686 toolchain also? Does that make sense?
>>
>
> This enables it for both x86_64-mingw32 and i686-mingw32 targets and it
> makes sense
> since it's not about the target bitness but the mingw implementation. w64
> has support
> for both targets and provides improved support over the original mingw32.
>

Thanks. I figured that was the case. This is testing on the AB.


>
>> >
>> > Disable 32bit libs from the runtime component when compiling for 64bit,
>> > which were enabled as a side effect of the GCC config change.
>> >
>> > Signed-off-by: Samuli Piippo <samuli.piippo@qt.io>
>> > ---
>> >  conf/machine-sdk/include/mingw32-common.inc                    | 3 +++
>> >  .../mingw-w64/nativesdk-mingw-w64-runtime_7.0.0.bb             | 2 ++
>> >  2 files changed, 5 insertions(+)
>> >
>> > diff --git a/conf/machine-sdk/include/mingw32-common.inc
>> b/conf/machine-sdk/include/mingw32-common.inc
>> > index 9011ded..bc6c91e 100644
>> > --- a/conf/machine-sdk/include/mingw32-common.inc
>> > +++ b/conf/machine-sdk/include/mingw32-common.inc
>> > @@ -1,4 +1,7 @@
>> >  SDK_OS = "mingw32"
>> > +SDK_VENDOR_mingw32 = "-w64"
>> > +SDK_VENDOR_sdkmingw32 = "-w64"
>> > +
>> >  NATIVESDKLIBC = "libc-mingw"
>> >
>> >  PREFERRED_PROVIDER_virtual/nativesdk-${SDK_PREFIX}libc-for-gcc_mingw32
>> = "nativesdk-mingw-w64-runtime"
>> > diff --git a/recipes-devtools/mingw-w64/
>> nativesdk-mingw-w64-runtime_7.0.0.bb b/recipes-devtools/mingw-w64/
>> nativesdk-mingw-w64-runtime_7.0.0.bb
>> > index cf39c6a..9f79ffe 100644
>> > --- a/recipes-devtools/mingw-w64/nativesdk-mingw-w64-runtime_7.0.0.bb
>> > +++ b/recipes-devtools/mingw-w64/nativesdk-mingw-w64-runtime_7.0.0.bb
>> > @@ -19,6 +19,8 @@ PROVIDES += "virtual/nativesdk-libintl"
>> >
>> >  TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TARGET}"
>> >
>> > +EXTRA_OECONF_x86-64 = "--disable-lib32"
>> > +
>> >  do_configure() {
>> >      oe_runconf
>> >  }
>> > --
>> > 2.17.1
>> >
>>
>> 
>>
>>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#50753): https://lists.yoctoproject.org/g/yocto/message/50753
Mute This Topic: https://lists.yoctoproject.org/mt/76929287/3617530
Group Owner: yocto+owner@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [oe-patchwork@oe-patch.openembedded.org]
-=-=-=-=-=-=-=-=-=-=-=-
Christopher Larson Sept. 23, 2020, 7:25 p.m.
Assuming AB success, is this also suitable for stable branches like dunfell?

On Mon, Sep 21, 2020 at 6:21 AM Joshua Watt <JPEWhacker@gmail.com> wrote:

>
>
> On Mon, Sep 21, 2020, 8:12 AM Samuli Piippo <samuli.piippo@gmail.com>
> wrote:
>
>>
>> On Mon, 21 Sep 2020 at 15:53, Joshua Watt <JPEWhacker@gmail.com> wrote:
>>
>>> On Fri, Sep 18, 2020 at 7:30 AM Samuli Piippo <samuli.piippo@qt.io>
>>> wrote:
>>> >
>>> > Set SDK_VENDOR to '-w64', which makes the host triplet match what GCC
>>> > expect to find when using mingw32-w64. This enables features that are
>>> > not functional in the classic mingw32, but have been implemented in the
>>> > mingw32-w64.
>>>
>>> Does this enable it for the i686 toolchain also? Does that make sense?
>>>
>>
>> This enables it for both x86_64-mingw32 and i686-mingw32 targets and it
>> makes sense
>> since it's not about the target bitness but the mingw implementation. w64
>> has support
>> for both targets and provides improved support over the original mingw32.
>>
>
> Thanks. I figured that was the case. This is testing on the AB.
>
>
>>
>>> >
>>> > Disable 32bit libs from the runtime component when compiling for 64bit,
>>> > which were enabled as a side effect of the GCC config change.
>>> >
>>> > Signed-off-by: Samuli Piippo <samuli.piippo@qt.io>
>>> > ---
>>> >  conf/machine-sdk/include/mingw32-common.inc                    | 3 +++
>>> >  .../mingw-w64/nativesdk-mingw-w64-runtime_7.0.0.bb             | 2 ++
>>> >  2 files changed, 5 insertions(+)
>>> >
>>> > diff --git a/conf/machine-sdk/include/mingw32-common.inc
>>> b/conf/machine-sdk/include/mingw32-common.inc
>>> > index 9011ded..bc6c91e 100644
>>> > --- a/conf/machine-sdk/include/mingw32-common.inc
>>> > +++ b/conf/machine-sdk/include/mingw32-common.inc
>>> > @@ -1,4 +1,7 @@
>>> >  SDK_OS = "mingw32"
>>> > +SDK_VENDOR_mingw32 = "-w64"
>>> > +SDK_VENDOR_sdkmingw32 = "-w64"
>>> > +
>>> >  NATIVESDKLIBC = "libc-mingw"
>>> >
>>> >
>>> PREFERRED_PROVIDER_virtual/nativesdk-${SDK_PREFIX}libc-for-gcc_mingw32 =
>>> "nativesdk-mingw-w64-runtime"
>>> > diff --git a/recipes-devtools/mingw-w64/
>>> nativesdk-mingw-w64-runtime_7.0.0.bb b/recipes-devtools/mingw-w64/
>>> nativesdk-mingw-w64-runtime_7.0.0.bb
>>> > index cf39c6a..9f79ffe 100644
>>> > --- a/recipes-devtools/mingw-w64/nativesdk-mingw-w64-runtime_7.0.0.bb
>>> > +++ b/recipes-devtools/mingw-w64/nativesdk-mingw-w64-runtime_7.0.0.bb
>>> > @@ -19,6 +19,8 @@ PROVIDES += "virtual/nativesdk-libintl"
>>> >
>>> >  TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TARGET}"
>>> >
>>> > +EXTRA_OECONF_x86-64 = "--disable-lib32"
>>> > +
>>> >  do_configure() {
>>> >      oe_runconf
>>> >  }
>>> > --
>>> > 2.17.1
>>> >
>>>
>>>
>>>
>>>
> 
>
>