13,009
回編集
10行目: | 10行目: | ||
== 依存関係のライブラリのインストール == | == 依存関係のライブラリのインストール == | ||
==== Coreutilsのインストール ==== | ==== Coreutilsのインストール (不要) ==== | ||
Coreutilsのビルドに必要なライブラリをインストールする。<br> | |||
sudo zypper install make gcc libcap-devel libattr-devel libacl-devel | |||
<br> | |||
[http://ftp.gnu.org/gnu/coreutils Coreutilsの公式Webサイト]にアクセスして、最新のCoreutilsをダウンロードする。<br> | |||
wget https://ftp.gnu.org/gnu/coreutils/coreutils-<バージョン>.tar.xz | |||
<br> | |||
ダウンロードしたCoreutilsを解凍して、Coreutilsディレクトリに移動する。<br> | |||
tar xf coreutils-<バージョン>.tar.xz | |||
cd coreutils-<バージョン> | |||
<br> | |||
ビルドディレクトリを作成する。<br> | |||
mkdir build && cd build | |||
<br> | |||
# | Coreutilsをビルドおよびインストールする。<br> | ||
../configure --prefix=<Coreutilsのインストールディレクトリ> | |||
make -j $(nproc) | |||
make install | |||
# または | |||
../configure --prefix=<Coreutilsのインストールディレクトリ> \ | |||
CC="/<GCCのインストールディレクトリ>/bin/gcc-<バージョン名> -arch i386 -arch x86_64" \ | |||
CXX="/<GCCのインストールディレクトリ>/bin/g++-<バージョン名> -arch i386 -arch x86_64" \ | |||
CPP="/<GCCのインストールディレクトリ>/bin/gcc-<バージョン名> -E" CXXCPP="/<GCCのインストールディレクトリ>/bin/g++-<バージョン名> -E" | |||
make -j $(nproc) | |||
make install | |||
<br> | <br> | ||
==== Binutilsのインストール ==== | ==== Binutilsのインストール ==== | ||
# | Binutilsのビルドに必要な依存関係のライブラリをインストールする。<br> | ||
# RHEL | |||
sudo dnf install gmp-devel mpfr-devel libmpc-devel isl-devel | |||
# SUSE | |||
sudo zypper install patterns-base-basesystem patterns-devel-base-devel_basis patterns-devel-C-C++-devel_C_C++ \ | |||
gcc gcc-c++ gawk ncurses-devel make tar pkg-config m4 gperf bison flex expect expect-devel \ | |||
gmp-devel mpfr-devel mpc-devel isl-devel | |||
<br> | |||
[https://ftp.gnu.org/gnu/binutils Binutilsの公式Webサイト]にアクセスして、最新のBinutilsをダウンロードする。<br> | |||
ダウンロードしたBinutilsを解凍して、Binutilsディレクトリに移動する。<br> | |||
tar xf Binutils-<バージョン>.tar.xz | |||
# | mkdir build && cd build | ||
<br> | |||
Binutilsをビルドおよびインストールする。<br> | |||
../configure --prefix=<Binutilsのインストールディレクトリ> | |||
make -j $(nproc) | |||
make install | |||
# または | |||
../configure --prefix=<Binutilsのインストールディレクトリ> \ | |||
CC="/<GCCのインストールディレクトリ>/bin/gcc-<バージョン名> -arch i386 -arch x86_64" \ | |||
CXX="/<GCCのインストールディレクトリ>/bin/g++-<バージョン名> -arch i386 -arch x86_64" \ | |||
CPP="/<GCCのインストールディレクトリ>/bin/gcc-<バージョン名> -E" CXXCPP="/<GCCのインストールディレクトリ>/bin/g++-<バージョン名> -E" | |||
make -j $(nproc) | |||
make install | |||
<br><br> | <br><br> | ||