2021-05-31 04:47:02 +03:00
|
|
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
2022-02-06 08:18:39 +03:00
|
|
|
ARCH=x86_64
|
2021-05-31 04:47:02 +03:00
|
|
|
TARGET=x86_64-pc-toaru
|
|
|
|
PREFIX="$DIR/local"
|
|
|
|
SYSROOT="$DIR/../base"
|
|
|
|
|
2022-02-06 08:18:39 +03:00
|
|
|
# --disable-multilib
|
|
|
|
|
2021-05-31 04:47:02 +03:00
|
|
|
cd $DIR
|
|
|
|
mkdir -p $PREFIX/bin
|
|
|
|
|
|
|
|
mkdir -p $DIR/build/binutils
|
|
|
|
cd $DIR/build/binutils
|
|
|
|
../../binutils-gdb/configure --target=$TARGET --prefix="$PREFIX" --with-sysroot="$SYSROOT" --disable-werror --enable-shared
|
|
|
|
make -j8
|
|
|
|
make install
|
|
|
|
|
|
|
|
mkdir -p $DIR/build/gcc
|
|
|
|
cd $DIR/build/gcc
|
|
|
|
../../gcc/configure --target=$TARGET --prefix="$PREFIX" --with-sysroot="$SYSROOT" --enable-languages=c,c++ --enable-shared
|
|
|
|
make -j8 all-gcc
|
|
|
|
make install-gcc
|
2022-02-06 08:18:39 +03:00
|
|
|
make -j8 $TARGET/libgcc/{libgcc.a,crtbegin.o,crtend.o,crtbeginS.o,crtendS.o}
|
|
|
|
cp $TARGET/libgcc/{libgcc.a,crtbegin.o,crtend.o,crtbeginS.o,crtendS.o} ../../local/lib/gcc/$TARGET/10.3.0/
|
2021-05-31 04:47:02 +03:00
|
|
|
|
|
|
|
cd $DIR/../
|
2022-02-06 08:18:39 +03:00
|
|
|
make ARCH=$ARCH base/lib/libc.so
|
2021-05-31 04:47:02 +03:00
|
|
|
|
|
|
|
cd $DIR/build/gcc
|
|
|
|
make -j8 all-target-libgcc
|
|
|
|
make install-target-libgcc
|
|
|
|
|
|
|
|
cd $DIR/../
|
2022-02-06 08:18:39 +03:00
|
|
|
rm base/lib/libc.so
|
|
|
|
make ARCH=$ARCH base/lib/libc.so
|
|
|
|
make ARCH=$ARCH base/lib/libm.so
|
2021-05-31 04:47:02 +03:00
|
|
|
|
2021-10-27 07:24:11 +03:00
|
|
|
#cd $DIR/build/gcc
|
|
|
|
#make -j8 all-target-libstdc++-v3
|
|
|
|
#make install-target-libstdc++-v3
|