From 1de7448dce15a84237c47abe70437a27224f5df5 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 11 Dec 2022 02:06:00 +0000 Subject: [PATCH] More cairo details, build LTO stuff in separate dirs Signed-off-by: falkTX --- bootstrap-plugins.sh | 3 +++ setup/env.sh | 10 +++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/bootstrap-plugins.sh b/bootstrap-plugins.sh index 9012750..5ec769f 100755 --- a/bootstrap-plugins.sh +++ b/bootstrap-plugins.sh @@ -120,6 +120,9 @@ build_cmake freetype "${FREETYPE_VERSION}" "${FREETYPE_EXTRAFLAGS}" if [ ! -e "${PAWPAW_PREFIX}/lib/pkgconfig/freetype2.pc-e" ]; then sed -i -e 's/, libbrotlidec//' "${PAWPAW_PREFIX}/lib/pkgconfig/freetype2.pc" + if [ "${MACOS}" -eq 1 ]; then + sed -i -e 's/Requires: zlib,/Requires:/' "${PAWPAW_PREFIX}/lib/pkgconfig/freetype2.pc" + fi touch "${PAWPAW_PREFIX}/lib/pkgconfig/freetype2.pc-e" fi diff --git a/setup/env.sh b/setup/env.sh index 0eec5ca..5fd98cf 100644 --- a/setup/env.sh +++ b/setup/env.sh @@ -56,6 +56,11 @@ PAWPAW_BUILDDIR="${PAWPAW_DIR}/builds/${PAWPAW_TARGET}" PAWPAW_PREFIX="${PAWPAW_DIR}/targets/${PAWPAW_TARGET}" PAWPAW_TMPDIR="/tmp" +if [ -z "${PAWPAW_SKIP_LTO}" ] || [ "${PAWPAW_SKIP_LTO}" -eq 0 ]; then + PAWPAW_BUILDDIR+="-lto" + PAWPAW_PREFIX+="-lto" +fi + # --------------------------------------------------------------------------------------------------------------------- # build environment @@ -133,7 +138,10 @@ TARGET_CXXFLAGS="${BUILD_FLAGS} -fvisibility-inlines-hidden" LINK_FLAGS="-L${PAWPAW_PREFIX}/lib ${BUILD_FLAGS} ${EXTRA_FLAGS}" if [ -z "${PAWPAW_SKIP_LTO}" ] || [ "${PAWPAW_SKIP_LTO}" -eq 0 ]; then - LINK_FLAGS+=" -Werror=odr -Werror=lto-type-mismatch" + LINK_FLAGS+=" -Werror=odr" + if [ "${GCC}" -eq 1 ]; then + LINK_FLAGS+=" -Werror=lto-type-mismatch" + fi fi if [ "${MACOS}" -eq 1 ]; then