So, this has been a gripe for while, dealing with opposite endianess. Which I've had to go deep and fix code written for x86 when porting to PPC. But, I found from a search and this question that GCC already supports specifying endian in data.
https://stackoverflow.com/questions/673 ... r-c-struct
Some pragmas detailed here:
https://gcc.gnu.org/onlinedocs/gcc/Stru ... agmas.html
I wonder if this could help to greatly alleviate endian issues? The only caveat is getting this patched. Depending on GCC and what is considered a depreciated endian may mean it is not officially supported as a patch. But some defines could be introduced that setup up data types to be LE specific for GCC. In case GCC isn't used it defaults to blank. And then, obviously, the patch would need to be forward compatible so it isn't deleted.
On top of this, I wonder of we can leverage the power of IBM s390x? This is natively big endian. There are binary packages built for x390x in Debian for AMDGPU and to a lesser extent Radeon. But I don't know know how functional they are. This looks to be the largest CPU used with big endian. Most people tend to think of big endian being in an old Mac from 20 years ago, Of course we know this isn't the case.
This article, just over 2 years old, encourages developers to write cross endian portable code and support big endian. A shocking stance in our little endian world. Unfortunately some links are broken. But perhaps this could be used as a gateway? Did the "big" amount of "little" people get the memo?
https://community.ibm.com/community/use ... e-projects