From 21ef5222142188992d3a22053ac655f317b85a28 Mon Sep 17 00:00:00 2001 From: Ionen Wolkens Date: Fri, 4 Nov 2022 13:17:31 -0400 Subject: dev-util/mingw64-toolchain: handle two race condition issues Using same --shuffle seed as bug #879537, ran into two different issues. First missing lib32/lib64 dirs when building out-of-source then the missing msvcr*_extra dependency. Closes: https://bugs.gentoo.org/879537 Signed-off-by: Ionen Wolkens --- .../mingw64-runtime-10.0.0-msvcr-extra-race.patch | 22 ++++++++++++++++++++++ .../mingw64-toolchain-10.0.0_p1-r1.ebuild | 6 +++++- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 dev-util/mingw64-toolchain/files/mingw64-runtime-10.0.0-msvcr-extra-race.patch diff --git a/dev-util/mingw64-toolchain/files/mingw64-runtime-10.0.0-msvcr-extra-race.patch b/dev-util/mingw64-toolchain/files/mingw64-runtime-10.0.0-msvcr-extra-race.patch new file mode 100644 index 000000000000..263dd8b4ac9b --- /dev/null +++ b/dev-util/mingw64-toolchain/files/mingw64-runtime-10.0.0-msvcr-extra-race.patch @@ -0,0 +1,22 @@ +https://bugs.gentoo.org/879537 +https://sourceforge.net/p/mingw-w64/mingw-w64/ci/e1b0c1420bbd52ef505c71737c57393ac1397b0a +(Makefile.in regenerated in 0eeb66e041327b9ca3f6bc1dd1d0a0bd2f46254d) +--- a/mingw64/mingw-w64-crt/Makefile.in ++++ b/mingw64/mingw-w64-crt/Makefile.in +@@ -77916,11 +77916,11 @@ + @LIB32_TRUE@@W32API_FALSE@ cd $(dir $@) && $(AR) -M < $(abspath $<) +-@LIB32_TRUE@@W32API_FALSE@lib32/libmsvcrt10.a: lib32/msvcrt10.mri lib32/libmsvcrt10_def.a lib32/libmsvcrt_common.a ++@LIB32_TRUE@@W32API_FALSE@lib32/libmsvcrt10.a: lib32/msvcrt10.mri lib32/libmsvcrt10_def.a lib32/libmsvcrt_common.a lib32/libmsvcrt10_extra.a + @LIB32_TRUE@@W32API_FALSE@ cd $(dir $@) && $(AR) -M < $(abspath $<) +-@LIB32_TRUE@@W32API_FALSE@lib32/libmsvcrt20.a: lib32/msvcrt20.mri lib32/libmsvcrt20_def.a lib32/libmsvcrt_common.a ++@LIB32_TRUE@@W32API_FALSE@lib32/libmsvcrt20.a: lib32/msvcrt20.mri lib32/libmsvcrt20_def.a lib32/libmsvcrt_common.a lib32/libmsvcrt20_extra.a + @LIB32_TRUE@@W32API_FALSE@ cd $(dir $@) && $(AR) -M < $(abspath $<) +-@LIB32_TRUE@@W32API_FALSE@lib32/libmsvcrt40.a: lib32/msvcrt40.mri lib32/libmsvcrt40_def.a lib32/libmsvcrt_common.a ++@LIB32_TRUE@@W32API_FALSE@lib32/libmsvcrt40.a: lib32/msvcrt40.mri lib32/libmsvcrt40_def.a lib32/libmsvcrt_common.a lib32/libmsvcrt40_extra.a + @LIB32_TRUE@@W32API_FALSE@ cd $(dir $@) && $(AR) -M < $(abspath $<) +-@LIB32_TRUE@@W32API_FALSE@lib32/libmsvcr70.a: lib32/msvcr70.mri lib32/libmsvcr70_def.a lib32/libmsvcrt_common.a ++@LIB32_TRUE@@W32API_FALSE@lib32/libmsvcr70.a: lib32/msvcr70.mri lib32/libmsvcr70_def.a lib32/libmsvcrt_common.a lib32/libmsvcr70_extra.a + @LIB32_TRUE@@W32API_FALSE@ cd $(dir $@) && $(AR) -M < $(abspath $<) +-@LIB32_TRUE@@W32API_FALSE@lib32/libmsvcr71.a: lib32/msvcr71.mri lib32/libmsvcr71_def.a lib32/libmsvcrt_common.a ++@LIB32_TRUE@@W32API_FALSE@lib32/libmsvcr71.a: lib32/msvcr71.mri lib32/libmsvcr71_def.a lib32/libmsvcrt_common.a lib32/libmsvcr71_extra.a + @LIB32_TRUE@@W32API_FALSE@ cd $(dir $@) && $(AR) -M < $(abspath $<) diff --git a/dev-util/mingw64-toolchain/mingw64-toolchain-10.0.0_p1-r1.ebuild b/dev-util/mingw64-toolchain/mingw64-toolchain-10.0.0_p1-r1.ebuild index 4b6d2cf8e8e0..1394d8b7f905 100644 --- a/dev-util/mingw64-toolchain/mingw64-toolchain-10.0.0_p1-r1.ebuild +++ b/dev-util/mingw64-toolchain/mingw64-toolchain-10.0.0_p1-r1.ebuild @@ -43,6 +43,7 @@ RDEPEND=" DEPEND="${RDEPEND}" PATCHES=( + "${FILESDIR}"/mingw64-runtime-10.0.0-msvcr-extra-race.patch "${FILESDIR}"/mingw64-runtime-10.0.0-tmp-files-clash.patch "${FILESDIR}"/gcc-11.3.0-plugin-objdump.patch "${FILESDIR}"/gcc-12.2.0-drop-cflags-sed.patch @@ -214,7 +215,7 @@ src_compile() { einfo "Building ${id}${2+ ${2}} in ${build_dir} ..." - mkdir "${build_dir}" || die + mkdir -p "${build_dir}" || die pushd "${build_dir}" >/dev/null || die edo "${conf[@]}" @@ -227,6 +228,9 @@ src_compile() { popd >/dev/null || die } + # workaround race condition with out-of-source crt build (bug #879537) + mkdir -p mingw64_runtime-build/mingw-w64-crt/lib{32,64} || die + # build with same ordering that crossdev would do + stage3 for pthreads mwt-build binutils mwt-build mingw64 headers -- cgit v1.2.3-65-gdbad