summaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-10-24 09:01:45 +0200
committerStephan Bergmann <sbergman@redhat.com>2019-10-24 10:52:17 +0200
commit27c047e53c293fa14913bb8128874cfd1174e131 (patch)
tree361045bc9929a63425f3eed8e0e7f009ba7d0676 /external
parent7364a206a67f73513590fbb55e9e1d630c97aab1 (diff)
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 <sbergman@redhat.com>
Diffstat (limited to 'external')
-rw-r--r--external/glm/UnpackedTarball_glm.mk1
-rwxr-xr-xexternal/glm/c++20.patch.011
2 files changed, 12 insertions, 0 deletions
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 forloop terminates
+ return f;
+ }