diff mbox series

[meta-oe,2/5] glm: Update to tip of trunk

Message ID 20230302083116.1332448-2-raj.khem@gmail.com
State New
Headers show
Series [meta-oe,1/5] pkcs11-helper: Update to latest tip of trunk | expand

Commit Message

Khem Raj March 2, 2023, 8:31 a.m. UTC
Do not use -Werror on clang

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../0001-Do-not-use-Werror-with-clang.patch   | 30 +++++++++++++++++++
 .../glm/glm/0001-Silence-clang-warnings.patch | 20 -------------
 meta-oe/recipes-graphics/glm/glm_0.9.9.8.bb   |  6 ++--
 3 files changed, 33 insertions(+), 23 deletions(-)
 create mode 100644 meta-oe/recipes-graphics/glm/glm/0001-Do-not-use-Werror-with-clang.patch
diff mbox series

Patch

diff --git a/meta-oe/recipes-graphics/glm/glm/0001-Do-not-use-Werror-with-clang.patch b/meta-oe/recipes-graphics/glm/glm/0001-Do-not-use-Werror-with-clang.patch
new file mode 100644
index 0000000000..7b3e005ff9
--- /dev/null
+++ b/meta-oe/recipes-graphics/glm/glm/0001-Do-not-use-Werror-with-clang.patch
@@ -0,0 +1,30 @@ 
+From ee405855bca7d6399ff1a1aef952010056c84ff6 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 1 Mar 2023 21:08:09 -0800
+Subject: [PATCH] Do not use -Werror with clang
+
+Too many warnings to handle for a distro build
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ test/CMakeLists.txt | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
+index e7f85f19..0b6fd980 100644
+--- a/test/CMakeLists.txt
++++ b/test/CMakeLists.txt
+@@ -197,10 +197,6 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+ 		message("GLM: Clang - ${CMAKE_CXX_COMPILER_ID} compiler")
+ 	endif()
+ 
+-	add_compile_options(-Werror -Weverything)
+-	add_compile_options(-Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-c++11-long-long -Wno-padded -Wno-gnu-anonymous-struct -Wno-nested-anon-types)
+-	add_compile_options(-Wno-undefined-reinterpret-cast -Wno-sign-conversion -Wno-unused-variable -Wno-missing-prototypes -Wno-unreachable-code -Wno-missing-variable-declarations -Wno-sign-compare -Wno-global-constructors -Wno-unused-macros -Wno-format-nonliteral)
+-
+ elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
+ 	if(NOT GLM_QUIET)
+ 		message("GLM: GCC - ${CMAKE_CXX_COMPILER_ID} compiler")
+-- 
+2.39.2
+
diff --git a/meta-oe/recipes-graphics/glm/glm/0001-Silence-clang-warnings.patch b/meta-oe/recipes-graphics/glm/glm/0001-Silence-clang-warnings.patch
index 3a62fffe3a..10692dd423 100644
--- a/meta-oe/recipes-graphics/glm/glm/0001-Silence-clang-warnings.patch
+++ b/meta-oe/recipes-graphics/glm/glm/0001-Silence-clang-warnings.patch
@@ -26,8 +26,6 @@  Signed-off-by: Khem Raj <raj.khem@gmail.com>
  test/gtx/gtx_fast_trigonometry.cpp | 30 ++++++++++++------------------
  3 files changed, 14 insertions(+), 20 deletions(-)
 
-diff --git a/glm/ext/quaternion_common.inl b/glm/ext/quaternion_common.inl
-index 0e4a3bb2..6f99f52d 100644
 --- a/glm/ext/quaternion_common.inl
 +++ b/glm/ext/quaternion_common.inl
 @@ -104,7 +104,7 @@ namespace glm
@@ -39,21 +37,6 @@  index 0e4a3bb2..6f99f52d 100644
              return (sin(angle - a * phi)* x + sin(a * phi) * z) / sin(angle);
          }
      }
-diff --git a/glm/gtc/random.inl b/glm/gtc/random.inl
-index 70485098..a4af2a06 100644
---- a/glm/gtc/random.inl
-+++ b/glm/gtc/random.inl
-@@ -22,7 +22,7 @@ namespace detail
- 		GLM_FUNC_QUALIFIER static vec<1, uint8, P> call()
- 		{
- 			return vec<1, uint8, P>(
--				std::rand() % std::numeric_limits<uint8>::max());
-+				static_cast<uint8>(std::rand()) % std::numeric_limits<uint8>::max());
- 		}
- 	};
- 
-diff --git a/test/gtx/gtx_fast_trigonometry.cpp b/test/gtx/gtx_fast_trigonometry.cpp
-index 8bf86ba0..ddaa708b 100644
 --- a/test/gtx/gtx_fast_trigonometry.cpp
 +++ b/test/gtx/gtx_fast_trigonometry.cpp
 @@ -19,15 +19,14 @@ namespace fastCos
@@ -160,6 +143,3 @@  index 8bf86ba0..ddaa708b 100644
  		const std::clock_t timestamp3 = std::clock();
  		const std::clock_t time_fast = timestamp2 - timestamp1;
  		const std::clock_t time_default = timestamp3 - timestamp2;
--- 
-2.31.1
-
diff --git a/meta-oe/recipes-graphics/glm/glm_0.9.9.8.bb b/meta-oe/recipes-graphics/glm/glm_0.9.9.8.bb
index 9edcb2b6e1..3797314b47 100644
--- a/meta-oe/recipes-graphics/glm/glm_0.9.9.8.bb
+++ b/meta-oe/recipes-graphics/glm/glm_0.9.9.8.bb
@@ -11,19 +11,19 @@  LIC_FILES_CHKSUM = "file://copying.txt;md5=462e4b97f73ef12f8171c3c546ce4e8d"
 SRC_URI = " \
     git://github.com/g-truc/glm;branch=master;protocol=https \
     file://0001-Silence-clang-warnings.patch \
+    file://0001-Do-not-use-Werror-with-clang.patch \
     file://glmConfig.cmake.in \
     file://glmConfigVersion.cmake.in \
     file://glm.pc.in \
     file://glmTargets.cmake \
 "
-SRCREV = "bf71a834948186f4097caa076cd2663c69a10e1e"
+SRCREV = "efec5db081e3aad807d0731e172ac597f6a39447"
+PV .= "+0.9.9.9+git${SRCPV}"
 
 S = "${WORKDIR}/git"
 
 inherit cmake
 
-CXXFLAGS:append:toolchain-clang = " -Wno-error=invalid-utf8 -Wno-error=disabled-macro-expansion -Wno-error=reserved-identifier"
-
 do_install() {
     install -d ${D}${includedir} ${D}${docdir}/glm ${D}${libdir}/pkgconfig ${D}${libdir}/cmake/glm
     cp -R --no-dereference --preserve=mode,links ${S}/glm ${D}${includedir}