mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 09:51:57 -05:00
Toolchain/Ports: Update gcc to 9.3.0
Ever closer to C++20! Also fix up some of those pesky "'s
This commit is contained in:
parent
ca067e71a3
commit
c47ef61ed8
4 changed files with 28 additions and 28 deletions
|
@ -141,8 +141,8 @@ PROGRAM = kernel
|
|||
|
||||
SUBPROJECT_CXXFLAGS += -pie -fPIE -ffreestanding -fbuiltin -mno-80387 -mno-mmx -mno-sse -mno-sse2 -fno-asynchronous-unwind-tables
|
||||
SUBPROJECT_CXXFLAGS += -nostdlib -nostdinc -nostdinc++
|
||||
SUBPROJECT_CXXFLAGS += -I../Toolchain/Local/i686-pc-serenity/include/c++/9.2.0/
|
||||
SUBPROJECT_CXXFLAGS += -I../Toolchain/Local/i686-pc-serenity/include/c++/9.2.0/i686-pc-serenity/
|
||||
SUBPROJECT_CXXFLAGS += -I../Toolchain/Local/i686-pc-serenity/include/c++/9.3.0/
|
||||
SUBPROJECT_CXXFLAGS += -I../Toolchain/Local/i686-pc-serenity/include/c++/9.3.0/i686-pc-serenity/
|
||||
|
||||
LDFLAGS += -Wl,-T linker.ld -nostdlib -lgcc -lstdc++
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash ../.port_include.sh
|
||||
port=gcc
|
||||
version=9.2.0
|
||||
version=9.3.0
|
||||
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"
|
||||
files="https://ftp.gnu.org/gnu/gcc/gcc-${version}/gcc-${version}.tar.xz gcc-${version}.tar.xz
|
||||
|
|
|
@ -14,11 +14,11 @@ TARGET="$ARCH-pc-serenity"
|
|||
PREFIX="$DIR/Local"
|
||||
SYSROOT="$DIR/../Root"
|
||||
|
||||
MAKE=make
|
||||
MD5SUM=md5sum
|
||||
NPROC=nproc
|
||||
MAKE="make"
|
||||
MD5SUM="md5sum"
|
||||
NPROC="nproc"
|
||||
|
||||
if [ `uname -s` = "OpenBSD" ]; then
|
||||
if [ "$(uname -s)" = "OpenBSD" ]; then
|
||||
MAKE=gmake
|
||||
MD5SUM="md5 -q"
|
||||
NPROC="sysctl -n hw.ncpuonline"
|
||||
|
@ -26,7 +26,7 @@ if [ `uname -s` = "OpenBSD" ]; then
|
|||
export CXX=eg++
|
||||
export with_gmp=/usr/local
|
||||
export LDFLAGS=-Wl,-z,notext
|
||||
elif [ `uname -s` = "FreeBSD" ]; then
|
||||
elif [ "$(uname -s)" = "FreeBSD" ]; then
|
||||
MAKE=gmake
|
||||
MD5SUM="md5 -q"
|
||||
NPROC="sysctl -n hw.ncpu"
|
||||
|
@ -43,8 +43,8 @@ BINUTILS_NAME="binutils-$BINUTILS_VERSION"
|
|||
BINUTILS_PKG="${BINUTILS_NAME}.tar.gz"
|
||||
BINUTILS_BASE_URL="http://ftp.gnu.org/gnu/binutils"
|
||||
|
||||
GCC_VERSION="9.2.0"
|
||||
GCC_MD5SUM="e03739b042a14376d727ddcfd05a9bc3"
|
||||
GCC_VERSION="9.3.0"
|
||||
GCC_MD5SUM="9b7e8f6cfad96114e726c752935af58a"
|
||||
GCC_NAME="gcc-$GCC_VERSION"
|
||||
GCC_PKG="${GCC_NAME}.tar.gz"
|
||||
GCC_BASE_URL="http://ftp.gnu.org/gnu/gcc"
|
||||
|
@ -64,7 +64,7 @@ pushd "$DIR"
|
|||
BINUTILS_VERSION=${BINUTILS_VERSION},BINUTILS_MD5SUM=${BINUTILS_MD5SUM},
|
||||
GCC_VERSION=${GCC_VERSION},GCC_MD5SUM=${GCC_MD5SUM}"
|
||||
echo "Config is:${DEPS_CONFIG}"
|
||||
if ! DEPS_HASH=$($DIR/ComputeDependenciesHash.sh $MD5SUM <<<"${DEPS_CONFIG}"); then
|
||||
if ! DEPS_HASH=$("$DIR/ComputeDependenciesHash.sh" "$MD5SUM" <<<"${DEPS_CONFIG}"); then
|
||||
echo "Dependency hashing failed"
|
||||
echo "Will rebuild toolchain from scratch, and NOT SAVE THE RESULT."
|
||||
echo "Someone should look into this, but for now it'll work, albeit inefficient."
|
||||
|
@ -176,11 +176,11 @@ pushd "$DIR/Build/"
|
|||
popd
|
||||
|
||||
pushd gcc
|
||||
if [ `uname -s` = "OpenBSD" ]; then
|
||||
perl -pi -e 's/-no-pie/-nopie/g' "$DIR"/Tarballs/gcc-9.2.0/gcc/configure
|
||||
if [ "$(uname -s)" = "OpenBSD" ]; then
|
||||
perl -pi -e 's/-no-pie/-nopie/g' "$DIR/Tarballs/gcc-$GCC_VERSION/gcc/configure"
|
||||
fi
|
||||
|
||||
"$DIR"/Tarballs/gcc-9.2.0/configure --prefix="$PREFIX" \
|
||||
"$DIR/Tarballs/gcc-$GCC_VERSION/configure" --prefix="$PREFIX" \
|
||||
--target="$TARGET" \
|
||||
--with-sysroot="$SYSROOT" \
|
||||
--disable-nls \
|
||||
|
@ -202,8 +202,8 @@ pushd "$DIR/Build/"
|
|||
echo "XXX install libstdc++"
|
||||
"$MAKE" install-target-libstdc++-v3 || exit 1
|
||||
|
||||
if [ `uname -s` = "OpenBSD" ]; then
|
||||
cd "$DIR"/Local/libexec/gcc/i686-pc-serenity/9.2.0 && ln -sf liblto_plugin.so.0.0 liblto_plugin.so
|
||||
if [ "$(uname -s)" = "OpenBSD" ]; then
|
||||
cd "$DIR/Local/libexec/gcc/i686-pc-serenity/$GCC_VERSION" && ln -sf liblto_plugin.so.0.0 liblto_plugin.so
|
||||
fi
|
||||
popd
|
||||
popd
|
||||
|
|
|
@ -12,11 +12,11 @@ TARGET="$ARCH-pc-serenity"
|
|||
PREFIX="$DIR/Local/x86_64"
|
||||
SYSROOT="$DIR/../Root"
|
||||
|
||||
MAKE=make
|
||||
MD5SUM=md5sum
|
||||
NPROC=nproc
|
||||
MAKE="make"
|
||||
MD5SUM="md5sum"
|
||||
NPROC="nproc"
|
||||
|
||||
if [ `uname -s` = "OpenBSD" ]; then
|
||||
if [ "$(uname -s)" = "OpenBSD" ]; then
|
||||
MAKE=gmake
|
||||
MD5SUM="md5 -q"
|
||||
NPROC="sysctl -n hw.ncpuonline"
|
||||
|
@ -24,7 +24,7 @@ if [ `uname -s` = "OpenBSD" ]; then
|
|||
export CXX=eg++
|
||||
export with_gmp=/usr/local
|
||||
export LDFLAGS=-Wl,-z,notext
|
||||
elif [ `uname -s` = "FreeBSD" ]; then
|
||||
elif [ "$(uname -s)" = "FreeBSD" ]; then
|
||||
MAKE=gmake
|
||||
MD5SUM="md5 -q"
|
||||
NPROC="sysctl -n hw.ncpu"
|
||||
|
@ -41,8 +41,8 @@ BINUTILS_NAME="binutils-$BINUTILS_VERSION"
|
|||
BINUTILS_PKG="${BINUTILS_NAME}.tar.gz"
|
||||
BINUTILS_BASE_URL="http://ftp.gnu.org/gnu/binutils"
|
||||
|
||||
GCC_VERSION="9.2.0"
|
||||
GCC_MD5SUM="e03739b042a14376d727ddcfd05a9bc3"
|
||||
GCC_VERSION="9.3.0"
|
||||
GCC_MD5SUM="9b7e8f6cfad96114e726c752935af58a"
|
||||
GCC_NAME="gcc-$GCC_VERSION"
|
||||
GCC_PKG="${GCC_NAME}.tar.gz"
|
||||
GCC_BASE_URL="http://ftp.gnu.org/gnu/gcc"
|
||||
|
@ -135,11 +135,11 @@ pushd "$DIR/Build/x86_64"
|
|||
popd
|
||||
|
||||
pushd gcc
|
||||
if [ `uname -s` = "OpenBSD" ]; then
|
||||
perl -pi -e 's/-no-pie/-nopie/g' "$DIR"/Tarballs/gcc-9.2.0/gcc/configure
|
||||
if [ "$(uname -s)" = "OpenBSD" ]; then
|
||||
perl -pi -e 's/-no-pie/-nopie/g' "$DIR/Tarballs/gcc-$GCC_VERSION/gcc/configure"
|
||||
fi
|
||||
|
||||
"$DIR"/Tarballs/gcc-9.2.0/configure --prefix="$PREFIX" \
|
||||
"$DIR/Tarballs/gcc-$GCC_VERSION/configure" --prefix="$PREFIX" \
|
||||
--target="$TARGET" \
|
||||
--with-sysroot="$SYSROOT" \
|
||||
--disable-nls \
|
||||
|
@ -161,8 +161,8 @@ pushd "$DIR/Build/x86_64"
|
|||
echo "XXX install libstdc++"
|
||||
"$MAKE" install-target-libstdc++-v3 || exit 1
|
||||
|
||||
if [ `uname -s` = "OpenBSD" ]; then
|
||||
cd "$DIR"/Local/libexec/gcc/x86_64-pc-serenity/9.2.0 && ln -sf liblto_plugin.so.0.0 liblto_plugin.so
|
||||
if [ "$(uname -s)" = "OpenBSD" ]; then
|
||||
cd "$DIR/Local/libexec/gcc/x86_64-pc-serenity/$GCC_VERSION" && ln -sf liblto_plugin.so.0.0 liblto_plugin.so
|
||||
fi
|
||||
popd
|
||||
popd
|
||||
|
|
Loading…
Reference in a new issue