Do I need modify newlib code for endian changed?
Mon Jul 25 11:01:00 GMT 2011
On 07/25/2011 09:39 AM, Schwarz, Konrad wrote:
> Liu is asking if *newlib* needs to be modified, not if his
> *own* code needs adaptation.
Generally speaking: yes, there are piece in newlib which require to be
modified for endianness when adding a new target.
Whether and how *he* will have to modify newlib would depend up his
target and how it is implemented.
> I expect newlib source code to be cogniziant of endianess.
Most pieces of newlib are independent of a target's endianess, but there
are (few) pieces which need to know about endianness.
In most occasions, these pieces receive their setting through
preprocessor defines emitted by GCC.
> However you will need to recompile newlib using the proper
> configuration values -- which I don't know, unfortunately. I
> expect something like armbe -> armle (be/le big/litte endian).
What you say applies to GCC. newlib typically receives endianness
indirectly through GCC.
More information about the Newlib