commit:     78ab7fb8714c7f5409409b2fd0f26d2bfd9c52c7
Author:     Filip Kobierski <fkobi <AT> pm <DOT> me>
AuthorDate: Fri Sep  6 10:51:30 2024 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Thu Jan 23 16:19:38 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=78ab7fb8

dev-libs/isa-l: add no-fortify-source patch

Closes: https://bugs.gentoo.org/935525
Signed-off-by: Filip Kobierski <fkobi <AT> pm.me>
Closes: https://github.com/gentoo/gentoo/pull/38483
Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org>

 .../files/isa-l-2.31.0_no-fortify-source.patch     | 38 ++++++++++++++++++++++
 dev-libs/isa-l/isa-l-2.31.0.ebuild                 |  1 +
 2 files changed, 39 insertions(+)

diff --git a/dev-libs/isa-l/files/isa-l-2.31.0_no-fortify-source.patch 
b/dev-libs/isa-l/files/isa-l-2.31.0_no-fortify-source.patch
new file mode 100644
index 000000000000..36ddb6304035
--- /dev/null
+++ b/dev-libs/isa-l/files/isa-l-2.31.0_no-fortify-source.patch
@@ -0,0 +1,38 @@
+From: Filip Kobierski <[email protected]>
+Date: Fri, 6 Sep 2024 12:49:09 +0200
+Upstream hardcodes FORTIFY_SOURCE to 2. This patch removes it so it is not 
redefined when we set it.
+This fixes https://bugs.gentoo.org/935525
+
+---
+ configure.ac | 1 -
+ make.inc     | 2 +-
+ 2 files changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 72500ee..72bbb54 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -301,7 +301,6 @@ my_CFLAGS="\
+ -Wstrict-prototypes \
+ -Wtype-limits \
+ -fstack-protector \
+--D_FORTIFY_SOURCE=2 \
+ "
+ AC_SUBST([my_CFLAGS])
+ 
+diff --git a/make.inc b/make.inc
+index 33baf49..0cfc571 100644
+--- a/make.inc
++++ b/make.inc
+@@ -57,7 +57,7 @@ DEBUG_yasm = -g dwarf2
+ DEBUG_nasm = -g
+ 
+ # Default arch= build options
+-CFLAGS_    = -Wall -Wchar-subscripts -Wformat-security -Wnested-externs 
-Wpointer-arith -Wshadow -Wstrict-prototypes -Wtype-limits -fstack-protector 
-D_FORTIFY_SOURCE=2
++CFLAGS_    = -Wall -Wchar-subscripts -Wformat-security -Wnested-externs 
-Wpointer-arith -Wshadow -Wstrict-prototypes -Wtype-limits -fstack-protector
+ ASFLAGS_   = -f elf64
+ ARFLAGS_   = cr $@
+ STRIP_gcc  = strip -d -R .comment $@
+-- 
+2.44.2
+

diff --git a/dev-libs/isa-l/isa-l-2.31.0.ebuild 
b/dev-libs/isa-l/isa-l-2.31.0.ebuild
index 992207e9e408..cff37c2a7586 100644
--- a/dev-libs/isa-l/isa-l-2.31.0.ebuild
+++ b/dev-libs/isa-l/isa-l-2.31.0.ebuild
@@ -36,6 +36,7 @@ PATCHES=(
        "${FILESDIR}"/${PN}-2.30.0_fix-shebang.patch
        "${FILESDIR}"/${PN}-2.31.0_makefile-no-D.patch
        "${FILESDIR}"/${PN}-2.31.0_makefile-x86.patch
+       "${FILESDIR}"/${PN}-2.31.0_no-fortify-source.patch
        "${FILESDIR}"/${PN}-2.31.0_user-ldflags.patch
 )
 

Reply via email to