From 03442c7d1162271e23edb093a1acf1c08562f396 Mon Sep 17 00:00:00 2001 From: sherlock2010 <15151851377@163.com> Date: Tue, 21 Oct 2025 17:21:17 +0800 Subject: [PATCH] add secure compilation options for tools (cherry picked from commit e429bfacf61f08805e9d03b98a6e08a556084a30) --- ...secure-compilation-options-for-tools.patch | 66 +++++++++++++++++++ xorg-x11-drv-intel.spec | 9 ++- 2 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 add-secure-compilation-options-for-tools.patch diff --git a/add-secure-compilation-options-for-tools.patch b/add-secure-compilation-options-for-tools.patch new file mode 100644 index 0000000..e4a1e79 --- /dev/null +++ b/add-secure-compilation-options-for-tools.patch @@ -0,0 +1,66 @@ +From d25c7cfd97a66a1640850cfce0caac4ddf403d79 Mon Sep 17 00:00:00 2001 +From: zhouyihang +Date: Tue, 21 Oct 2025 17:17:45 +0800 +Subject: [PATCH] add secure compilation options for tools + +--- + tools/meson.build | 22 ++++++++++++++++++++++ + 1 file changed, 22 insertions(+) + +diff --git a/tools/meson.build b/tools/meson.build +index 3df3338..99f0d46 100644 +--- a/tools/meson.build ++++ b/tools/meson.build +@@ -17,6 +17,11 @@ if with_tools + ], + c_args : [ + '-Wno-unused-parameter', ++ '-fPIE', ++ ], ++ link_args : [ ++ '-Wl,-z,now', ++ '-pie', + ], + install : true) + +@@ -53,6 +58,11 @@ if with_tools + ], + c_args : [ + '-Wno-unused-parameter', ++ '-fPIE', ++ ], ++ link_args : [ ++ '-Wl,-z,now', ++ '-pie', + ], + install : false) + endif +@@ -70,6 +80,13 @@ if with_tools and with_dri3 + dependency('dri', required : true), + dependency('libdrm', required : true), + ], ++ c_args : [ ++ '-fPIE', ++ ], ++ link_args : [ ++ '-Wl,-z,now', ++ '-pie', ++ ], + install : false) + endif + +@@ -80,6 +97,11 @@ if with_backlight_helper + install_mode : [ 'rws--x--x', 'root', 'root' ], + c_args : [ + '-DMAJOR_IN_SYSMACROS', ++ '-fPIE', ++ ], ++ link_args : [ ++ '-Wl,-z,now', ++ '-pie', + ], + install : true) + +-- +2.43.0 + diff --git a/xorg-x11-drv-intel.spec b/xorg-x11-drv-intel.spec index 65c8433..b2e6f88 100644 --- a/xorg-x11-drv-intel.spec +++ b/xorg-x11-drv-intel.spec @@ -8,7 +8,7 @@ Name: xorg-x11-drv-intel Version: 2.99.917 -Release: 48 +Release: 49 Summary: Xorg X11 Intel video driver License: MIT URL: https://www.x.org @@ -60,6 +60,7 @@ Patch0000: intel-gcc-pr65873.patch Patch0001: 0001-sna-Avoid-clobbering-output-physical-size-with-xf86O.patch Patch0002: xvmc-workaround.patch Patch0003: 0002-fix-linkage.patch +Patch0004: add-secure-compilation-options-for-tools.patch %description X.Org X11 Intel video driver. @@ -116,6 +117,12 @@ rm -f %{buildroot}%{_libdir}/libI*XvMC.so %{_mandir}/man4/i* %changelog +* Tue Oct 21 2025 zhouyihang - 2.99.917-49 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC:add secure compilation options for tools + * Wed Oct 02 2024 Funda Wang - 2.99.917-48 - update to latest snapshot at 20230318 - build with meson -- Gitee