glibc-2.2.3 の セットアップ です 併せて glibc-linuxthreads-2.2.3 も 一緒に扱います。
$ cd ${PRJROOT}/build-tools
$ tar zxvf glibc-2.2.3.tar.gz
$ tar zxvf glibc-linuxthreads-2.2.3.tar.gz --directory=glibc-2.2.3
これは 最後の段階
make install_root=${TARGET_PREFIX} prefix="" install
でエラー が出るので修正しておく必要が有るようです。
http://www.kegel.com/crosstool/current/patches/glibc-2.1.3/glibc-manual-stdin.texi-1.127.patch
ほか 沢山の 実例が有るようです。
$ cd glibc-2.2.3/manual/
$ cp stdio.texi stdio.texi-ORG
$ vi stdio.texi
$ diff -s stdio.texi stdio.texi-ORG
3268,3269c3268,3269
< @code{scanf}. For more information about these tools, see @ref{Top, , ,
< flex.info, Flex: The Lexical Scanner Generator}, and @ref{Top, , ,
---
> @code{scanf}. For more information about these tools, see @ref{, , ,
> flex.info, Flex: The Lexical Scanner Generator}, and @ref{, , ,
$ cd -
”Top” という文字列を追加します。
では configure に 取り掛かります。build-glibc に 移動して行います。
$ cd build-glibc/
$ CC=i386-linux-gcc ../glibc-2.2.3/configure --host=$TARGET \
--prefix="/usr" --enable-add-ons \
--with-headers=${TARGET_PREFIX}/include
次は make です
特に 考えなくて良い様です
$ make
さてインストールします
$ make install_root=${TARGET_PREFIX} prefix="" install
未だ少し 処理する事が有るようです。
さて インストールされた ものの中で ${TARGET_PREFIX}/lib つまり (/home/ddd/proj/tools/i386-linux/lib )に libc.so というものが有ります これを修正しないといけないようです。
$ cd ${TARGET_PREFIX}/lib
$ cat libc.so
/* GNU ld script
Use the shared library, but some functions are only in
the static library, so try that secondarily. */
GROUP ( /lib/libc.so.6 /lib/libc_nonshared.a )
/* $ cp ./libc.so ./libc.so.org この様に するようですが */
$ cp libc.so libc.so-ORG
$ vi libc.so
$ diff -s libc.so libc.so-ORG
4c4
< GROUP ( libc.so.6 libc_nonshared.a )
---
> GROUP ( /lib/libc.so.6 /lib/libc_nonshared.a )
にゃんたろう 拝!
2010年 1月31日 (日) 21:05:05 JST 作成