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] graphviz: Proper harden some binaries
Date: Mon, 13 Mar 2023 16:41:23 +0100	[thread overview]
Message-ID: <20230313154123.42489-1-stefan.schantl@ipfire.org> (raw)

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

Use some additional compiler flags, to proper
harden them.

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

diff --git a/graphviz/graphviz.nm b/graphviz/graphviz.nm
index 625c554b2..c5147c5f5 100644
--- a/graphviz/graphviz.nm
+++ b/graphviz/graphviz.nm
@@ -5,7 +5,7 @@
 
 name       = graphviz
 version    = 7.0.4
-release    = 1
+release    = 2
 
 groups     = Development/Tools
 url        = https://gitlab.com/graphviz/graphviz
@@ -42,6 +42,32 @@ build
 		./autogen.sh
 	end
 
+	configure_options += \
+		--enable-debug
+
+	configure_cmds
+		# Add some additional C compiler flags to proper harden liblab_gamut.
+		sed -i '/^CFLAGS =/ s/$/ -fno-builtin-exit -D__noreturn__=/' \
+			lib/edgepaint/Makefile
+
+		# Add some additional C and C++ compiler flags to proper harden
+		# the "dot" binaries.
+		sed -i '/^CFLAGS =/ s/$/ -fno-builtin-exit -D__noreturn__=/' \
+			cmd/dot/Makefile
+		sed -i '/^CXXFLAGS =/ s/$/ -fno-builtin-exit -D__noreturn__=/' \
+			cmd/dot/Makefile
+
+		# Add some additional C compiler flags to proper harden the
+		# "gvpr" binaries.
+		sed -i '/^CFLAGS =/ s/$/ -fno-builtin-exit -D__noreturn__=/' \
+			cmd/gvpr/Makefile
+
+		# Add some additional C compiler flags to proper harden the
+		# tools.
+		sed -i '/^CFLAGS =/ s/$/ -fno-builtin-exit -D__noreturn__=/' \
+			cmd/tools/Makefile
+	end
+
 	test
 		make check
 	end
-- 
2.30.2


                 reply	other threads:[~2023-03-13 15:41 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=20230313154123.42489-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