From d36d66e6d8f8da372bc8b6dc23b69a69c8b84960 Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Mon, 23 Jan 2017 09:28:47 +0100 Subject: sys-devel/llvm: Backport upstream Sphinx race fix to 3.9, #606858 It seems that we have only applied the patch fixing race condition between LLVM Sphinx targets and not between clang's. To fix that, just switch to the upstream patch that fixes both at the root. --- ...n-ordering-dep-between-HTML-man-Sphinx-ta.patch | 33 ++++++++++++++++++++ ...n-ordering-dep-between-HTML-man-Sphinx-ta.patch | 33 -------------------- ...eparate-doctrees-to-prevent-races-between.patch | 35 ++++++++++++++++++++++ sys-devel/llvm/llvm-3.7.1-r3.ebuild | 2 +- sys-devel/llvm/llvm-3.8.1-r2.ebuild | 2 +- sys-devel/llvm/llvm-3.8.1.ebuild | 2 +- sys-devel/llvm/llvm-3.9.0-r1.ebuild | 2 +- sys-devel/llvm/llvm-3.9.1-r1.ebuild | 2 +- sys-devel/llvm/llvm-3.9.1.ebuild | 2 +- 9 files changed, 74 insertions(+), 39 deletions(-) create mode 100644 sys-devel/llvm/files/3.8.1/0004-cmake-Add-an-ordering-dep-between-HTML-man-Sphinx-ta.patch delete mode 100644 sys-devel/llvm/files/3.9.1/0004-cmake-Add-an-ordering-dep-between-HTML-man-Sphinx-ta.patch create mode 100644 sys-devel/llvm/files/3.9.1/0004-cmake-Use-separate-doctrees-to-prevent-races-between.patch (limited to 'sys-devel/llvm') diff --git a/sys-devel/llvm/files/3.8.1/0004-cmake-Add-an-ordering-dep-between-HTML-man-Sphinx-ta.patch b/sys-devel/llvm/files/3.8.1/0004-cmake-Add-an-ordering-dep-between-HTML-man-Sphinx-ta.patch new file mode 100644 index 000000000000..94a81574d6ee --- /dev/null +++ b/sys-devel/llvm/files/3.8.1/0004-cmake-Add-an-ordering-dep-between-HTML-man-Sphinx-ta.patch @@ -0,0 +1,33 @@ +From 2f798e87c10a93235a00e95c38e736f9ff7e991b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= +Date: Mon, 8 Jun 2015 14:29:03 +0200 +Subject: [PATCH 04/10] cmake: Add an ordering dep between HTML & man Sphinx + targets + +Add a dependency between HTML & manpage Sphinx targets to prevent two +instances of Sphinx from running in parallel, and therefore solves race +conditions reusing the same doctree directory. + +Bug: https://llvm.org/bugs/show_bug.cgi?id=23781 +Patch: https://reviews.llvm.org/D23755 +--- + docs/CMakeLists.txt | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt +index f2cd7e9..179a65b 100644 +--- a/docs/CMakeLists.txt ++++ b/docs/CMakeLists.txt +@@ -109,6 +109,9 @@ if (LLVM_ENABLE_SPHINX) + + if (${SPHINX_OUTPUT_MAN}) + add_sphinx_target(man llvm) ++ if (${SPHINX_OUTPUT_HTML}) ++ add_dependencies(docs-llvm-html docs-llvm-man) ++ endif() + endif() + + endif() +-- +2.9.3 + diff --git a/sys-devel/llvm/files/3.9.1/0004-cmake-Add-an-ordering-dep-between-HTML-man-Sphinx-ta.patch b/sys-devel/llvm/files/3.9.1/0004-cmake-Add-an-ordering-dep-between-HTML-man-Sphinx-ta.patch deleted file mode 100644 index 94a81574d6ee..000000000000 --- a/sys-devel/llvm/files/3.9.1/0004-cmake-Add-an-ordering-dep-between-HTML-man-Sphinx-ta.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 2f798e87c10a93235a00e95c38e736f9ff7e991b Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= -Date: Mon, 8 Jun 2015 14:29:03 +0200 -Subject: [PATCH 04/10] cmake: Add an ordering dep between HTML & man Sphinx - targets - -Add a dependency between HTML & manpage Sphinx targets to prevent two -instances of Sphinx from running in parallel, and therefore solves race -conditions reusing the same doctree directory. - -Bug: https://llvm.org/bugs/show_bug.cgi?id=23781 -Patch: https://reviews.llvm.org/D23755 ---- - docs/CMakeLists.txt | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt -index f2cd7e9..179a65b 100644 ---- a/docs/CMakeLists.txt -+++ b/docs/CMakeLists.txt -@@ -109,6 +109,9 @@ if (LLVM_ENABLE_SPHINX) - - if (${SPHINX_OUTPUT_MAN}) - add_sphinx_target(man llvm) -+ if (${SPHINX_OUTPUT_HTML}) -+ add_dependencies(docs-llvm-html docs-llvm-man) -+ endif() - endif() - - endif() --- -2.9.3 - diff --git a/sys-devel/llvm/files/3.9.1/0004-cmake-Use-separate-doctrees-to-prevent-races-between.patch b/sys-devel/llvm/files/3.9.1/0004-cmake-Use-separate-doctrees-to-prevent-races-between.patch new file mode 100644 index 000000000000..1e01e640b3dc --- /dev/null +++ b/sys-devel/llvm/files/3.9.1/0004-cmake-Use-separate-doctrees-to-prevent-races-between.patch @@ -0,0 +1,35 @@ +From 40960f63616f62c8ac52eeeddf68bdb441b8be3e Mon Sep 17 00:00:00 2001 +From: Michal Gorny +Date: Tue, 4 Oct 2016 06:09:14 +0000 +Subject: [PATCH] [cmake] Use separate doctrees to prevent races between Sphinx + instances + +Use separate doctrees between different Sphinx builders in order to +prevent race condition issues due to multiple Sphinx instances accessing +the same doctree cache in parallel. + +Bug: https://llvm.org/bugs/show_bug.cgi?id=23781 + +Differential Revision: https://reviews.llvm.org/D23755 + +git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283188 91177308-0d34-0410-b5e6-96231b3b80d8 +--- + cmake/modules/AddSphinxTarget.cmake | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/cmake/modules/AddSphinxTarget.cmake b/cmake/modules/AddSphinxTarget.cmake +index a968555aa06..ca9f4c38ffd 100644 +--- a/cmake/modules/AddSphinxTarget.cmake ++++ b/cmake/modules/AddSphinxTarget.cmake +@@ -6,7 +6,7 @@ + # ``project`` should be the project name + function (add_sphinx_target builder project) + set(SPHINX_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/${builder}") +- set(SPHINX_DOC_TREE_DIR "${CMAKE_CURRENT_BINARY_DIR}/_doctrees") ++ set(SPHINX_DOC_TREE_DIR "${CMAKE_CURRENT_BINARY_DIR}/_doctrees-${builder}") + set(SPHINX_TARGET_NAME docs-${project}-${builder}) + + if (SPHINX_WARNINGS_AS_ERRORS) +-- +2.11.0 + diff --git a/sys-devel/llvm/llvm-3.7.1-r3.ebuild b/sys-devel/llvm/llvm-3.7.1-r3.ebuild index b1e9ceb1ddc4..edebcba3c61e 100644 --- a/sys-devel/llvm/llvm-3.7.1-r3.ebuild +++ b/sys-devel/llvm/llvm-3.7.1-r3.ebuild @@ -167,7 +167,7 @@ src_prepare() { # Prevent race conditions with parallel Sphinx runs # https://llvm.org/bugs/show_bug.cgi?id=23781 - eapply "${FILESDIR}"/3.9.1/0004-cmake-Add-an-ordering-dep-between-HTML-man-Sphinx-ta.patch + eapply "${FILESDIR}"/3.8.1/0004-cmake-Add-an-ordering-dep-between-HTML-man-Sphinx-ta.patch # Prevent installing libgtest # https://llvm.org/bugs/show_bug.cgi?id=18341 diff --git a/sys-devel/llvm/llvm-3.8.1-r2.ebuild b/sys-devel/llvm/llvm-3.8.1-r2.ebuild index 5ba7822d0e65..fd640fc15259 100644 --- a/sys-devel/llvm/llvm-3.8.1-r2.ebuild +++ b/sys-devel/llvm/llvm-3.8.1-r2.ebuild @@ -167,7 +167,7 @@ src_prepare() { # Prevent race conditions with parallel Sphinx runs # https://llvm.org/bugs/show_bug.cgi?id=23781 - eapply "${FILESDIR}"/3.9.1/0004-cmake-Add-an-ordering-dep-between-HTML-man-Sphinx-ta.patch + eapply "${FILESDIR}"/3.8.1/0004-cmake-Add-an-ordering-dep-between-HTML-man-Sphinx-ta.patch # Prevent installing libgtest # https://llvm.org/bugs/show_bug.cgi?id=18341 diff --git a/sys-devel/llvm/llvm-3.8.1.ebuild b/sys-devel/llvm/llvm-3.8.1.ebuild index dcc83531c0d2..86a8fe9e685a 100644 --- a/sys-devel/llvm/llvm-3.8.1.ebuild +++ b/sys-devel/llvm/llvm-3.8.1.ebuild @@ -168,7 +168,7 @@ src_prepare() { # Prevent race conditions with parallel Sphinx runs # https://llvm.org/bugs/show_bug.cgi?id=23781 - eapply "${FILESDIR}"/3.9.1/0004-cmake-Add-an-ordering-dep-between-HTML-man-Sphinx-ta.patch + eapply "${FILESDIR}"/3.8.1/0004-cmake-Add-an-ordering-dep-between-HTML-man-Sphinx-ta.patch # Prevent installing libgtest # https://llvm.org/bugs/show_bug.cgi?id=18341 diff --git a/sys-devel/llvm/llvm-3.9.0-r1.ebuild b/sys-devel/llvm/llvm-3.9.0-r1.ebuild index 814931bd5b3b..f33c557a99af 100644 --- a/sys-devel/llvm/llvm-3.9.0-r1.ebuild +++ b/sys-devel/llvm/llvm-3.9.0-r1.ebuild @@ -178,7 +178,7 @@ src_prepare() { # Prevent race conditions with parallel Sphinx runs # https://llvm.org/bugs/show_bug.cgi?id=23781 - eapply "${FILESDIR}"/3.9.1/0004-cmake-Add-an-ordering-dep-between-HTML-man-Sphinx-ta.patch + eapply "${FILESDIR}"/3.9.1/0004-cmake-Use-separate-doctrees-to-prevent-races-between.patch # Allow custom cmake build types (like 'Gentoo') eapply "${FILESDIR}"/3.9.1/0006-cmake-Remove-the-CMAKE_BUILD_TYPE-assertion.patch diff --git a/sys-devel/llvm/llvm-3.9.1-r1.ebuild b/sys-devel/llvm/llvm-3.9.1-r1.ebuild index 20bee28c2882..5bae5d3b965f 100644 --- a/sys-devel/llvm/llvm-3.9.1-r1.ebuild +++ b/sys-devel/llvm/llvm-3.9.1-r1.ebuild @@ -178,7 +178,7 @@ src_prepare() { # Prevent race conditions with parallel Sphinx runs # https://llvm.org/bugs/show_bug.cgi?id=23781 - eapply "${FILESDIR}"/3.9.1/0004-cmake-Add-an-ordering-dep-between-HTML-man-Sphinx-ta.patch + eapply "${FILESDIR}"/3.9.1/0004-cmake-Use-separate-doctrees-to-prevent-races-between.patch # Allow custom cmake build types (like 'Gentoo') eapply "${FILESDIR}"/3.9.1/0006-cmake-Remove-the-CMAKE_BUILD_TYPE-assertion.patch diff --git a/sys-devel/llvm/llvm-3.9.1.ebuild b/sys-devel/llvm/llvm-3.9.1.ebuild index 6fbfcd881720..c24c19f7b5f0 100644 --- a/sys-devel/llvm/llvm-3.9.1.ebuild +++ b/sys-devel/llvm/llvm-3.9.1.ebuild @@ -178,7 +178,7 @@ src_prepare() { # Prevent race conditions with parallel Sphinx runs # https://llvm.org/bugs/show_bug.cgi?id=23781 - eapply "${FILESDIR}"/3.9.1/0004-cmake-Add-an-ordering-dep-between-HTML-man-Sphinx-ta.patch + eapply "${FILESDIR}"/3.9.1/0004-cmake-Use-separate-doctrees-to-prevent-races-between.patch # Allow custom cmake build types (like 'Gentoo') eapply "${FILESDIR}"/3.9.1/0006-cmake-Remove-the-CMAKE_BUILD_TYPE-assertion.patch -- cgit v1.2.3-65-gdbad