mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
Toolchain: GCC and binutils are now configure correctly
This commit is contained in:
parent
4b05ec9549
commit
be1100497d
Notes:
sideshowbarker
2024-07-19 14:33:06 +09:00
Author: https://github.com/sleepy-monax Commit: https://github.com/SerenityOS/serenity/commit/be1100497d2 Pull-request: https://github.com/SerenityOS/serenity/pull/8
2 changed files with 25 additions and 7 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -10,3 +10,4 @@
|
|||
Root
|
||||
Toolchain/Tarballs
|
||||
Toolchain/Build
|
||||
.vscode
|
||||
|
|
|
@ -1,56 +1,73 @@
|
|||
#!/bin/bash
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
echo $DIR
|
||||
|
||||
TARGET=i686-pc-serenity
|
||||
PREFIX="$DIR/Local"
|
||||
SYSROOT="$DIR/../Root"
|
||||
|
||||
mkdir -p "$DIR/Tarballs"
|
||||
|
||||
pushd "$DIR/Tarballs"
|
||||
if [ ! -e "binutils-2.32.tar.gz" ]; then
|
||||
wget "http://ftp.gnu.org/gnu/binutils/binutils-2.32.tar.gz"
|
||||
else
|
||||
echo "Skipped downloading binutils"
|
||||
fi
|
||||
|
||||
if [ ! -e "gcc-8.3.0.tar.gz" ]; then
|
||||
wget "http://ftp.gnu.org/gnu/gcc/gcc-8.3.0/gcc-8.3.0.tar.gz"
|
||||
else
|
||||
echo "Skipped downloading gcc"
|
||||
fi
|
||||
|
||||
if [ ! -d "binutils-2.32" ]; then
|
||||
echo "Extracting binutils..."
|
||||
tar -xf "binutils-2.32.tar.gz"
|
||||
|
||||
pushd "binutils-2.32"
|
||||
patch -p1 < $DIR/Patches/binutils.patch
|
||||
patch -p1 < $DIR/Patches/binutils.patch > /dev/null
|
||||
popd
|
||||
else
|
||||
echo "Skipped extracting binutils"
|
||||
fi
|
||||
|
||||
if [ ! -d "gcc-8.3.0" ]; then
|
||||
echo "Extracting gcc..."
|
||||
tar -xf "gcc-8.3.0.tar.gz"
|
||||
|
||||
pushd "gcc-8.3.0"
|
||||
patch -p1 < $DIR/Patches/gcc.patch
|
||||
patch -p1 < $DIR/Patches/gcc.patch > /dev/null
|
||||
popd
|
||||
else
|
||||
echo "Skipped extracting gcc"
|
||||
fi
|
||||
popd
|
||||
|
||||
exit
|
||||
|
||||
mkdir -p $PREFIX
|
||||
|
||||
mkdir -p "$DIR/Build/binutils"
|
||||
mkdir -p "$DIR/Build/gcc"
|
||||
|
||||
pushd "$DIR/Build/"
|
||||
|
||||
unset PKG_CONFIG_LIBDIR # Just in case
|
||||
|
||||
pushd binutils
|
||||
$DIR/Tarballs/binutils-2.32/configure --target=$TARGET --prefix=$PREFIX --disable-werror || exit 1
|
||||
$DIR/Tarballs/binutils-2.32/configure --prefix=$PREFIX \
|
||||
--target=$TARGET \
|
||||
--with-sysroot=$SYSROOT \
|
||||
--disable-nls || exit 1
|
||||
make -j $(nproc)
|
||||
make install
|
||||
popd
|
||||
|
||||
pushd gcc
|
||||
$DIR/Tarballs/gcc-8.3.0/configure --target=$TARGET --prefix=$PREFIX --disable-nls --enable-languages=c --disable-libssp --without-headers || exit 1
|
||||
$DIR/Tarballs/gcc-8.3.0/configure --prefix=$PREFIX \
|
||||
--target=$TARGET \
|
||||
--with-sysroot=$SYSROOT \
|
||||
--enable-languages=c,c++ || exit 1
|
||||
|
||||
make -j $(nproc) all-gcc all-target-libgcc
|
||||
make install-gcc install-target-libgcc
|
||||
popd
|
||||
|
|
Loading…
Reference in a new issue