memAlignment problem .. Please help

Ottawa Guy ottawaguy81@yahoo.com
Wed Nov 12 17:35:00 GMT 2003


Hi,
I am compiling gcc2.95.3 for target=sparc-elf from
scratch. The installation went fine. When I compile
and run my application using gcc2.95.3. I get a memory
misalignment errir on one of my structure. After
debugging further I found that the sturcture member
was a half word address. Since Sparc can only handle
full word memory adress. So I get an "memory unaligned
 exception". Do I have to change any option in
gcc2.95.3/gcc/config/sparc.h file to force all the
memory alignment of a structure. I tried all the flags
in the compiler to force aligment with no result.(
"-Wa,--enforce-aligned-data")
Following are the command I use to compile "gcc" I am
missing something 

1. mkdir tmp/build/gcc 
2. cd tmp/build/gcc 
3. ../../gcc-2.95.3/configure --target=sparc-elf
--prefix=/user/gcc --with-gnu-as --with-gnu-ld
--with-newlib -v 2>&1 | tee configure.out
4. make -w all-gcc install-gcc LANGUAGES="c c++" 2>&1
| tee make.out


             Thank you in advance 
                   O

__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree



More information about the Gcc-help mailing list