按照上篇文章中的 參考網頁, 將基本的source code 和 msp430 的 patch file 下載.
我的習慣,自己寫一個 Makefile 的 source tree 方式, 將source code 放到特定位置, 然後撰寫Makefile , 屆時只要下指令 "make" 就會全自動編譯好.
不多說 , 進行第一步吧 ... binutils 的編譯.
@@ 問題來了 , 馬上 build error . 經過幾天的 google 後發現應改是 texinfo 版本太新.
還好在 https://sourceware.org/bugzilla/show_bug.cgi?id=15212#c3 中找到一些 patch 的訊息.
經過修改,沒問題了,第一步....可以編譯 binutils 了.
最後一段編譯訊息如下:
/usr/bin/install -c -m 644 'ld.1' '/home/jeff/msp430-toolchain/out/share/man/man1/msp430-ld.1'
make[7]: Leaving directory `/home/jeff/msp430-toolchain/binutils/binutils-build/ld'
make[6]: Leaving directory `/home/jeff/msp430-toolchain/binutils/binutils-build/ld'
make[5]: Leaving directory `/home/jeff/msp430-toolchain/binutils/binutils-build/ld'
make[4]: Leaving directory `/home/jeff/msp430-toolchain/binutils/binutils-build/ld'
make[4]: Entering directory `/home/jeff/msp430-toolchain/binutils/binutils-build/libiberty'
make[5]: Entering directory `/home/jeff/msp430-toolchain/binutils/binutils-build/libiberty/testsuite'
make[5]: Nothing to be done for `all'.
make[5]: Leaving directory `/home/jeff/msp430-toolchain/binutils/binutils-build/libiberty/testsuite'
/bin/sh ../../binutils-2.21.1/libiberty/../mkinstalldirs /home/jeff/msp430-toolchain/out/lib/`gcc -print-multi-os-directory`
mkdir -p -- /home/jeff/msp430-toolchain/out/lib/../lib64
/usr/bin/install -c -m 644 ./libiberty.a /home/jeff/msp430-toolchain/out/lib/`gcc -print-multi-os-directory`/./libiberty.an
( cd /home/jeff/msp430-toolchain/out/lib/`gcc -print-multi-os-directory` ; chmod 644 ./libiberty.an ;ranlib ./libiberty.an )
mv -f /home/jeff/msp430-toolchain/out/lib/`gcc -print-multi-os-directory`/./libiberty.an /home/jeff/msp430-toolchain/out/lib/`gcc -print-multi-os-directory`/./libiberty.a
if test -n ""; then \
case "" in \
/*) thd=;; \
*) thd=/home/jeff/msp430-toolchain/out/include/;; \
esac; \
/bin/sh ../../binutils-2.21.1/libiberty/../mkinstalldirs ${thd}; \
for h in ../../binutils-2.21.1/libiberty/../include/ansidecl.h ../../binutils-2.21.1/libiberty/../include/demangle.h ../../binutils-2.21.1/libiberty/../include/dyn-string.h ../../binutils-2.21.1/libiberty/../include/fibheap.h ../../binutils-2.21.1/libiberty/../include/floatformat.h ../../binutils-2.21.1/libiberty/../include/hashtab.h ../../binutils-2.21.1/libiberty/../include/libiberty.h ../../binutils-2.21.1/libiberty/../include/objalloc.h ../../binutils-2.21.1/libiberty/../include/partition.h ../../binutils-2.21.1/libiberty/../include/safe-ctype.h ../../binutils-2.21.1/libiberty/../include/sort.h ../../binutils-2.21.1/libiberty/../include/splay-tree.h; do \
/usr/bin/install -c -m 644 $h ${thd}; \
done; \
fi
make[5]: Entering directory `/home/jeff/msp430-toolchain/binutils/binutils-build/libiberty/testsuite'
make[5]: Nothing to be done for `install'.
make[5]: Leaving directory `/home/jeff/msp430-toolchain/binutils/binutils-build/libiberty/testsuite'
make[4]: Leaving directory `/home/jeff/msp430-toolchain/binutils/binutils-build/libiberty'
make[3]: Nothing to be done for `install-target'.
make[3]: Leaving directory `/home/jeff/msp430-toolchain/binutils/binutils-build'
make[2]: Leaving directory `/home/jeff/msp430-toolchain/binutils/binutils-build'
make[1]: Leaving directory `/home/jeff/msp430-toolchain/binutils'
## Build target 'all' is completed.
=> Elapsed time = 1m 43s
沒有留言:
張貼留言