有关RTEMS 编译工具“-mips32 -EL”问题
大家好,鄙人刚接触RTEMS系统不久,现在想将RTEMS移植到mips32,小端的cpu的板子。但按官方的方法,制作出的交叉编译工具,是编写大端。貌似可以用传“-EL”可以编译成小端模式的镜像,悲剧的是一加“-EL”参数,
#mips-rtems-gcc -mips32 -EL -o test test.c
则会报错:
/opt/rtems/lib/gcc/mips-rtems/4.4.6/../../../../mips-rtems/bin/ld: /opt/rtems/lib/gcc/mips-rtems/4.4.6/../../../../mips-rtems/lib/crt0.o: compiled for a big endian system and target is little endian
/opt/rtems/lib/gcc/mips-rtems/4.4.6/../../../../mips-rtems/bin/ld: /opt/rtems/lib/gcc/mips-rtems/4.4.6/../../../../mips-rtems/lib/crt0.o: endianness incompatible with that of the selected emulation
/opt/rtems/lib/gcc/mips-rtems/4.4.6/../../../../mips-rtems/bin/ld: failed to merge target specific data of file /opt/rtems/lib/gcc/mips-rtems/4.4.6/../../../../mips-rtems/lib/crt0.o
/opt/rtems/lib/gcc/mips-rtems/4.4.6/../../../../mips-rtems/bin/ld: /opt/rtems/lib/gcc/mips-rtems/4.4.6/../../../../mips-rtems/lib/libc.a(lib_a-isatty.o): compiled for a big endian system and target is little endian
/opt/rtems/lib/gcc/mips-rtems/4.4.6/../../../../mips-rtems/bin/ld: /opt/rtems/lib/gcc/mips-rtems/4.4.6/../../../../mips-rtems/lib/libc.a(lib_a-isatty.o): endianness incompatible with that of the selected emulation
希望遇到过此情况的前辈们,可以指点指点。谢谢。
另外,
#mips-rtems-gcc -v
出来的信息
-64 create 64 ABI object file
Linker options
==============
Use "-Wl,OPTION" to pass "OPTION" to the linker.
elf32ebmip:
--build-id[=STYLE] Generate build ID note
-Bgroup Selects group name lookup rules for DSO
--disable-new-dtags Disable new dynamic tags
--enable-new-dtags Enable new dynamic tags
--eh-frame-hdr Create .eh_frame_hdr section
--hash-style=STYLE Set hash style to sysv, gnu or both
-z combreloc Merge dynamic relocs into one section and sort
-z defs Report unresolved symbols in object files.
-z execstack Mark executable as requiring executable stack
没有列出elf32elmip:等小端的信息。
我运行板子linux的工具链“mipsel-linux-gcc -target-help”,可以看到有elf32elmips等其他字样。
现在有两个疑问:
1,是我的编译工具有问题?
2,还是我的makefile/confiugre有问题?
万分感谢!!!