[Xorp-hackers] compile error on MIPS

Suresh Satapati Suresh Satapati <satapati@gmail.com>
Tue, 24 May 2005 15:59:11 -0700


Hello,

I was trying to build for linux on MIPS, and my build fails with  
the following errors :-

/libxorp/heap.cc

heap.cc:129: warning: cast from `char*' to `int*' increases required alignment
heap.cc:132: warning: cast from `char*' to `int*' increases required alignment
heap.cc:152: warning: cast from `char*' to `int*' increases required alignment
heap.cc:163: warning: cast from `char*' to `int*' increases required alignment
heap.cc:169: warning: cast from `char*' to `int*' increases required alignment
heap.cc:200: warning: cast from `char*' to `int*' increases required alignment
heap.cc:206: warning: cast from `char*' to `int*' increases required alignment
heap.cc:215: warning: cast from `char*' to `int*' increases required alignment
heap.cc:221: warning: cast from `char*' to `int*' increases required alignment


/mrt/random.c

random.c:461: warning: cast increases required alignment of target type
random.c:526: warning: cast increases required alignment of target type

My g++ compiler options for MIPS are:

MIPS Options -mabicalls  -march=cpu-type
           -mtune=cpu=type -mcpu=cpu-type  -membedded-data
           -muninit-const-in-rodata -membedded-pic  -mfp32
           -mfp64  -mfused-madd  -mno-fused-madd -mgas  -mgp32
           -mgp64 -mgpopt  -mhalf-pic  -mhard-float  -mint64
           -mips1 -mips2  -mips3  -mips4  -mlong64  -mlong32
           -mlong-calls  -mmemcpy -mmips-as  -mmips-tfile  -mno-
           abicalls -mno-embedded-data  -mno-uninit-const-in-
           rodata -mno-embedded-pic  -mno-gpopt  -mno-long-calls
           -mno-memcpy  -mno-mips-tfile  -mno-rnames  -mno-stats
           -mrnames  -msoft-float -m4650  -msingle-float  -mmad
           -mstats  -EL  -EB  -G num  -nocpp -mabi=32  -mabi=n32
           -mabi=64  -mabi=eabi -mfix7000  -mno-crt0  -mflush-
           func=func  -mno-flush-func -mbranch-likely  -mno-
           branch-likely

I am not sure any of the above will help.  How do I get around this ? 

Thanks in advance
Suresh..