SSブログ

ARMクロスコンパイル環境構築(Mac OS X 10.9)

Mac OS X 10.9 上で、ARMクロスコンパイル環境を構築した。
以前H8用に構築した手順をベースにしている。

(※注)
'--target=arm-none-eabi' で構築。
以前 arm-elf で構築したが、これだと U-Bootがうまくビルドできない。(FP instructionうんぬんでこける。)ハマった…。
eabiはHard FP/Soft FP両対応リンク可能なので問題ないようだ。

■必要なパッケージの入手

それぞれ展開したあと、以下ビルド手順。

■binutils
$ cd binutils-2.24
$ mkdir build
$ cd build
$ CFLAGS=-Wno-error=deprecated-declarations ../configure --target=arm-none-eabi  --disable-nls --prefix=/usr/local/arm-none-eabi
$ make
$ sudo make install

■gmpライブラリ
$ cd gmp-4.3.2 
$ mkdir build
$ cd build
$ ../configure --prefix=/usr/local/gmp
$ make
$ make check
$ sudo make install

■mpfrライブラリ
$ cd mpfr-2.4.2
$ mkdir build
$ cd build
$ ../configure --prefix=/usr/local/mpfr --with-gmp=/usr/local/gmp
$ make
$ make check
$ sudo make install

■mpcライブラリ
$ cd mpc-0.8.2
$ mkdir build
$ cd build
$ ../configure --prefix=/usr/local/mpc --with-gmp=/usr/local/gmp --with-mpfr=/usr/local/mpfr
$ make
$ make check
$ sudo make install

■gcc
$ cd gcc-4.5.2
$ mkdir build
$ cd build
$ ../configure --target=arm-none-eabi --disable-nls --disable-threads --disable-shared   --disable-libssp --enable-languages=c --with-gmp=/usr/local/gmp --with-mpfr=/usr/local/mpfr --with-mpc=/usr/local/mpc --prefix=/usr/local/arm-none-eabi
$ make
$ sudo make install


以上。

nice!(0)  コメント(0)  トラックバック(0) 

nice! 0

コメント 0

コメントを書く

お名前:
URL:
コメント:
画像認証:
下の画像に表示されている文字を入力してください。

トラックバック 0

この広告は前回の更新から一定期間経過したブログに表示されています。更新すると自動で解除されます。