aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRobin Haberkorn <rhaberkorn@fmsbw.de>2025-09-28 18:58:55 +0200
committerRobin Haberkorn <rhaberkorn@fmsbw.de>2025-09-28 18:58:55 +0200
commited562cbabffe972c0ca3987ff0bab1f4ff26d10a (patch)
tree9e6961902b532f7f57442424c3ecc545c30e93bd
parent36ac6cef3c949d7b9e0dc3cac770cba911c4b241 (diff)
downloadsciteco-ed562cbabffe972c0ca3987ff0bab1f4ff26d10a.tar.gz
CI: fixed Windows LTO builds
* They were broken because of a confirmed Clang bug. * As a workaround, we are switching from libstdc++ to libc++. This is not the default under MINGW64, but also works. * See also https://github.com/HolyBlackCat/quasi-msys2/issues/44
-rwxr-xr-x.fmsbw/10-freebsd14-msys-sciteco38
1 files changed, 17 insertions, 21 deletions
diff --git a/.fmsbw/10-freebsd14-msys-sciteco b/.fmsbw/10-freebsd14-msys-sciteco
index 5337827..7c403ab 100755
--- a/.fmsbw/10-freebsd14-msys-sciteco
+++ b/.fmsbw/10-freebsd14-msys-sciteco
@@ -10,28 +10,27 @@ export ASSUME_ALWAYS_YES=yes
# gmake pkgconf autoconf automake libtool \
# glib gtk3 groff lowdown valgrind
#
-#pkg install llvm20 gnugrep gmake coreutils gsed git wget gnupg bash groff zip autoconf automake libtool python3
+#pkg install llvm21 gnugrep gmake coreutils gsed gawk git wget gnupg bash groff zip autoconf automake libtool python3
#git clone https://github.com/HolyBlackCat/quasi-msys2.git /opt/quasi-msys2
#cd /opt/quasi-msys2
#ln -s /usr/local/bin/gpgv2 /usr/local/bin/gpgv
#ln -s /usr/local/bin/bash /bin/bash
-# ln -s /usr/local/bin/clang20 gnu-overrides/clang
-# ln -s /usr/local/bin/clang++20 gnu-overrides/clang++
-# ln -s /usr/local/bin/llvm-windres20 gnu-overrides/llvm-windres
-# ln -s /usr/local/bin/ggrep gnu-overrides/grep
-# ln -s /usr/local/bin/gmake gnu-overrides/make
-# ln -s /usr/local/bin/gsed gnu-overrides/sed
-# ln -s /usr/local/bin/greadlink gnu-overrides/readlink
-# ln -s /usr/local/bin/wine64 gnu-overrides/wine
+#mkdir -p gnu-overrides
+#ln -s /usr/local/bin/ggrep gnu-overrides/grep
+#ln -s /usr/local/bin/gmake gnu-overrides/make
+#ln -s /usr/local/bin/gsed gnu-overrides/sed
+#ln -s /usr/local/bin/greadlink gnu-overrides/readlink
+#ln -s /usr/local/bin/wine64 gnu-overrides/wine
#echo MINGW64 >msystem.txt
-# cat >activate << EOF
+#cat >activate << EOF
#cd /opt/quasi-msys2
#export PATH=`pwd`/gnu-overrides:$PATH
+#export PKG_CONFIG=pkg-config
#set +ex
#. env/all.src
#set -ex
#EOF
-#gmake install _autotools _gcc _glib2 _pdcurses _gtk3 _librsvg
+#gmake install _autotools _gcc _libc++ _glib2 _pdcurses _gtk3 _librsvg
#ln -nfs "/opt/quasi-msys2/root/mingw64" /mingw64
#pkg clean -a
@@ -77,20 +76,17 @@ export CURSES_CFLAGS=-I/mingw64/include/pdcurses/
# itself statically - it only wastes a few MB.
# You will also have to add --enable-static-executables.
# The additional Windows libraries are for PDCursesMod/WinGUI:
-# LIBGLIB_LIBS: -lglib-2.0 -lintl -liconv -lpcre -lole32 -lws2_32 -luuid
+#export LIBGLIB_LIBS="-lglib-2.0 -lintl -liconv -lpcre -lole32 -lws2_32 -luuid"
# FIXME: Once there is an --enable-lto, we should use that.
-#CFLAGS: -O3 -flto -DGLIB_STATIC_COMPILATION
-# FIXME: Get -flto to work again.
-#export CFLAGS="-O3 -flto"
-#export CXXFLAGS="-O3 -flto"
-#export LDFLAGS="-flto"
-export CFLAGS="-O3"
-export CXXFLAGS="-O3"
+#export CFLAGS="-O3 -flto -DGLIB_STATIC_COMPILATION"
+# NOTE: LTO is broken with libstdc++.
+# https://github.com/HolyBlackCat/quasi-msys2/issues/44
+export CFLAGS="-O3 -flto=thin"
+export CXXFLAGS="-O3 -flto=thin -stdlib=libc++"
+export LDFLAGS="-flto=thin -stdlib=libc++"
# We cannot run Windows binaries automatically through Wine,
# so we must still force cross-compilation with --host.
-# Still make sure we don't pick up the MinGW pkg-config
-export PKG_CONFIG=pkg-config
#autoreconf -i
mkdir build-wingui build-wincon