From 27c047e53c293fa14913bb8128874cfd1174e131 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Thu, 24 Oct 2019 09:01:45 +0200 Subject: external/glm: Avoid -std=c++2a -Werror,-Wdeprecated-volatile ...as seen with recent Clang 10 trunk clang-cl: > In file included from vcl/source/gdi/salgdilayout.cxx:24: > In file included from vcl/inc\openglgdiimpl.hxx:31: > In file included from vcl/inc/opengl/RenderList.hxx:16: > In file included from workdir/UnpackedTarball/glm\glm/glm.hpp:98: > In file included from workdir/UnpackedTarball/glm\glm/./core/type.hpp:32: > In file included from workdir/UnpackedTarball/glm\glm/core/type_half.hpp:116: > workdir/UnpackedTarball/glm\glm/core/type_half.inl(43,6): error: compound assignment to object of volatile-qualified type 'volatile float' is deprecated [-Werror,-Wdeprecated-volatile] > f *= f; // this will overflow before > ^ Change-Id: I97fdfc0650344db1401cdce126f6755df00c5a0e Reviewed-on: https://gerrit.libreoffice.org/81427 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- external/glm/UnpackedTarball_glm.mk | 1 + external/glm/c++20.patch.0 | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100755 external/glm/c++20.patch.0 (limited to 'external') diff --git a/external/glm/UnpackedTarball_glm.mk b/external/glm/UnpackedTarball_glm.mk index 71f1c3cd8ff8..940d12372b94 100644 --- a/external/glm/UnpackedTarball_glm.mk +++ b/external/glm/UnpackedTarball_glm.mk @@ -20,6 +20,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,glm, \ external/glm/Wsign-compare.patch.0 \ external/glm/Wunused-parameter.patch \ external/glm/clang-cl.patch.0 \ + external/glm/c++20.patch.0 \ )) # vim: set noet sw=4 ts=4: diff --git a/external/glm/c++20.patch.0 b/external/glm/c++20.patch.0 new file mode 100755 index 000000000000..559adde48946 --- /dev/null +++ b/external/glm/c++20.patch.0 @@ -0,0 +1,11 @@ +--- glm/core/type_half.inl ++++ glm/core/type_half.inl +@@ -40,7 +40,7 @@ + volatile float f = 1e10; + + for(int i = 0; i < 10; ++i) +- f *= f; // this will overflow before ++ f = f * f; // this will overflow before + // the for­loop terminates + return f; + } -- cgit v1.2.3