PR231695 describes the issue with locale data built on LE system (amd64) when used on BE system (powerpc).
Fix introduced in rS308170 depends on the fact that locale data is built on LE system, and will likely fail when it's built natively on mips. More soThis essentially reverts rS308170 (but it made the task of finding the fields to be converted much easier, we shouldn't be hardcoding the conversion in libc,thanks!) and I see 2 options here::
1. fix- add -b/-l flags to localedef toef to specify big/little endian order for output data(looked up in target's system endiancap_mkdb and modeled after it)
2. embed the endian info in locale data files (updating magic signature) and ehhance the previous fix with runtime selection of needed conversion
This change tries to implement the option 2.
- make share/ctypedef and share/colldef use the new flag
- add localedef to targets/pseudo/userland/Makefile.depend so that we use the binary we built during boostrap, and not the one from the build system itself