Hi, We have built a cross compiled toolchain for SH target using the following sources, gcc-4.3.1 [released], newlib-1.16.0 [released] binutils-2.18.50 [snapshot dated 30th July 2008],
We have experienced following error, when building a C++ application using a toolchain built with the above mentioned sources, //////////////////////////////////////////////////////////////////////// ///// "sh-elf-ld.exe: sh-elf\lib\gcc\sh-elf\4.3.1\ml\m2\libgcc-Os-4-200.a (unwind-dw2-Os-4-200.o): compiled for a big endian system and target is little endian sh-elf-ld.exe: \sh-elf\lib\gcc\sh-elf\4.3.1\ml\m2\libgcc-Os-4-200.a (unwind-dw2-Os-4-200.o): uses instructions which are incompatible with instructions used in previous modules sh-elf-ld.exe: failed to merge target specific data of file sh-elf\lib\gcc\sh-elf\4.3.1\ml\m2\libgcc-Os-4-200.a(unwind-dw2-Os-4-200. o)" //////////////////////////////////////////////////////////////////////// ///// The libgcc-Os-4-200.a archive built for SH target consists of the following object files, udivsi3_i4i-Os-4-200.o sdivsi3_i4i-Os-4-200.o unwind-dw2-Os-4-200.o It has been observed that the object file "unwind-dw2-Os-4-200.o" gets built for big endian instead of little endian target.Whereas the other two object files, "udivsi3_i4i-Os-4-200.o" and "sdivsi3_i4i-Os-4-200.o" from the same archive are successfully built for little endian target of SH. The libraries built for little endian SH-2/SH-3 target series resides at the following path, sh-elf/lib/gcc/sh-elf/4.3.1/ml/m2 We have also observed that the target specific options such as ml, m2, ml m2 etc are not passed to the compiler while building the "unwind-dw2-Os-4-200" object. It appears that, somewhere in the GCC makefiles, the required options have been missed while building the "unwind-dw2-Os-4-200.o" component. Has anyone faced a similar problem? Any possible workaround? Regards, Cecilia Rodrigues KPIT Cummins Infosystems Ltd. Pune, India