diff mbox series

[meta-mingw] mingw32: Fix GCC override

Message ID 20230713192521.4075964-1-JPEWhacker@gmail.com
State New
Headers show
Series [meta-mingw] mingw32: Fix GCC override | expand

Commit Message

Joshua Watt July 13, 2023, 7:25 p.m. UTC
6badeda ("mingw32: Add WINDRES export for SDK") attempted to fix the GCC
13 Canadian cross compile for MinGW host, but used the broad sdkming32
override, which made it apply to all target recipes. This caused build
errors in other recipes. Move the variables so that they only apply when
cross compiling GCC instead of globally.

[YOCTO #15158]

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
---
 conf/machine-sdk/include/mingw32-common.inc        | 3 ---
 recipes-devtools/gcc/gcc-cross-canadian_%.bbappend | 4 ++++
 2 files changed, 4 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/conf/machine-sdk/include/mingw32-common.inc b/conf/machine-sdk/include/mingw32-common.inc
index 1007bd4..b993307 100644
--- a/conf/machine-sdk/include/mingw32-common.inc
+++ b/conf/machine-sdk/include/mingw32-common.inc
@@ -38,9 +38,6 @@  TESTSDKEXT_CLASS_NAME = ""
 WINDMC:mingw32 = "${HOST_PREFIX}windmc"
 WINDRES:mingw32 = "${HOST_PREFIX}windres --include-dir=${STAGING_INCDIR}"
 RC:mingw32 = "${WINDRES}"
-WINDMC:sdkmingw32 = "${HOST_PREFIX}windmc"
-WINDRES:sdkmingw32 = "${HOST_PREFIX}windres --include-dir=${STAGING_INCDIR}"
-RC:sdkmingw32 = "${WINDRES}"
 
 export WINDMC
 export WINDRES
diff --git a/recipes-devtools/gcc/gcc-cross-canadian_%.bbappend b/recipes-devtools/gcc/gcc-cross-canadian_%.bbappend
index 13ea016..25a449f 100644
--- a/recipes-devtools/gcc/gcc-cross-canadian_%.bbappend
+++ b/recipes-devtools/gcc/gcc-cross-canadian_%.bbappend
@@ -5,6 +5,10 @@  EXEEXT:sdkmingw32 = ".exe"
 ELFUTILS:sdkmingw32 = ""
 DEPENDS:remove:sdkmingw32 = "nativesdk-gettext"
 
+WINDMC:sdkmingw32 = "${HOST_PREFIX}windmc"
+WINDRES:sdkmingw32 = "${HOST_PREFIX}windres --include-dir=${STAGING_INCDIR}"
+RC:sdkmingw32 = "${WINDRES}"
+
 # With plugins enabled, it will output 'dll.a' files that are mistaken
 # for ELF which can trigger a failure.  Simply avoid processing these
 # to avoid the error condition.