2.2. GCC-15.2.0 Pass 1

The GCC package contains the GNU compiler collection, which includes the C and C++ compilers.

Package Information

Gcc-pass1 Dependencies

Required

Binutils-2.46.0-pass1

2.2.1. Installation of Gcc-pass1

Prepare Gcc-pass1 for compilation:

Now Configure the Package, issue:

tar -xf ../gmp-6.3.0.tar.xz && mv -v gmp-6.3.0 gmp
tar -xf ../mpc-1.4.0.tar.xz && mv -v mpc-1.4.0 mpc
tar -xf ../mpfr-4.2.2.tar.xz && mv -v mpfr-4.2.2 mpfr
sed -e '/m64=/s/lib64/lib/' -i.orig gcc/config/i386/t-linux64

To Compile the Package, issue:

mkdir -v build
cd build
../configure --target=$LFS_TGT --prefix=$LFS/tools --with-glibc-version=2.43 \
  --with-sysroot=$LFS --with-newlib --without-headers --enable-default-pie \
  --enable-default-ssp --disable-nls --disable-shared --disable-multilib \
  --disable-threads --disable-libatomic --disable-libgomp --disable-libquadmath \
  --disable-libssp --disable-libvtv --disable-libstdcxx --enable-languages=c,c++
make

Now Install the Package, issue:

make install
cat gcc/limitx.h gcc/glimits.h gcc/limity.h > \
  `dirname $($LFS_TGT-gcc -print-libgcc-file-name)`/include/limits.h

2.2.2. Contents of Gcc-pass1

Installed programs: PROGRAMS
Installed libraries: LIBRARIES
Installed directories: DIRECTORIES