diff options
author | joshua stein <jcs@jcs.org> | 2020-12-30 21:00:45 -0600 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-02-14 09:29:22 +0100 |
commit | 4a2209d0e052dd70daed13a6a20433bfc75f7c23 (patch) | |
tree | b7f4fdf00061f9b6a5b0d9ecc38e31531ad32b9b /Toolchain/BuildIt.sh | |
parent | 0d215b55487ca3ea66a77463c85d98956fa07f0b (diff) | |
download | serenity-4a2209d0e052dd70daed13a6a20433bfc75f7c23.zip |
Toolchain: Explicitly enable LTO, fix build on OpenBSD
Diffstat (limited to 'Toolchain/BuildIt.sh')
-rwxr-xr-x | Toolchain/BuildIt.sh | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Toolchain/BuildIt.sh b/Toolchain/BuildIt.sh index 9974c03c29..df14b45be6 100755 --- a/Toolchain/BuildIt.sh +++ b/Toolchain/BuildIt.sh @@ -233,10 +233,15 @@ pushd "$DIR/Build/$ARCH" --enable-shared \ --enable-languages=c,c++ \ --enable-default-pie \ + --enable-lto \ ${TRY_USE_LOCAL_TOOLCHAIN:+"--quiet"} || exit 1 echo "XXX build gcc and libgcc" - "$MAKE" -j "$MAKEJOBS" all-gcc all-target-libgcc || exit 1 + "$MAKE" -j "$MAKEJOBS" all-gcc || exit 1 + if [ "$(uname -s)" = "OpenBSD" ]; then + ln -sf liblto_plugin.so.0.0 gcc/liblto_plugin.so + fi + "$MAKE" -j "$MAKEJOBS" all-target-libgcc || exit 1 echo "XXX install gcc and libgcc" "$MAKE" install-gcc install-target-libgcc || exit 1 @@ -259,7 +264,7 @@ pushd "$DIR/Build/$ARCH" "$MAKE" install-target-libstdc++-v3 || exit 1 if [ "$(uname -s)" = "OpenBSD" ]; then - cd "$DIR/Local/libexec/gcc/$TARGET/$GCC_VERSION" && ln -sf liblto_plugin.so.0.0 liblto_plugin.so + cd "$DIR/Local/${ARCH}/libexec/gcc/$TARGET/$GCC_VERSION" && ln -sf liblto_plugin.so.0.0 liblto_plugin.so fi popd |