+-%rpmcflags %{?debug:%debugcflags}%{!?debug:%optflags}%{?debuginfocflags}
+-%rpmcxxflags %{rpmcflags}
+-%rpmldflags %{!?no_build_with_as_needed:-Wl,--as-needed}
+-
++%rpmcflags %(awk 'BEGIN {
++ split("%{?debug:%debugcflags}%{!?debug:%optflags}%{?debuginfocflags}",I);
++ split("%{?filterout} %{?filterout_c} %{?filterout_ld}",F);
++ %{filter_out}
++}')
++%rpmcppflags %(awk 'BEGIN {
++ split("%{?debug:%debugcppflags}%{!?debug:%optcppflags}%{?debuginfocppflags}",I);
++ split("%{?filterout} %{?filterout_cpp} %{?filterout_cpp}",F);
++ %{filter_out}
++}')
++%rpmcxxflags %(awk 'BEGIN {
++ split("%{?debug:%debugcflags}%{!?debug:%optflags}%{?debuginfocflags}",I);
++ split("%{?filterout} %{?filterout_cxx} %{?filterout_ld}",F);
++ %{filter_out}
++}')
++%rpmldflags %(awk 'BEGIN {
++ split("%{?optldflags}",I);
++ split("%{?filterout_ld}",F)
++ %{filter_out}
++}')
++
++# common compilation flags
++%_fortify_cflags -Wp,-D_FORTIFY_SOURCE=2
++
++# 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 --param=ssp-buffer-size=4
++%__common_cflags -O2 -fwrapv -pipe %{Werror_cflags} %{debuginfocflags} %{?_fortify_cflags} %{!?nospecflags:%{?specflags}}
++%__common_cflags_with_ssp %{__common_cflags} %{?_ssp_cflags}
++
+ #------------------------------------------------------------------------
+ # mimetype(...) configuration.
+ #