2500th COMMIT: ports: Add gcc port

I've had this laying around locally for a while. binutils was not
working so I didn't feel like this was worth pushing. My new stdio FILE
buffering rewrite fixed binutils and now gcc actually works!
This commit is contained in:
2025-01-25 18:37:10 +02:00
parent a84fb57e32
commit 8c569ac7bf
3 changed files with 41 additions and 0 deletions

29
ports/gcc/build.sh Executable file
View File

@@ -0,0 +1,29 @@
#!/bin/bash ../install.sh
NAME='gcc'
VERSION='12.2.0'
DOWNLOAD_URL="https://ftp.gnu.org/gnu/gcc/gcc-$VERSION/gcc-$VERSION.tar.gz#ac6b317eb4d25444d87cf29c0d141dedc1323a1833ec9995211b13e1a851261c"
DEPENDENCIES=('binutils' 'gmp' 'mpfr' 'mpc')
CONFIGURE_OPTIONS=(
"--target=$BANAN_TOOLCHAIN_TRIPLE"
'--with-sysroot=/'
"--with-build-sysroot=$BANAN_SYSROOT"
'--enable-initfini-array'
'--enable-shared'
'--enable-lto'
'--disable-nls'
'--enable-languages=c,c++'
)
build() {
make -j$(nproc) all-gcc || exit 1
make -j$(nproc) all-target-libgcc || exit 1
make -j$(nproc) all-target-libstdc++-v3 || exit 1
find . -type f -executable -exec strip --strip-unneeded {} + 2>/dev/null
}
install() {
make install-gcc DESTDIR="$BANAN_SYSROOT" || exit 1
make install-target-libgcc DESTDIR="$BANAN_SYSROOT" || exit 1
make install-target-libstdc++-v3 DESTDIR="$BANAN_SYSROOT" || exit 1
}