File: system-safeint.patch

package info (click to toggle)
onnxruntime 1.21.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 333,864 kB
  • sloc: cpp: 3,153,080; python: 179,219; ansic: 109,131; asm: 37,791; cs: 34,424; perl: 13,070; java: 11,047; javascript: 6,330; pascal: 4,126; sh: 3,277; xml: 598; objc: 281; makefile: 63
file content (29 lines) | stat: -rw-r--r-- 1,100 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Description: Use system safeint lib (libsafeint-dev)
Forwarded: not-needed
Origin: https://src.fedoraproject.org/rpms/onnxruntime/blob/f40/f/system-safeint.patch
Author: Alejandro Alvarez Ayllon <a.alvarezayllon@gmail.com>, Dylan Aïssi <daissi@debian.org>

--- a/cmake/external/onnxruntime_external_deps.cmake
+++ b/cmake/external/onnxruntime_external_deps.cmake
@@ -392,10 +392,9 @@
   )
 
   # use fetch content rather than makeavailable because safeint only includes unconditional test targets
-  FetchContent_Populate(safeint)
 endif()
 add_library(safeint_interface INTERFACE)
-target_include_directories(safeint_interface INTERFACE ${safeint_SOURCE_DIR})
+target_include_directories(safeint_interface INTERFACE /usr/include/safeint)
 
 
 # Flatbuffers
--- a/onnxruntime/core/common/safeint.h
+++ b/onnxruntime/core/common/safeint.h
@@ -24,6 +24,7 @@
 
 #define SAFEINT_EXCEPTION_HANDLER_CPP 1
 #define SafeIntDefaultExceptionHandler SafeIntExceptionHandler<onnxruntime::OnnxRuntimeException>
+#define SAFEINT_CPP_THROW noexcept(false)
 
 #if defined(__GNUC__)
 #include "onnxruntime_config.h"