On Tue, Sep 27, 2022 at 08:22:05AM +0200, Johannes Kastl wrote:
Hi all,
I failed to find instructions on how to revert the change to FORTIFY_SOURCE=3 for a single package. I thought there was a thread on the factory list, but fail to find it again.
I did not find anything regarding FORTIFY_SOURCE=3 in the wiki, the only page I found was this: https://en.opensuse.org/openSUSE:Build_system_recipes
The %configure macro will set CFLAGS, CXXFLAGS, FFLAGS to %optflags if they have not been previously set. To add in your own flags, put on a line before %configure:
export CPPFLAGS="-Dpreprocessor_options -Ihere"
But apparently setting the CPPFLAGS like this overrides all of the previously set flags, and does not only add something (as Dominique pointed out in SR#1005907).
Maybe someone can enlighten me on how to properly revert FORTIFY_SOURCE=3? :-)
try export RPM_OPT_FLASG="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2" or export CLAGS="%optflags -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2" at begin of %build section? Ciao, Marcus