[Bf-blender-cvs] [6c33a0f6d6d] master: Update our USD 21.02 patch to support gcc-11
Bastien Montagne
noreply at git.blender.org
Mon Dec 20 16:17:53 CET 2021
Commit: 6c33a0f6d6d2e8cd091fd089d2458a310dc5ca52
Author: Bastien Montagne
Date: Mon Dec 20 16:11:20 2021 +0100
Branches: master
https://developer.blender.org/rB6c33a0f6d6d2e8cd091fd089d2458a310dc5ca52
Update our USD 21.02 patch to support gcc-11
There are two issues in USD code that break building it with gcc-11,
one (in `demangle.cpp`) was already fixed upstream, the other (in
`singularTask.h`) is still pending (reported upstream, see
https://github.com/PixarAnimationStudios/USD/issues/1721).
CC #platforms_builds_tests_devices project.
===================================================================
M build_files/build_environment/patches/usd.diff
===================================================================
diff --git a/build_files/build_environment/patches/usd.diff b/build_files/build_environment/patches/usd.diff
index dc4982ad114..8ea1e2054c1 100644
--- a/build_files/build_environment/patches/usd.diff
+++ b/build_files/build_environment/patches/usd.diff
@@ -197,3 +197,38 @@ index 67ec0d15f..6dc3e85a0 100644
#else
#error Unknown architecture.
#endif
+
+diff --git a/pxr/base/arch/demangle.cpp b/pxr/base/arch/demangle.cpp
+index 67ec0d15f..6dc3e85a0 100644
+--- a/pxr/base/arch/demangle.cpp
++++ b/pxr/base/arch/demangle.cpp
+@@ -36,6 +36,7 @@
+ #if (ARCH_COMPILER_GCC_MAJOR == 3 && ARCH_COMPILER_GCC_MINOR >= 1) || \
+ ARCH_COMPILER_GCC_MAJOR > 3 || defined(ARCH_COMPILER_CLANG)
+ #define _AT_LEAST_GCC_THREE_ONE_OR_CLANG
++#include <cxxabi.h>
+ #endif
+
+ PXR_NAMESPACE_OPEN_SCOPE
+@@ -138,7 +139,6 @@
+ #endif
+
+ #if defined(_AT_LEAST_GCC_THREE_ONE_OR_CLANG)
+-#include <cxxabi.h>
+
+ /*
+ * This routine doesn't work when you get to gcc3.4.
+
+diff --git a/pxr/base/work/singularTask.h b/pxr/base/work/singularTask.h
+index 67ec0d15f..6dc3e85a0 100644
+--- a/pxr/base/work/singularTask.h
++++ b/pxr/base/work/singularTask.h
+@@ -120,7 +120,7 @@
+ // case we go again to ensure the task can do whatever it
+ // was awakened to do. Once we successfully take the count
+ // to zero, we stop.
+- size_t old = count;
++ std::size_t old = count;
+ do { _fn(); } while (
+ !count.compare_exchange_strong(old, 0));
+ });
More information about the Bf-blender-cvs
mailing list