41 lines
1,017 B
Text
Executable file
41 lines
1,017 B
Text
Executable file
name=gcc
|
|
version=9.2.0
|
|
source=(http://ftp.gnu.org/gnu/gcc/gcc-$version/gcc-$version.tar.xz)
|
|
|
|
build() {
|
|
cd $name-$version
|
|
|
|
if [ "$MULTILIB" = "yes" ]; then
|
|
mkdir -v build32
|
|
cd build32
|
|
|
|
../libstdc++-v3/configure \
|
|
--host=i686-lfs-linux-gnu \
|
|
--prefix=/tools \
|
|
--libdir=/tools/lib32 \
|
|
--disable-multilib \
|
|
--disable-nls \
|
|
--disable-libstdcxx-threads \
|
|
--disable-libstdcxx-pch \
|
|
--with-gxx-include-dir=/tools/$LFS_TGT/include/c++/$version \
|
|
CC="$LFS_TGT-gcc -m32" \
|
|
CXX="$LFS_TGT-g++ -m32"
|
|
make
|
|
make install
|
|
cd -
|
|
fi
|
|
|
|
mkdir -v build
|
|
cd build
|
|
|
|
../libstdc++-v3/configure \
|
|
--host=$LFS_TGT \
|
|
--prefix=/tools \
|
|
--disable-multilib \
|
|
--disable-nls \
|
|
--disable-libstdcxx-threads \
|
|
--disable-libstdcxx-pch \
|
|
--with-gxx-include-dir=/tools/$LFS_TGT/include/c++/$version
|
|
make
|
|
make install
|
|
}
|