From a9e5a8f6477685239b5a76dd5e54875244189f53 Mon Sep 17 00:00:00 2001 From: Jacek Migacz Date: Wed, 21 Aug 2024 21:30:26 +0200 Subject: [PATCH] Improve the security of the generated code by hardening Resolves: RHEL-33495 --- emacs.spec | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/emacs.spec b/emacs.spec index 355606e..cd0696a 100644 --- a/emacs.spec +++ b/emacs.spec @@ -250,7 +250,6 @@ rm -f lisp/play/pong.el lisp/play/pong.elc ln -s ../../%{name}/%{version}/etc/COPYING doc ln -s ../../%{name}/%{version}/etc/NEWS doc - %build export CFLAGS="-DMAIL_USE_LOCKF %{build_cflags}" %set_build_flags @@ -259,7 +258,7 @@ export CFLAGS="-DMAIL_USE_LOCKF %{build_cflags}" mkdir build-lucid && cd build-lucid ln -s ../configure . -LDFLAGS=-Wl,-z,relro; export LDFLAGS; +LDFLAGS=-Wl,-z,relro,-z,now; export LDFLAGS; %configure --with-cairo \ --with-dbus \ @@ -287,6 +286,9 @@ cd .. # Build binary without X support mkdir build-nw && cd build-nw ln -s ../configure . + +LDFLAGS=-Wl,-z,relro,-z,now; export LDFLAGS; + %configure --with-json \ --with-modules \ --with-native-compilation=no \ @@ -304,7 +306,7 @@ cd .. mkdir build-gtk+x11 && cd build-gtk+x11 ln -s ../configure . -LDFLAGS=-Wl,-z,relro; export LDFLAGS; +LDFLAGS=-Wl,-z,relro,-z,now; export LDFLAGS; %configure --with-cairo \ --with-dbus \ @@ -333,7 +335,7 @@ cd .. mkdir build-pgtk && cd build-pgtk ln -s ../configure . -LDFLAGS=-Wl,-z,relro; export LDFLAGS; +LDFLAGS=-Wl,-z,relro,-z,now; export LDFLAGS; %configure --with-cairo \ --with-dbus \