From 3066218d7446b356c9fa996b2c5faa8b4177a3f9 Mon Sep 17 00:00:00 2001 From: David Abdurachmanov Date: Wed, 26 Apr 2023 18:20:39 +0300 Subject: [PATCH] Enable LTO; Set fortify to level 2 Disabling LTO removed TEXTRELs, let's try fortify level 2 now (default 3 in Fedora 38). Signed-off-by: David Abdurachmanov --- systemd.spec | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/systemd.spec b/systemd.spec index 2d7c98f..1425d1e 100644 --- a/systemd.spec +++ b/systemd.spec @@ -19,11 +19,7 @@ # e.g. when re-building cryptsetup on a json-c SONAME-bump. %bcond_with bootstrap %bcond_without tests -%ifnarch riscv64 %bcond_without lto -%else -%bcond_with lto -%endif # Support for quick builds with rpmbuild --build-in-place. # See README.build-in-place. @@ -37,7 +33,7 @@ Version: 253.2 # determine the build information from local checkout Version: %(tools/meson-vcs-tag.sh . error | sed -r 's/-([0-9])/.^\1/; s/-g/_g/') %endif -Release: %autorelease -e 4.riscv64 +Release: %autorelease -e 5.riscv64 %global stable %(c="%version"; [ "$c" = "${c#*.*}" ]; echo $?) @@ -668,6 +664,10 @@ fi %global _lto_cflags %nil %endif +%ifarch riscv64 +%define _fortify_level 2 +%endif + # Do configuration. If doing an inplace build, try to do # reconfiguration to pick up new options. %if %{with inplace}