Resolve build fail on gcc 13 tizen_dev accepted/tizen/unified/dev/20230726.115519 accepted/tizen/unified/riscv/20230718.003655
authorHyeongseok Oh <hseok82.oh@samsung.com>
Fri, 30 Jun 2023 02:08:57 +0000 (11:08 +0900)
committerHyeongseok Oh <hseok82.oh@samsung.com>
Fri, 30 Jun 2023 02:14:11 +0000 (11:14 +0900)
This commit resolves build fail on gcc 13.

ONE-DCO-1.0-Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>

compute/cker/include/cker/Shape.h
infra/nnfw/cmake/buildtool/config/config_linux.cmake
packaging/ABSEIL.tar.gz
runtime/libs/benchmark/include/benchmark/CsvWriter.h
runtime/libs/benchmark/include/benchmark/Phase.h
runtime/onert/backend/trix/DevContext.cc
runtime/onert/core/src/ir/LayoutSet.h
runtime/service/npud/core/Backend.h

index 86caf7d18f34eaeaeff0044ad0067912b3e5eb25..30c70c99123ce7a91d87455d1c74096dc5a1607a 100644 (file)
@@ -208,6 +208,7 @@ private:
     {
       SetDim(i, pad_value);
     }
+    // Error on gcc 13: refer infra/nnfw/cmake/buildtool/config/config_linux.cmake
     std::memcpy(DimsData() + size_increase, shape.DimsData(),
                 sizeof(int32_t) * shape.DimensionsCount());
   }
index 01b47ef4acdab08b36d952985993064d6d43d66d..b5f90afda5d691dead405266aebe44c0c96b1bca 100644 (file)
@@ -10,3 +10,8 @@ set(FLAGS_CXXONLY ${FLAGS_CXXONLY} "-Wno-ignored-attributes")
 if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0)
   list(APPEND FLAGS_CXXONLY "-Wno-psabi")
 endif()
+
+# Build fail on compute/cker/include/cker/Shape.h:211:16 (memcpy)
+if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 12.0)
+  list(APPEND FLAGS_CXXONLY "-Wno-error=stringop-overflow -Wno-error=array-bounds")
+endif()
index dc7aab548c42af1c8e03e4d431916b192d66ca03..60c81a4f2872a6760abab8ee9d64ba0d879c4901 100644 (file)
Binary files a/packaging/ABSEIL.tar.gz and b/packaging/ABSEIL.tar.gz differ
index 5c259d7ed19651215e932103fc6debdfe1b792de..d926bad8f892e83aa745102609646c402fdca5b6 100644 (file)
@@ -17,6 +17,7 @@
 #ifndef __NNFW_BENCHMARK_CSV_WRITER_H__
 #define __NNFW_BENCHMARK_CSV_WRITER_H__
 
+#include <cstdint>
 #include <vector>
 #include <string>
 #include <fstream>
index 5eceb04c5e1252ea3b9434e30c17fe7f2ebd8cea..9b91a4391d2e2803f58b38bc9158636d0a873f85 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "Types.h"
 
+#include <cstdint>
 #include <string>
 #include <vector>
 
index 0595148789209b8eb00afe2ea39b98248cabbc28..a044c13878d253a873bc56846e490a1c1c56e2cf 100644 (file)
@@ -83,12 +83,12 @@ ModelID DevContext::registerModel(const std::string &model_file_path)
   file_info.filepath = model_file_path.c_str();
   file_info.size = meta->size;
 
-  ModelID model_id;
+  ModelID model_id = 0;
 
   for (uint32_t dev_num = 0; dev_num < _dev_handles.size(); ++dev_num)
   {
     // Register model for each device
-    uint32_t model_id_at_device;
+    uint32_t model_id_at_device = 0;
     if (registerNPUmodel(_dev_handles.at(dev_num), &file_info, &model_id_at_device) < 0)
     {
       throw std::runtime_error("Failed to register npu model");
index 6ce4e38c637e8e19a2dde839a4526d5434d3bc59..be077f2f00d233ca1006136408eec717d5795d59 100644 (file)
@@ -17,6 +17,7 @@
 #ifndef __ONERT_IR_LAYOUT_SET_H__
 #define __ONERT_IR_LAYOUT_SET_H__
 
+#include <cstdint>
 #include <initializer_list>
 #include <unordered_set>
 
index 5bc13b66cdabb39a68c51f11bfd2cdd2ba84d5ea..6b810d18ef8bd518c5a9148cf2d8cdb9a7f8aab6 100644 (file)
@@ -20,6 +20,7 @@
 #include "ir/Layout.h"
 #include "ir/DataType.h"
 
+#include <cstdint>
 #include <string>
 #include <vector>