1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 19:57:44 +00:00

Build: Support non-i686 toolchains

* Add SERENITY_ARCH option to CMake for selecting the target toolchain
* Port all build scripts but continue to use i686
* Update GitHub Actions cache to include BuildIt.sh
This commit is contained in:
meme 2020-12-28 22:38:52 -05:00 committed by Andreas Kling
parent 8ca0e8325a
commit 23b23cee5a
12 changed files with 43 additions and 202 deletions

View file

@ -11,7 +11,7 @@ echo "$DIR"
ARCH=${ARCH:-"i686"}
TARGET="$ARCH-pc-serenity"
PREFIX="$DIR/Local"
PREFIX="$DIR/Local/$ARCH"
BUILD=$(realpath "$DIR/../Build")
SYSROOT="$BUILD/Root"
@ -179,14 +179,14 @@ popd
# === COMPILE AND INSTALL ===
mkdir -p "$PREFIX"
mkdir -p "$DIR/Build/binutils"
mkdir -p "$DIR/Build/gcc"
mkdir -p "$DIR/Build/$ARCH/binutils"
mkdir -p "$DIR/Build/$ARCH/gcc"
if [ -z "$MAKEJOBS" ]; then
MAKEJOBS=$($NPROC)
fi
pushd "$DIR/Build/"
pushd "$DIR/Build/$ARCH"
unset PKG_CONFIG_LIBDIR # Just in case
pushd binutils
@ -251,7 +251,7 @@ pushd "$DIR/Build/"
"$MAKE" install-target-libstdc++-v3 || exit 1
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
cd "$DIR/Local/libexec/gcc/$TARGET/$GCC_VERSION" && ln -sf liblto_plugin.so.0.0 liblto_plugin.so
fi
popd