「インストール - GCC」の版間の差分

ナビゲーションに移動 検索に移動
編集の要約なし
編集の要約なし
629行目: 629行目:
  cd gcc-<バージョン>
  cd gcc-<バージョン>
<br>
<br>
さらに、[https://sourceware.org/newlib/ NewLibの公式Webサイト]、または、[https://github.com/bminor/newlib/ NewLibのGithub]にアクセスして、NewLibのソースコードをダウンロードする。<br>
さらに、[https://sourceware.org/newlib/ Newlibの公式Webサイト]、または、[https://github.com/bminor/newlib/ NewlibのGithub]にアクセスして、Newlibのソースコードをダウンロードする。<br>
もし、NewLibの公式Webサイトからファイルをダウンロードできない場合は、<code>wget</code>コマンド等を使用してダウンロードする。<br>
もし、Newlibの公式Webサイトからファイルをダウンロードできない場合は、<code>wget</code>コマンド等を使用してダウンロードする。<br>
  wget ftp://sourceware.org/pub/newlib/newlib-<バージョン>.tar.gz
  wget ftp://sourceware.org/pub/newlib/newlib-<バージョン>.tar.gz
<br>
<br>
<u>ただし、現在(2022年11月現在)、NewLibの公式Webサイトからダウンロードしたファイルを使用するとビルドに失敗するため、Githubからダウンロードすること。</u><br>
<u>ただし、現在(2022年11月現在)、Newlibの公式Webサイトからダウンロードしたファイルを使用するとビルドに失敗するため、Githubからダウンロードすること。</u><br>
<br>
<br>
ダウンロードしたファイルを解凍する。<br>
ダウンロードしたファイルを解凍する。<br>
652行目: 652行目:
               --disable-bootstrap --disable-nls --disable-werror --enable-lto --enable-gold \
               --disable-bootstrap --disable-nls --disable-werror --enable-lto --enable-gold \
               --with-newlib \
               --with-newlib \
               --with-headers=/<上記でダウンロードしたNewLibのディレクトリ>/newlib/libc/include
               --with-headers=/<上記でダウンロードしたNewlibのディレクトリ>/newlib/libc/include
  make -j $(nproc)
  make -j $(nproc)
  make install
  make install
664行目: 664行目:
               --disable-bootstrap --disable-nls --disable-shared --enable-static --enable-lto --enable-gold \
               --disable-bootstrap --disable-nls --disable-shared --enable-static --enable-lto --enable-gold \
               --with-newlib \
               --with-newlib \
               --with-headers=/<上記でダウンロードしたNewLibのディレクトリ>/newlib/libc/include
               --with-headers=/<上記でダウンロードしたNewlibのディレクトリ>/newlib/libc/include
  make -j $(nproc)
  make -j $(nproc)
  make install
  make install


<br>
<br>
次に、NewLibをビルドおよびインストールする。<br>
次に、Newlibをビルドおよびインストールする。<br>
  mkdir build && cd build
  mkdir build && cd build
   
   
693行目: 693行目:
               --disable-bootstrap --disable-nls --disable-shared --enable-static --disable-libstdc__-v3 --enable-lto --enable-gold \
               --disable-bootstrap --disable-nls --disable-shared --enable-static --disable-libstdc__-v3 --enable-lto --enable-gold \
               --with-newlib \
               --with-newlib \
               --with-headers=/<上記でダウンロードしたNewLibのディレクトリ>/newlib/libc/include
               --with-headers=/<上記でダウンロードしたNewlibのディレクトリ>/newlib/libc/include
  make -j $(nproc)
  make -j $(nproc)
  make install
  make install

案内メニュー