summaryrefslogtreecommitdiff
path: root/sci-libs/onnxruntime/files/onnxruntime-1.26.0-r1-prevent-generation-of-PIE.patch
blob: c23d00edd84cb7b8691b8400ffe3d79c3b8918c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
From: Pavel Sobolev <contact@paveloom.dev>
Subject: [PATCH] Prevent generation of PIE.

Signed-off-by: Pavel Sobolev <contact@paveloom.dev>

--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -1294,6 +1294,7 @@ endfunction()
 function(onnxruntime_add_executable target_name)
   add_executable(${target_name} ${ARGN})
   onnxruntime_configure_target(${target_name})
+  set_target_properties(${target_name} PROPERTIES POSITION_INDEPENDENT_CODE OFF)
   if (MSVC AND onnxruntime_target_platform STREQUAL "x86")
     target_link_options(${target_name} PRIVATE /SAFESEH)
   endif()