2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

R8C m12aのGCC環境構築

Last updated at Posted at 2019-05-01

表記の通りやってみた

RVF/RC45 blogさんのやり方ではエラーが出て出来なかった

環境
Windows10上のvirtual box上のUbuntu16.04(64bit)

使用したソース
gmp-5.0.5.tar.gz
mpfr-3.1.0.tar.gz
mpc-0.9.tar.gz
binutils-2.25.1.tar.gz
gcc-4.9.3.tar.gz
newlib-2.2.0.tar.gz

・gmp-5.0.5の構築

$ sudo apt-get install m4 m4-doc
$ cd
$ cd gmp-5.0.5
$ ./configure --prefix=/usr/local
$ sudo make install

・mpfr-3.1.0の構築

$ ./configure --prefix=/usr/local --with-gmp=/usr/local
$ make
$ sudo make install

・mpc-0.9の構築

$ ./configure --prefix=/usr/local --with-gmp=/usr/local --with-mpfr=/usr/local
$ make
$ sudo make install

・binutils-2.25.1 の構築

$ cd
$ tar xfvz binutils-2.25.1.tar.gz
$ cd binutils-2.25.1
$ mkdir m32c_build
$ cd m32c_build
$ ../configure --target=m32c-elf --prefix=/usr/local/m32c-elf --disable-nls
$ make
$ sudo make install

・「/usr/local/m32c-elf/bin」へPATHを通して、シェルを起動しなおす
・gcc-4.9.3の構築

$ cd
$ tar xfvz gcc-4.9.3.tar.gz
$ cd gcc-4.9.3
$ cp /usr/share/automake-1.15/config.guess .
$ mkdir m32c_build
$ cd m32c_build
$ ../configure --prefix=/usr/local/m32c-elf --target=m32c-elf --enable-languages=c --disable-libssp --with-newlib --disable-nls --disable-threads --disable-libgomp --disable-libmudflap --disable-libstdcxx-pch --disable-multilib --disable-bootstrap
$ make
$ sudo make install

・newlib-2.2.0 の構築

% cd
% tar xfvz newlib-2.2.0.tar.gz
% cd newlib-2.2.0
% mkdir m32c_build
% cd m32c_build
% ../configure --target=m32c-elf --prefix=/usr/local/m32c-elf
% make
% sudo env PATH=$PATH make install

・gcc-4.9.3のC++ コンパイラの構築

$ cd
$ cd gcc-4.9.3
$ cd m32c_build
$ ../configure --prefix=/usr/local/m32c-elf --target=m32c-elf --enable-languages=c,c++ --disable-libssp --with-newlib --disable-nls --disable-threads --disable-libgomp --disable-libmudflap --disable-libstdcxx-pch --disable-multilib --disable-bootstrap
$ make
$ sudo env PATH=$PATH make install

・インストールされている確認する

$ m32c-elf-gcc-4.9.4

バージョンが表示されればOK

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?