All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe][PATCH] opengl-es-cts: Disable -Wuninitialized for external/amber
@ 2021-03-03 20:17 Khem Raj
  0 siblings, 0 replies; only message in thread
From: Khem Raj @ 2021-03-03 20:17 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Khem Raj, Dmitry Baryshkov

the code in verifier.cc needs to be ported to use enums or memcpy as it
violates aliasing rules. Until then disable the warning

HexFloat16ToFloat, HexFloat10ToFloat, HexFloat11ToFloat are the
functions to be reworked in external/amber/src/src/verifier.cc

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 ...-not-error-on-uninitialized-warnings.patch | 28 +++++++++++++++++++
 .../vk-gl-cts/opengl-es-cts_3.2.6.1.bb        |  2 ++
 2 files changed, 30 insertions(+)
 create mode 100644 meta-oe/recipes-graphics/vk-gl-cts/files/0001-Do-not-error-on-uninitialized-warnings.patch

diff --git a/meta-oe/recipes-graphics/vk-gl-cts/files/0001-Do-not-error-on-uninitialized-warnings.patch b/meta-oe/recipes-graphics/vk-gl-cts/files/0001-Do-not-error-on-uninitialized-warnings.patch
new file mode 100644
index 0000000000..4f3c7554cf
--- /dev/null
+++ b/meta-oe/recipes-graphics/vk-gl-cts/files/0001-Do-not-error-on-uninitialized-warnings.patch
@@ -0,0 +1,28 @@
+From f9906a3a1b7f1ade7a6c4e1a8aa67cb3a5e663a9 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 3 Mar 2021 11:33:15 -0800
+Subject: [PATCH] Do not error on uninitialized warnings
+
+code in verifier.cc violates C/C++ aliasing rules so code should be
+perhaps changed to use a union
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ external/amber/src/CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/external/amber/src/CMakeLists.txt b/external/amber/src/CMakeLists.txt
+index 80a0df7..4323c81 100644
+--- a/external/amber/src/CMakeLists.txt
++++ b/external/amber/src/CMakeLists.txt
+@@ -133,6 +133,7 @@ elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
+     -Werror
+     -Wextra
+     -Wno-unknown-pragmas
++    -Wno-error=uninitialized
+     -Wpedantic
+     -pedantic-errors)
+ elseif(MSVC)
+--
+2.30.1
diff --git a/meta-oe/recipes-graphics/vk-gl-cts/opengl-es-cts_3.2.6.1.bb b/meta-oe/recipes-graphics/vk-gl-cts/opengl-es-cts_3.2.6.1.bb
index 801bd05c91..184547aa76 100644
--- a/meta-oe/recipes-graphics/vk-gl-cts/opengl-es-cts_3.2.6.1.bb
+++ b/meta-oe/recipes-graphics/vk-gl-cts/opengl-es-cts_3.2.6.1.bb
@@ -9,6 +9,8 @@ SRCREV_spirv-headers = "e4322e3be589e1ddd44afb20ea842a977c1319b8"
 SRCREV_spirv-tools = "1eb89172a82b436d8037e8a8c29c80f7e1f7df74"
 SRC_URI[renderdoc.sha256sum] = "e7b5f0aa5b1b0eadc63a1c624c0ca7f5af133aa857d6a4271b0ef3d0bdb6868e"
 
+SRC_URI += "file://0001-Do-not-error-on-uninitialized-warnings.patch"
+
 S = "${WORKDIR}/git"
 
 do_install() {
-- 
2.30.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-03-03 20:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-03 20:17 [meta-oe][PATCH] opengl-es-cts: Disable -Wuninitialized for external/amber Khem Raj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.