Skip to contentSkip to conversation

uninative-tarball: glibc-gconv-{utf-16, cp1252} for binutils windres

PATCH In review Nathan Rossi 1 participant 2 messages Mar 23, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 uninative-tarball: glibc-gconv-{utf-16, cp1252} for binutils windres

The windres binutils binary which is used for Windows resource files requires utf-16 and cp1252 encoding support in order to correctly generate resource files with strings. As such when using uninative to build mingw resources for a nativesdk target the windres binary is executed on the native host, thus using the uninative libc and gconv modules.

---
 meta/recipes-core/meta/uninative-tarball.bb | 3 +++
 1 file changed, 3 insertions(+)
meta/recipes-core/meta/uninative-tarball.bb +3 -0
index bbde0d2150..f3fc1ebe62 100644
@@ -5,10 +5,13 @@ TOOLCHAIN_TARGET_TASK = ""
 
 # ibm850 - mcopy from mtools
 # iso8859-1 - guile
+# utf-16, cp1252 - binutils-windres
 TOOLCHAIN_HOST_TASK = "\
     nativesdk-glibc \
     nativesdk-glibc-gconv-ibm850 \
     nativesdk-glibc-gconv-iso8859-1 \
+    nativesdk-glibc-gconv-utf-16 \
+    nativesdk-glibc-gconv-cp1252 \
     nativesdk-patchelf \
     "
 
Signature · 1 line
2.11.0
#1 lore raw
Quoted 9 lines · Nathan Rossi

The windres binutils binary which is used for Windows resource files requires utf-16 and cp1252 encoding support in order to correctly generate resource files with strings. As such when using uninative to build mingw resources for a nativesdk target the windres binary is executed on the native host, thus using the uninative libc and gconv modules.

---

Forgot to mention file size impact, which is less than 40K (for x86_64).

20K ./x86_64-linux/usr/lib/gconv/UTF-16.so
16K ./x86_64-linux/usr/lib/gconv/CP1252.so

Regards,
Nathan

Quoted 24 lines
 meta/recipes-core/meta/uninative-tarball.bb | 3 +++
 1 file changed, 3 insertions(+)
meta/recipes-core/meta/uninative-tarball.bb +3 -1
index bbde0d2150..f3fc1ebe62 100644
@@ -5,10 +5,13 @@ TOOLCHAIN_TARGET_TASK = ""
 
 # ibm850 - mcopy from mtools
 # iso8859-1 - guile
+# utf-16, cp1252 - binutils-windres
 TOOLCHAIN_HOST_TASK = "\
     nativesdk-glibc \
     nativesdk-glibc-gconv-ibm850 \
     nativesdk-glibc-gconv-iso8859-1 \
+    nativesdk-glibc-gconv-utf-16 \
+    nativesdk-glibc-gconv-cp1252 \
     nativesdk-patchelf \
     "
 
--

2.11.0