找回密码
 FreeOZ用户注册
查看: 1974|回复: 2
打印 上一主题 下一主题

[论坛技术] cross compile for mips

[复制链接]
跳转到指定楼层
1#
发表于 18-6-2010 08:50:27 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有帐号?FreeOZ用户注册

x
hi there,

Does anyone here have experience to cross compile C programs?  I need to compile C programs under cygwin or x86linux, the target program will be running on mipsel-linux environment.  So far I had tried to compile a cross-compiler by myself with no success, then I downloaded some pre-compiled cross-compiler, but the utility mipsel-linux-gcc outputs nothing after being invoked but returns the code 127.

My dlink G604T dsl router is in revision B & the latest firmware still doesn't have ssh server. What I am trying to do is to compile a tiny, self contained ssh server on this dsl router.

Could anyone pls help me?  

Many thanks!
gaohd@hotmail.com
回复  

使用道具 举报

2#
发表于 18-6-2010 09:51:28 | 只看该作者
how about C library?
Use matching compiler and library.
回复  

使用道具 举报

3#
 楼主| 发表于 18-6-2010 12:19:59 | 只看该作者
The problem is I don't know what version of gcc and option that this cross-compiler is compiled.

e.g if you gcc -v, it will tell you the exact version and compiling options
$ gcc -v
Reading specs from /usr/lib/gcc/i686-pc-cygwin/3.4.4/specs
Configured with: /managed/gcc-build/final-v3-bootstrap/gcc-3.4.4-999/configure --verbose --program-suffix=-3 --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc--libdir=/usr/lib --ibexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --enable-languages=c,ada,c++,d,f77,pascal,java,objc --enable-nls --without-included-gettext --enable-ersion-specific-runtime-libs --without-x --enable-libgcj --disable-java-awt --with-system-zlib --enable-interpreter --disable-libgcj-debug --enable-threads=posix --enable-java-c=boehm --disable-win32-registry --enable-sjlj-exceptions --enable-hash-synchronization --enable-libstdcxx-debu

but command "mipsel-linux-gcc -v" outpus nothing.  maybe the cross-compiler I downloaded is wrong.

Thank you anyway.
回复  

使用道具 举报

您需要登录后才可以回帖 登录 | FreeOZ用户注册

本版积分规则

小黑屋|手机版|Archiver|FreeOZ论坛

GMT+10, 14-5-2024 13:55 , Processed in 0.030001 second(s), 19 queries , Gzip On, Redis On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表