[x265] [PATCH]Fix for build errors with IBK/SHSTK

Yaswanth Sastry yaswanth.sastry at multicorewareinc.com
Tue Apr 15 04:08:48 UTC 2025


>From 0e74842f29d46c47dc630a6736671f0cf7a18acf Mon Sep 17 00:00:00 2001
From: yaswanthsastry <yaswanth.sastry at multicorewareinc.com>
Date: Tue, 15 Apr 2025 08:11:33 +0530
Subject: [PATCH] Fix for build errors with IBK/SHSTK

---
 source/CMakeLists.txt        | 11 +++++++++++
 source/common/x86/x86inc.asm |  3 +++
 2 files changed, 14 insertions(+)

diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt
index c38ef5c14..9d329e7c7 100755
--- a/source/CMakeLists.txt
+++ b/source/CMakeLists.txt
@@ -110,6 +110,17 @@ else()
     message(STATUS "Please add this value near ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE}")
 endif()

+if(X64)
+    option(ENABLE_CET "Enable Control-flow Enforcement" OFF)
+    if(ENABLE_CET)
+        add_definitions(-DENABLE_CET=1)
+        list(APPEND ASM_FLAGS "-DENABLE_CET=1")
+    else()
+        add_definitions(-DENABLE_CET=0)
+        list(APPEND ASM_FLAGS "-DENABLE_CET=0")
+    endif()
+endif(X64)
+
 if(UNIX)
     list(APPEND PLATFORM_LIBS pthread)
     find_library(LIBRT rt)
diff --git a/source/common/x86/x86inc.asm b/source/common/x86/x86inc.asm
index 974980ccc..4e0edf650 100644
--- a/source/common/x86/x86inc.asm
+++ b/source/common/x86/x86inc.asm
@@ -65,6 +65,9 @@
         %define UNIX64 1
     %endif
 %endif
+%ifndef ENABLE_CET
+%define ENABLE_CET 0
+%endif

 %define FORMAT_ELF 0
 %ifidn __OUTPUT_FORMAT__,elf
--
2.37.3.windows.1




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20250415/c5789560/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: application/octet-stream
Size: 1396 bytes
Desc: patch.diff
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20250415/c5789560/attachment.obj>


More information about the x265-devel mailing list