package/assimp: disable -Werror compile flag

Add patch to disable -Werror compile flag.

Fixes:

  - http://autobuild.buildroot.net/results/49beb264b8454b9af092278074c4087013692052/

  .../build/assimp-5.1.3/code/PostProcessing/TriangulateProcess.cpp:285:50: error: argument 1 value ‘4294967294’ exceeds maximum object size 2147483647 [-Werror=alloc-size-larger-than=]
    285 |     std::unique_ptr<bool[]> done(new bool[max_out]);
        |                                                  ^
  [...]
  .../host/opt/ext-toolchain/powerpc-buildroot-linux-uclibc/include/c++/9.3.0/new:127:26: note: in a call to allocation function ‘void* operator new [](std::size_t)’ declared here
    127 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
        |                          ^~~~~~~~

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Peter Seiderer 2021-12-10 15:25:31 +01:00 committed by Thomas Petazzoni
parent ac3bb80b1f
commit c9b43105b5

View File

@ -0,0 +1,39 @@
From 5146e1c4d58174e302dbdcf2a85c2023be1cffc6 Mon Sep 17 00:00:00 2001
From: Peter Seiderer <ps.report@gmx.net>
Date: Fri, 10 Dec 2021 15:15:30 +0100
Subject: [PATCH] code: disable -Werror
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Fixes:
.../build/assimp-5.1.3/code/PostProcessing/TriangulateProcess.cpp:285:50: error: argument 1 value 4294967294 exceeds maximum object size 2147483647 [-Werror=alloc-size-larger-than=]
285 | std::unique_ptr<bool[]> done(new bool[max_out]);
| ^
[...]
.../host/opt/ext-toolchain/powerpc-buildroot-linux-uclibc/include/c++/9.3.0/new:127:26: note: in a call to allocation function void* operator new [](std::size_t) declared here
127 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~~~
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
code/CMakeLists.txt | 2 --
1 file changed, 2 deletions(-)
diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt
index e45bf8a2a..f71b6583d 100644
--- a/code/CMakeLists.txt
+++ b/code/CMakeLists.txt
@@ -1167,8 +1167,6 @@ TARGET_USE_COMMON_OUTPUT_DIRECTORY(assimp)
# enable warnings as errors ########################################
IF (MSVC)
TARGET_COMPILE_OPTIONS(assimp PRIVATE /WX)
-ELSE()
- TARGET_COMPILE_OPTIONS(assimp PRIVATE -Werror)
ENDIF()
# adds C_FLAGS required to compile zip.c on old GCC 4.x compiler
--
2.34.1