From 5b2047b05ead5353c1d3ca3e8112424eb1c7aae4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jani=20V=C3=A4limaa?= Date: Tue, 5 Dec 2023 21:42:38 +0200 Subject: macros: simplify %serverbuild macro --- NEWS | 1 + macros.in | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 78a5c25..40cd263 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,7 @@ - rpmrc: drop arches we don't really support - rpmrc: drop arch_compat also available in /usr/lib/rpm/rpmrc - macros: use -fstack-protector-strong instead of '-fstack-protector --param=ssp-buffer-size=4' in %_ssp_cflags +- macros: simplify %serverbuild macro - macros: use -Wl,-z,now with -Wl,-z,relro unless _disable_ld_now is defined - mangle script shebangs diff --git a/macros.in b/macros.in index 0ee6fb3..91f6e08 100644 --- a/macros.in +++ b/macros.in @@ -251,13 +251,13 @@ GCONF_CONFIG_SOURCE=`%{_gconftool_bin} --get-default-source` %{_gconftool_bin} - # cf http://wiki.mandriva.com/en/Development/Packaging/Problems#format_not_a_string_literal_and_no_format_arguments %Werror_cflags -Wformat -Werror=format-security -%_ssp_cflags -fstack-protector-strong %{?_serverbuild_flags: %_serverbuild_flags} +%_ssp_cflags -fstack-protector-strong %__common_cflags -O2 %{debugcflags} -pipe %{Werror_cflags} %{?_fortify_cflags}%{?_legacy_common_support: -fcommon} %__common_cflags_with_ssp %{__common_cflags} %{?_ssp_cflags} # Servers opt flags. # Also set the env variables for backward compatibility (mdv #32050). -%serverbuild %define _serverbuild_flags -fstack-protector-all \ +%serverbuild %define _ssp_cflags -fstack-protector-all \ export CFLAGS="%optflags"; export CXXFLAGS="%optflags"; export RPM_OPT_FLAGS="%optflags" \ %{nil} -- cgit v1.2.1