mixing GCC and RVCT: issue with wchar_t
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

mixing GCC and RVCT: issue with wchar_t



Hello,

I am trying to mix code compiled with RVCT 3.0 and with Code Sourcery GCC/ARM (2006q3).

I get linker errors "Conflicting definitions of wchar_t", but there is no C++ code in my application.

After reading compiler docs, and GCC sources, I still don't know how to solve this:
- RVCT says that wchar_t is 16 bits wide
- GCC says it's 32 bits wide (check config/arm/arm.h, you'll see:
#define WCHAR_TYPE_SIZE BITS_PER_WORD
  (and BITS_PER_WORD is 32 because UNITS_PER_WORD is 4)
- the "Addenda to, and Errata in, the ABI for the ARM Architecture" documents says that there are 2 sizes permitted (2 and 4 bytes)

Should this size be configurable by a command-line switch?
Should I patch my GCC such that it uses 16 bits?

Thanks,

Christophe.