Skip to contentSkip to conversation

mingw32: Fix GCC override

PATCH New Joshua Watt 1 participant 1 message Jul 13, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mingw32: Fix GCC override

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]

---
 conf/machine-sdk/include/mingw32-common.inc        | 3 ---
 recipes-devtools/gcc/gcc-cross-canadian_%.bbappend | 4 ++++
 2 files changed, 4 insertions(+), 3 deletions(-)
conf/machine-sdk/include/mingw32-common.inc +0 -3
index 1007bd4..b993307 100644
@@ -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
recipes-devtools/gcc/gcc-cross-canadian_%.bbappend +4 -0
index 13ea016..25a449f 100644
@@ -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.
Signature · 1 line
2.33.0