This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

where to find various definitions

Hi all -

I've been tasked with porting an application to an ARM device; I'll be using the GNU toolchain for this.

In a file ieeefp.h, I see this passage:

#ifndef __IEEE_BIG_ENDIAN
#ifndef __IEEE_LITTLE_ENDIAN
#error Endianess not declared!!

but I can't find where this is defined (according to my IDE, it isn't, but that's probably because I'm missing a header somewhere).

Similarly, I'm getting errors because the term "__arm__" isn't defined.

I could ask about these and others on a case-by-case basis, but I suspect the root cause is my missing some top-level header file. Can anyone tell me whether this is true, and if so, which file I should be using?

Thank you.

Parents
  • I stumbled on the answer to this...in my cmake configuration file, I added the following lines below. I'm not sure of the exact mechanism, but this somehow defines "__arm__" (and probably a bunch of other stuff).

    set(CMAKE_SYSTEM_NAME Generic)
    set(CMAKE_SYSTEM_PROCESSOR ARM)
    

Reply
  • I stumbled on the answer to this...in my cmake configuration file, I added the following lines below. I'm not sure of the exact mechanism, but this somehow defines "__arm__" (and probably a bunch of other stuff).

    set(CMAKE_SYSTEM_NAME Generic)
    set(CMAKE_SYSTEM_PROCESSOR ARM)
    

Children
No data