# Basic information name="gcc" version="12.2.0" dependencies=(gmp mpc mpfr binutils) # Download options format="tar" url="https://ftp.gnu.org/gnu/gcc/gcc-$version/gcc-$version.tar.xz" output="gcc-$version.tar.xz" sha256sum="e549cf9cf3594a00e27b6589d4322d70e0720cdd213f39beb4181e06926230ff" # Build instructions do_patch() { patch -ui $portdir/gcc.patch -p 1 -d $srcdir/.. } do_configure() { $srcdir/configure --prefix=/usr --target=$LUNA_ARCH-luna --host=$LUNA_ARCH-luna --disable-nls --with-build-sysroot=$LUNA_BASE --enable-languages=c,c++ --enable-checking --enable-initfini-array } do_build() { export ac_cv_c_bigendian=no make all-gcc -j$MAKEJOBS make all-target-libgcc -j$MAKEJOBS CFLAGS_FOR_TARGET='-g -O2 -mcmodel=large -mno-red-zone' } do_install() { make install-gcc make install-target-libgcc }