# cat /src/build/gcc require musl require linux/headers require autoconf require gettext-tiny # actually needed, or was this an issue caused by the `touch` bug I fixed? require help2man require texinfo require automake require flex require make require libtool require bison require binutils build() { chmod +x \ configure \ install-sh \ libgcc/mkheader.sh \ move-if-change #\ #mpfr/tools/* mkdir work cd work WORK=$(realpath .) BOOTSTRAP_CONFIGURE_FLAGS="" if uses bootstrap then BOOTSTRAP_CONFIGURE_FLAGS="--with-build-sysroot=\"$DESTDIR\"" export PATH="$DESTDIR/bin:$PATH" fi ../configure \ CFLAGS="$CFLAGS" \ CXXFLAGS="$CXXFLAGS" \ --build="$BUILD" \ --target="$TARGET" \ --disable-shared \ --disable-libsanitizer \ --disable-multilib \ --disable-nls \ --enable-clocale="generic" \ --enable-languages="ada,c,c++" \ --prefix="$PREFIX" \ --with-boot-ldflags="-static" \ --with-stage1-ldflags="-static" \ --with-sysroot="$PREFIX" \ --with-native-system-header-dir=/include \ $BOOTSTRAP_CONFIGURE_FLAGS make \ BOOT_ADAFLAGS="-gnatpg -gnatwA" \ ADAFLAGS="-gnatpg -gnatwA" \ AM_LDFLAGS="-all-static" } install() { make DESTDIR="$DESTDIR" install cd $DESTDIR/bin for f in $TARGET-* do ln -sf $f "$(echo $f | sed "s/$TARGET-//")" done }