public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
From: Stefan Schantl <stefan.schantl@ipfire.org>
To: development@lists.ipfire.org
Subject: [PATCH] gettext: Fix hardening for some binaries.
Date: Sat, 11 Mar 2023 14:29:45 +0100	[thread overview]
Message-ID: <20230311132945.384480-1-stefan.schantl@ipfire.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 799 bytes --]

Signed-off-by: Stefan Schantl <stefan.schantl(a)ipfire.org>
---
 gettext/gettext.nm | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/gettext/gettext.nm b/gettext/gettext.nm
index 264eb2db0..1e2af67f7 100644
--- a/gettext/gettext.nm
+++ b/gettext/gettext.nm
@@ -5,7 +5,7 @@
 
 name       = gettext
 version    = 0.21.1
-release    = 2.1
+release    = 3
 
 groups     = System/Base
 url        = https://www.gnu.org/software/gettext/
@@ -44,6 +44,13 @@ build
 		--enable-shared \
 		--disable-rpath
 
+	configure_cmds
+		# Add additional compiler flages to build gettext-tools binaries with
+		# proper hardening.
+		sed -i '/^CFLAGS =/ s/$/ -fno-builtin-exit -D__noreturn__=/' \
+			%{DIR_APP}/gettext-tools/src/Makefile
+	end
+
 	test
 		make check || :
 	end
-- 
2.30.2


                 reply	other threads:[~2023-03-11 13:29 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230311132945.384480-1-stefan.schantl@ipfire.org \
    --to=stefan.schantl@ipfire.org \
    --cc=development@lists.ipfire.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox