Skip to main content

arm-elf-gcc-4.3.3 install

1) mpfr / gmp のインストール
http://www.gnu.org/software/gmp
http://www.mpfr.org/
Fortran で使用するらしいが、インストールには必要.

mac port でインストール

2) gcc-4.3.3 インストール
http://sigma-project.net/archives/2009/04/newlibgcc.html
http://www.mouiyada.jp/node/99

ftp://sources.redhat.com/pub/newlib/index.html

gccでnewlibのコンパイルに必要な部分のコンパイル・インストール

cd ../gcc-4.3.0
export PATH=/usr/local/gcc-arm-elf/bin:$PATH
ln -s ../newlib-1.16.0/newlib .
ln -s ../newlib-1.16.0/libgloss .

※gcc-4.3.0/gcc/config/arm/t-arm-elfの以下のコメントアウト(#~)をはずす
MULTILIB_OPTIONS += mhard-float/msoft-float
MULTILIB_DIRNAMES += fpu soft
MULTILIB_EXCEPTIONS += *mthumb/*mhard-float*
MULTILIB_OPTIONS += mno-thumb-interwork/mthumb-interwork
MULTILIB_DIRNAMES += normal interwork

mkdir build
cd build
../configure --prefix=/usr/local/gcc-arm-elf --target=arm-elf --enable-interwork --enable-multilib --with-float=soft --enable-languages=c,c++ --with-newlib --with-gmp=/opt/local --with-mpfr=/opt/local
make
sudo make install


make error http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37625


Undefined symbols:
"_iconv_close", referenced from:
__cpp_destroy_iconv in libcpp.a(charset.o)
__cpp_destroy_iconv in libcpp.a(charset.o)
__cpp_convert_input in libcpp.a(charset.o)
__nl_free_domain_conv in libintl.a(loadmsgcat.o)
"_iconv", referenced from:
_convert_using_iconv in libcpp.a(charset.o)
_convert_using_iconv in libcpp.a(charset.o)
_convert_using_iconv in libcpp.a(charset.o)
_convert_using_iconv in libcpp.a(charset.o)
__nl_find_msg in libintl.a(dcigettext.o)
"_iconv_open", referenced from:
_init_iconv_desc in libcpp.a(charset.o)
__nl_init_domain_conv in libintl.a(loadmsgcat.o)
__nl_init_domain_conv in libintl.a(loadmsgcat.o)
ld: symbol(s) not found

Googleing a bit showed that the problem comes from the system iconv.h
under /usr/include, which conflicts with Fink's under /sw/.

A solution is to replace /usr/include/iconv.h by a symlink to
/sw/include/iconv.h.



newlibのコンパイル・インストール

cd ../../newlib-1.17.0
./configure --prefix=/usr/local/cross/arm --target=arm-elf --enable-interwork --enable-multilib --with-float=soft
make
sudo make install

Comments

Popular posts from this blog

Algorithmic C Datatypes 0

Mentor Graphics がリリースしている、任意ビット長、固定小数点等を扱うための class-based C++ library が良い。C++ のテンプレートクラスで設計されており、ヘッダファイルのみのインクルードで使える非常に汎用性が高い構造。もちろん Catapult C 以外で使用できる。 ・Overflow/Precision などのアサートなどに加え、ユーザー独自アサートなどを定義できる ・SystemC より断然早い sc_bigint(x100!!!)/sc_int(x3) http://www.mentor.com/esl/catapult/algorithmic

間接層

間接層を入れる事は複雑化ではない。 間接層は理解を助けるものだと思う。 例えば、鉛筆でものを書く時、炭素が・・・とか木の繊維が・・・とか素材レベルまで意識する事は無いだろう(勿論、意識する人はいるしそれはすばらしいことだと思う)。 それは鉛筆という間接層が素材と自分の間に居てくれるから、自分は詳細を意識せずともものを書くという目的を達せられる。 確かに、使いづらい道具や歪な形をしたものがあったりする。それでも間接層に躊躇してはいいものが出来ないと思う。 何度も作るうちに、いい形になる。作らないといい形にさえならない。 > ソフトウェアとは間接層を入れる事で柔軟さを実現する だったか?(「リファクタリング」より) あくまでコンテキストによる。それが大前提です。 解析用スクリプト等では、敢えてベタ書きにしたりする。