From 0bdd04209cdb4228fb157abf3e82dd46830ed52c Mon Sep 17 00:00:00 2001 From: Andrew Eikum Date: Fri, 22 Nov 2019 12:11:51 -0600 Subject: [PATCH] build-mingw-w64.sh: Build libstdc++v3 twice The first build is missing a bunch of libc functions because libstdc++ is missing (obviously). Building again lets it find these libc functions and take better codepaths. This fixes D9VK performance regressions, for example in Rocket League. --- build-mingw-w64.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/build-mingw-w64.sh b/build-mingw-w64.sh index 90250582..3f422b09 100755 --- a/build-mingw-w64.sh +++ b/build-mingw-w64.sh @@ -120,12 +120,19 @@ function build_arch { popd pushd gcc/ - #below steps require libgcc in default library location, but + #next step requires libgcc in default library location, but #"canadian" build doesn't handle that, so install it explicitly PATH=$NEWPATH make configure-target-libgcc PATH=$NEWPATH make -C $WIN32_TARGET_ARCH/libgcc $JOBS PATH=$NEWPATH make -C $WIN32_TARGET_ARCH/libgcc $JOBS install + #install libstdc++ and other stuff + PATH=$NEWPATH make $JOBS + PATH=$NEWPATH make $JOBS install + + #libstdc++ requires that libstdc++ is installed in order to find gettimeofday(???) + #so, rebuild libstdc++ after installing it above + PATH=$NEWPATH make $JOBS -C $WIN32_TARGET_ARCH/libstdc++-v3/ distclean PATH=$NEWPATH make $JOBS PATH=$NEWPATH make $JOBS install popd