This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: About endianess defination
- From: Dave Korn <dave dot korn dot cygwin at googlemail dot com>
- To: daniel tian <daniel dot xntian at gmail dot com>
- Cc: newlib at sources dot redhat dot com, Dave Korn <dave dot korn dot cygwin at googlemail dot com>, peng dot zheng at mavrixtech dot com
- Date: Sat, 10 Oct 2009 09:16:59 +0100
- Subject: Re: About endianess defination
- References: <121fadb80910091827i1ba9db8aub640ef0360fa112d@mail.gmail.com>
daniel tian wrote:
> The problem is I don't know where the macro __RICE__ should be defined. I
> checked the CRX processor, and I don't find where it defined.
It should be a default predefine in the compiler; adding -D options to
CPP_SPEC is the usual way to define these macros that identify OS, CPU, etc.;
for example here's how the cygwin compiler does it - note how it uses specs to
set different build environment #defines based on command-line switches.
> #undef CPP_SPEC
> #define CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE} \
> %{mno-win32:%{mno-cygwin: %emno-cygwin and mno-win32 are not compatible}} \
> %{mno-cygwin:-D__MSVCRT__ -D__MINGW32__ %{!ansi:%{mthreads:-D_MT}}}\
> %{!mno-cygwin:-D__CYGWIN32__ -D__CYGWIN__ %{!ansi:-Dunix} -D__unix__ -D__unix }\
> %{mwin32|mno-cygwin:-DWIN32 -D_WIN32 -D__WIN32 -D__WIN32__ %{!ansi:-DWINNT}}\
> %{!nostdinc:%{!mno-win32|mno-cygwin:-idirafter ../include/w32api%s -idirafter ../../include/w32api%s}}\
> "
cheers,
DaveK