我分別用C與C++寫了一個hello world
用mips-linux-gnu-gcc -EL 編譯成hello_EL以及helloc++
結果如下:
C++:
bash-3.1$ file /mnt/hgfs/share/helloc++
/mnt/hgfs/share/helloc++: ELF 32-bit LSB executable, MIPS, MIPS64 version 1, for GNU/Linux 2.6.12, dynamically linked (uses shared libs), for GNU/Linux 2.6.12, not stripped
C:
bash-3.1$ file /mnt/hgfs/share/hello_EL
/mnt/hgfs/share/hello_EL: ELF 32-bit LSB executable, MIPS, MIPS64 version 1, for GNU/Linux 2.6.12, dynamically linked (uses shared libs), for GNU/Linux 2.6.12, not stripped
兩個在板子上都可以順利執行
mips-linux-gnu-gcc -v 印出的訊息
bash-3.1$ /opt/mips-4.3/bin/mips-linux-gnu-gcc -v
Using built-in specs.
Target: mips-linux-gnu
Configured with: /scratch/clm/2008q3-src/src/gcc-4.3/configure --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --target=mips-linux-gnu --enable-threads --disable-libmudflap --disable-libssp --disable-libstdcxx-pch --with-arch=mips32r2 --with-float=hard --enable-mips-nonpic --enable-extra-sgxxlite-multilibs --with-gnu-as --with-gnu-ld --enable-languages=c,c++ --enable-shared --enable-symvers=gnu --enable-__cxa_atexit --with-pkgversion='Sourcery G++ Lite 4.3-51' --with-bugurl=https://support.codesourcery.com/GNUToolchain/ --disable-nls --prefix=/opt/codesourcery --with-sysroot=/opt/codesourcery/mips-linux-gnu/libc --with-build-sysroot=/scratch/clm/2008q3-lite/install/mips-linux-gnu/libc --with-gmp=/scratch/clm/2008q3-lite/obj/host-libs-4.3-51-mips-linux-gnu-i686-pc-linux-gnu/usr --with-mpfr=/scratch/clm/2008q3-lite/obj/host-libs-4.3-51-mips-linux-gnu-i686-pc-linux-gnu/usr --disable-libgomp --enable-poison-system-directories --with-build-time-tools=/scratch/clm/2008q3-lite/install/mips-linux-gnu/bin --with-build-time-tools=/scratch/clm/2008q3-lite/install/mips-linux-gnu/bin
Thread model: posix
gcc version 4.3.2 (Sourcery G++ Lite 4.3-51)
google了一下找到這篇
http://orzlab.blogspot.com/2007/05/cros ... btool.html但我的問題跟這篇似乎又不太一樣
感謝您的熱心回覆