[GCC-XML] 32-bit build on 64-bit host
Steve Vinoski
vinoski at ieee.org
Sat Mar 1 15:26:37 EST 2008
Hi, is gccxml supposed to honor the -m32 switch? Trying to build
32-bit code on a 64-bit Linux system and wanted to run gccxml in the
same mode, but it doesn't seem to define things properly so that
definitions in <limits.h> are set for 32-bit.
This is with the latest gccxml code from cvs and g++ 4.2.2.
If I compile the following, which is a trimmed down version of some
code found in the ACE C++ networking framework, with -m32 on a 64-bit
host:
#include <limits.h>
#include <sys/types.h>
u_long p = ULONG_MAX;
I get:
$ gccxml -fxml=/dev/null -m32 foo.cc
foo.cc:3: error: integer constant is too large for 'long' type
It's as if the type system is 32-bit but the preprocessor constants
(e.g., ULONG_MAX) are following the size of the host architecture.
Running with --debug doesn't seem to give any clues, but I could
certainly be missing something.
thanks,
--steve
More information about the gccxml
mailing list