This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Do I need modify newlib code for endian changed?


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.


Ralf


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]