Rebuilding toolchain to support 16bit widwchars (-fshort-wchar)

Asked by Richard Lang

I'm porting a project that uses 16 bit wchars and makes use of wcslen() etc from IAR Embedded Workbench.

Have come across the same problem described in

https://answers.launchpad.net/gcc-arm-embedded/+question/252444

Am I right in thinking that I don't need to rebuild the entire toolchain, just the libc library. If this is the case I'm thinking/hoping that all I need to do is download the toolchain source, cherry pick out the required sources and rebuild the static library using the already installed arm-none-eabi-gcc binaries (working on Windows host), rather than setup the complete toolchain required to build the arm-none-eabi-gcc toolchain from source (which sounds like a bit of a mission)

Would it be feasible to enhance the toolchain to automatically select alternate symbols from the library when -fshort-wchar flag is specified? I'd imagine that what we're needing to do is not all that uncommon in the embedded/bare metal environment.

thx

Question information

Language:
English Edit question
Status:
Solved
For:
GNU Arm Embedded Toolchain Edit question
Assignee:
No assignee Edit question
Solved by:
Richard Lang
Solved:
Last query:
Last reply:
Revision history for this message
Richard Lang (r-e-lang) said :
#1

Never mind, don't need to do this after all as it turns out that the wcslen() call that was giving me problems was the only instance in the project which is otherwise implemented with custom functions coded to expect 16 bit unicode characters, thus the single wcslen() call was easy to replace.