Toolchain: Explicitly enable LTO, fix build on OpenBSD

This commit is contained in:
joshua stein 2020-12-30 21:00:45 -06:00 committed by Andreas Kling
parent 0d215b5548
commit 4a2209d0e0
Notes: sideshowbarker 2024-07-18 22:20:37 +09:00

View file

@ -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