2019-11-03 09:05:02 +00:00
|
|
|
#!/bin/bash ../.port_include.sh
|
2019-09-24 06:56:39 +00:00
|
|
|
port=gcc
|
2019-12-23 12:28:00 +00:00
|
|
|
version=9.2.0
|
2019-09-24 06:56:39 +00:00
|
|
|
useconfigure=true
|
|
|
|
configopts="--target=i686-pc-serenity --with-sysroot=/ --with-build-sysroot=$SERENITY_ROOT/Root --with-newlib --enable-languages=c,c++ --disable-lto --disable-nls"
|
2019-12-23 12:28:00 +00:00
|
|
|
files="https://ftp.gnu.org/gnu/gcc/gcc-9.2.0/gcc-9.2.0.tar.xz gcc-9.2.0.tar.xz"
|
2019-12-23 12:31:18 +00:00
|
|
|
makeopts="all-gcc all-target-libgcc all-target-libstdc++-v3 -j $(nproc)"
|
2019-09-24 06:56:39 +00:00
|
|
|
installopts="DESTDIR=$SERENITY_ROOT/Root install-gcc install-target-libgcc install-target-libstdc++-v3"
|
|
|
|
depends="binutils"
|
|
|
|
|
|
|
|
fetch() {
|
2019-12-23 12:24:56 +00:00
|
|
|
read url filename <<< $(echo "$files")
|
|
|
|
if [ -f "$filename" ]; then
|
|
|
|
echo "$filename already exists"
|
|
|
|
else
|
|
|
|
run_nocd curl -O "$url" -o "$filename"
|
|
|
|
fi
|
2019-09-24 06:56:39 +00:00
|
|
|
run_nocd tar xf "$filename"
|
|
|
|
run contrib/download_prerequisites
|
|
|
|
for f in patches/*; do
|
|
|
|
run patch -p1 < "$f"
|
|
|
|
done
|
|
|
|
}
|
|
|
|
build() {
|
2019-11-03 09:05:02 +00:00
|
|
|
run make $makeopts
|
2019-09-24 06:56:39 +00:00
|
|
|
run find ./host-i686-pc-serenity/gcc/ -maxdepth 1 -type f -executable -exec strip --strip-debug {} \; || echo
|
|
|
|
}
|
|
|
|
|
|
|
|
install() {
|
2019-11-03 09:05:02 +00:00
|
|
|
run make $installopts
|
2019-09-24 06:56:39 +00:00
|
|
|
}
|