diff options
author | Bastien Montagne <bastien@blender.org> | 2021-12-20 18:11:20 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2021-12-20 18:17:42 +0300 |
commit | 6c33a0f6d6d2e8cd091fd089d2458a310dc5ca52 (patch) | |
tree | e3bd4ac0a8eb68aee2ed05a47166d2665e1e9963 /build_files/build_environment | |
parent | edb3ab061730aa1369298eb510331e6536c82a04 (diff) |
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.
Diffstat (limited to 'build_files/build_environment')
-rw-r--r-- | build_files/build_environment/patches/usd.diff | 35 |
1 files changed, 35 insertions, 0 deletions
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)); + }); |