From 24273b0d275fc826204a9ef29d67635820c1fdf5 Mon Sep 17 00:00:00 2001 From: Siddhesh Poyarekar Date: Fri, 22 Sep 2023 09:58:30 +0000 Subject: [PATCH] Use _fortify_level to disable fortification in debug builds Fedora commit: cb41bf05f1f267ad79b8f72ee95addcc29e8f2e5 Related: RHEL-8411 --- mariadb.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mariadb.spec b/mariadb.spec index 306199c..cfb4857 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -880,10 +880,10 @@ CFLAGS="$CFLAGS -fPIC" %if %{with debug} # Override all optimization flags when making a debug build # -D_FORTIFY_SOURCE requires optimizations enabled. Disable the fortify. -CFLAGS=`echo "$CFLAGS" | sed -r 's/-D_FORTIFY_SOURCE=[012]/-D_FORTIFY_SOURCE=0/'` +%undefine _fortify_level CFLAGS=`echo "$CFLAGS" | sed -r 's/-O[0123]//'` -CFLAGS="$CFLAGS -O0 -g -D_FORTIFY_SOURCE=0" +CFLAGS="$CFLAGS -O0 -g" # Fixes for Fedora 32 & Rawhide (GCC 10.0): %if 0%{?fedora} >= 32 @@ -1649,6 +1649,9 @@ fi %endif %changelog +* Wed May 31 2023 Siddhesh Poyarekar - 3:10.5.20-2 +- Use _fortify_level to disable fortification in debug builds + * Tue May 30 2023 Lukas Javorsky - 3:10.5.20-1 - Rebase to version 10.5.20