ONE
ONE copied to clipboard
Fix build error in tizen w.r.t RISC-V
- Please review change : https://review.tizen.org/gerrit/#/c/platform/core/ml/nnfw/+/303102/
- For someone who cannot access the gerrit :
diff --git [a/compiler/pp/include/pp/IndentedStringBuilder.h](https://review.tizen.org/gerrit/gitweb?p=platform/core/ml/nnfw.git;a=blob;f=compiler/pp/include/pp/IndentedStringBuilder.h;h=2655aff055a72e8954d2b28288de7e534958b740;hb=bec0df756731c2185402f42148127c024f7ac087) [b/compiler/pp/include/pp/IndentedStringBuilder.h](https://review.tizen.org/gerrit/gitweb?p=platform/core/ml/nnfw.git;a=blob;f=compiler/pp/include/pp/IndentedStringBuilder.h;h=4dfd9436dab65d5a9491eb57938add73cba6c06c;hb=d44185dba35beb4f2dbb9fcf91513e48bac1108c)
index [2655aff](https://review.tizen.org/gerrit/gitweb?p=platform/core/ml/nnfw.git;a=blob;f=compiler/pp/include/pp/IndentedStringBuilder.h;h=2655aff055a72e8954d2b28288de7e534958b740;hb=bec0df756731c2185402f42148127c024f7ac087)..[4dfd943](https://review.tizen.org/gerrit/gitweb?p=platform/core/ml/nnfw.git;a=blob;f=compiler/pp/include/pp/IndentedStringBuilder.h;h=4dfd9436dab65d5a9491eb57938add73cba6c06c;hb=d44185dba35beb4f2dbb9fcf91513e48bac1108c) 100644 (file)
--- a/[compiler/pp/include/pp/IndentedStringBuilder.h](https://review.tizen.org/gerrit/gitweb?p=platform/core/ml/nnfw.git;a=blob;f=compiler/pp/include/pp/IndentedStringBuilder.h;h=2655aff055a72e8954d2b28288de7e534958b740;hb=bec0df756731c2185402f42148127c024f7ac087)
+++ b/[compiler/pp/include/pp/IndentedStringBuilder.h](https://review.tizen.org/gerrit/gitweb?p=platform/core/ml/nnfw.git;a=blob;f=compiler/pp/include/pp/IndentedStringBuilder.h;h=4dfd9436dab65d5a9491eb57938add73cba6c06c;hb=d44185dba35beb4f2dbb9fcf91513e48bac1108c)
@@ [-18,6](https://review.tizen.org/gerrit/gitweb?p=platform/core/ml/nnfw.git;a=blob;f=compiler/pp/include/pp/IndentedStringBuilder.h;h=2655aff055a72e8954d2b28288de7e534958b740;hb=bec0df756731c2185402f42148127c024f7ac087#l18) [+18,7](https://review.tizen.org/gerrit/gitweb?p=platform/core/ml/nnfw.git;a=blob;f=compiler/pp/include/pp/IndentedStringBuilder.h;h=4dfd9436dab65d5a9491eb57938add73cba6c06c;hb=d44185dba35beb4f2dbb9fcf91513e48bac1108c#l18) @@
#define __PP_INDENTED_STRING_BUILDER_H__
#include "pp/Format.h"
+#include <cstdint>
namespace pp
{
diff --git [a/infra/cmake/modules/ExternalBuildTools.cmake](https://review.tizen.org/gerrit/gitweb?p=platform/core/ml/nnfw.git;a=blob;f=infra/cmake/modules/ExternalBuildTools.cmake;h=557e6f47de36dc8cae7d89861ae5febfe3c30d87;hb=bec0df756731c2185402f42148127c024f7ac087) [b/infra/cmake/modules/ExternalBuildTools.cmake](https://review.tizen.org/gerrit/gitweb?p=platform/core/ml/nnfw.git;a=blob;f=infra/cmake/modules/ExternalBuildTools.cmake;h=45f32ea91726a8e6e7a1d2e9f14a93944f13ebd7;hb=d44185dba35beb4f2dbb9fcf91513e48bac1108c)
index [557e6f4](https://review.tizen.org/gerrit/gitweb?p=platform/core/ml/nnfw.git;a=blob;f=infra/cmake/modules/ExternalBuildTools.cmake;h=557e6f47de36dc8cae7d89861ae5febfe3c30d87;hb=bec0df756731c2185402f42148127c024f7ac087)..[45f32ea](https://review.tizen.org/gerrit/gitweb?p=platform/core/ml/nnfw.git;a=blob;f=infra/cmake/modules/ExternalBuildTools.cmake;h=45f32ea91726a8e6e7a1d2e9f14a93944f13ebd7;hb=d44185dba35beb4f2dbb9fcf91513e48bac1108c) 100644 (file)
--- a/[infra/cmake/modules/ExternalBuildTools.cmake](https://review.tizen.org/gerrit/gitweb?p=platform/core/ml/nnfw.git;a=blob;f=infra/cmake/modules/ExternalBuildTools.cmake;h=557e6f47de36dc8cae7d89861ae5febfe3c30d87;hb=bec0df756731c2185402f42148127c024f7ac087)
+++ b/[infra/cmake/modules/ExternalBuildTools.cmake](https://review.tizen.org/gerrit/gitweb?p=platform/core/ml/nnfw.git;a=blob;f=infra/cmake/modules/ExternalBuildTools.cmake;h=45f32ea91726a8e6e7a1d2e9f14a93944f13ebd7;hb=d44185dba35beb4f2dbb9fcf91513e48bac1108c)
@@ [-54,7](https://review.tizen.org/gerrit/gitweb?p=platform/core/ml/nnfw.git;a=blob;f=infra/cmake/modules/ExternalBuildTools.cmake;h=557e6f47de36dc8cae7d89861ae5febfe3c30d87;hb=bec0df756731c2185402f42148127c024f7ac087#l54) [+54,7](https://review.tizen.org/gerrit/gitweb?p=platform/core/ml/nnfw.git;a=blob;f=infra/cmake/modules/ExternalBuildTools.cmake;h=45f32ea91726a8e6e7a1d2e9f14a93944f13ebd7;hb=d44185dba35beb4f2dbb9fcf91513e48bac1108c#l54) @@ function(ExternalBuild_CMake)
-G "${CMAKE_GENERATOR}"
-DCMAKE_INSTALL_PREFIX=${ARG_INSTALL_DIR}
-DCMAKE_BUILD_TYPE=Release
- -DCMAKE_CXX_FLAGS=${ARG_BUILD_FLAGS}
+ -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} ${ARG_BUILD_FLAGS}
${ARG_EXTRA_OPTS}
${ARG_CMAKE_DIR}
OUTPUT_FILE ${BUILD_LOG_PATH}
diff --git [a/infra/nncc/cmake/buildtool/config/config_linux.cmake](https://review.tizen.org/gerrit/gitweb?p=platform/core/ml/nnfw.git;a=blob;f=infra/nncc/cmake/buildtool/config/config_linux.cmake;h=d7b17cfef0396d9feb1f90f8e0bf581031451199;hb=bec0df756731c2185402f42148127c024f7ac087) [b/infra/nncc/cmake/buildtool/config/config_linux.cmake](https://review.tizen.org/gerrit/gitweb?p=platform/core/ml/nnfw.git;a=blob;f=infra/nncc/cmake/buildtool/config/config_linux.cmake;h=b30345162e6108d47633d52d0f1da9632cdd24f2;hb=d44185dba35beb4f2dbb9fcf91513e48bac1108c)
index [d7b17cf](https://review.tizen.org/gerrit/gitweb?p=platform/core/ml/nnfw.git;a=blob;f=infra/nncc/cmake/buildtool/config/config_linux.cmake;h=d7b17cfef0396d9feb1f90f8e0bf581031451199;hb=bec0df756731c2185402f42148127c024f7ac087)..[b303451](https://review.tizen.org/gerrit/gitweb?p=platform/core/ml/nnfw.git;a=blob;f=infra/nncc/cmake/buildtool/config/config_linux.cmake;h=b30345162e6108d47633d52d0f1da9632cdd24f2;hb=d44185dba35beb4f2dbb9fcf91513e48bac1108c) 100644 (file)
--- a/[infra/nncc/cmake/buildtool/config/config_linux.cmake](https://review.tizen.org/gerrit/gitweb?p=platform/core/ml/nnfw.git;a=blob;f=infra/nncc/cmake/buildtool/config/config_linux.cmake;h=d7b17cfef0396d9feb1f90f8e0bf581031451199;hb=bec0df756731c2185402f42148127c024f7ac087)
+++ b/[infra/nncc/cmake/buildtool/config/config_linux.cmake](https://review.tizen.org/gerrit/gitweb?p=platform/core/ml/nnfw.git;a=blob;f=infra/nncc/cmake/buildtool/config/config_linux.cmake;h=b30345162e6108d47633d52d0f1da9632cdd24f2;hb=d44185dba35beb4f2dbb9fcf91513e48bac1108c)
@@ [-7,5](https://review.tizen.org/gerrit/gitweb?p=platform/core/ml/nnfw.git;a=blob;f=infra/nncc/cmake/buildtool/config/config_linux.cmake;h=d7b17cfef0396d9feb1f90f8e0bf581031451199;hb=bec0df756731c2185402f42148127c024f7ac087#l7) [+7,10](https://review.tizen.org/gerrit/gitweb?p=platform/core/ml/nnfw.git;a=blob;f=infra/nncc/cmake/buildtool/config/config_linux.cmake;h=b30345162e6108d47633d52d0f1da9632cdd24f2;hb=d44185dba35beb4f2dbb9fcf91513e48bac1108c#l7) @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_G
list(APPEND FLAGS_CXXONLY "-Wno-psabi")
endif()
+# Build fail on memcpy (ex. compute/cker/include/cker/Shape.h:211:16)
+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()
+
# lib pthread as a variable (pthread must be disabled on android)
set(LIB_PTHREAD pthread)