由於x86的toolchain建立的文件相當少,
於是使用[crosstool]來建立toolchain可說是相當方便...
[更新]
$ svn co http://crosstool.googlecode.com/svn/trunk/src crosstool
$ cd crosstool
$ cp demo-i686.sh demo-i386.sh
$ vi demo-i386.sh
將eval `cat i686.dat gcc-4.1.0-glibc-2.3.6-tls.dat` sh all.sh --notest
修改成#eval `cat i686.dat gcc-4.1.0-glibc-2.3.6-tls.dat` sh all.sh --notest
將eval `cat i686.dat gcc-4.1.0-glibc-2.3.6.dat` sh all.sh --notest
修改成#eval `cat i386.dat gcc-4.1.0-glibc-2.3.6.dat` sh all.sh --notest
$ vi i386.dat
TARGET=i486-dimmpc-linux-gnu
TARGET_CFLAGS="-O"
$ sudo mkdir /opt/crosstool
$ sudo chown $USER /opt/crosstool
$ sh demo-i386.sh
...
Cross-toolchain build complete. Result in /opt/crosstool/gcc-4.1.0-glibc-2.3.6/i486-dimmpc-linux-gnu.
+ exit 0
+ cd /home/shulong/crosstool
+ sh testhello.sh
+ cd /opt/crosstool/gcc-4.1.0-glibc-2.3.6/i486-dimmpc-linux-gnu
+ test '!' -d tmp
+ mkdir tmp
+ cd tmp
+ test x '!=' x
+ cat
...
+ echo testhello: C compiler can in fact build a trivial program.
testhello: C compiler can in fact build a trivial program.
+ test '' = 1
+ test '' = 1
+ test '' = 1
+ test 1 = ''
+ echo Done.
Done.
看到這個msg就代表成功啦!!
toolchain的路徑在:
/opt/crosstool/gcc-4.1.0-glibc-2.3.6/i486-dimmpc-linux-gnu/
感謝jserv大提供的方向...
2007年11月11日星期日
訂閱:
張貼意見 (Atom)




2 意見:
為何不直接用 SVN head?
# svn co http://crosstool.googlecode.com/svn/trunk/src crosstool
# cd crosstool
# sh demo-XXX
感謝~~
這個方法真的方便很多^^
張貼意見