1 diff -ur rpm-4.5.orig/macros.in rpm-4.5/macros.in
2 --- rpm-4.5.orig/macros.in 2013-07-17 11:43:34.000000000 +0000
3 +++ rpm-4.5/macros.in 2013-07-17 11:55:15.035117233 +0000
11 # Configurable distribution URL, same as DistURL: tag in a specfile.
12 # The URL will be used to supply reliable information to tools like
15 # Note: Used iff _use_internal_dependency_generator is non-zero. The
16 # helpers are also used by %{_rpmhome}/rpmdeps {--provides|--requires}.
17 %__libtool_provides %{_rpmhome}/libtooldeps.sh --provides %{buildroot} %{name}
18 -%__libtool_requires %{_rpmhome}/libtooldeps.sh --requires %{buildroot} %{name}
19 +%__libtool_requires %{nil}
21 #------------------------------------------------------------------------
22 # pkgconfig(...) configuration.
24 # Note: Used iff _use_internal_dependency_generator is non-zero. The
25 # helpers are also used by %{_rpmhome}/rpmdeps {--provides|--requires}.
26 %__pkgconfig_provides %{_rpmhome}/pkgconfigdeps.sh --provides
27 -%__pkgconfig_requires %{_rpmhome}/pkgconfigdeps.sh --requires
28 +%__pkgconfig_requires %{nil}
30 #------------------------------------------------------------------------
31 # executable(...) configuration.
32 @@ -1478,16 +1481,49 @@
33 #-----------------------------------------------------------------
34 # CFLAGS and LDFLAGS used to build
36 -%debuginfocflags %{expand:%%define __dic_%{?_enable_debug_packages} 1}%{?__dic_1: -gdwarf-4 -fno-debug-types-section -g2}%{expand:%%undefine __dic_%{?_enable_debug_packages}}
37 +%debuginfocflags %{expand:%%define __dic_%{?_enable_debug_packages} 1}%{?__dic_1: -gdwarf-4 -fno-debug-types-section -fvar-tracking-assignments -g2}%{expand:%%undefine __dic_%{?_enable_debug_packages}}
38 +# -feliminate-dwarf2-dups disabled until PR ld/3290 is fixed.
40 %debugcflags -O0 -g -Wall
41 +%debugcppflags %{nil}
44 +%optldflags -Wl,--as-needed -Wl,--no-copy-dt-needed-entries -Wl,-z,relro -Wl,-z,combreloc
47 # Warning: those macros are overwritten by macros.build,
48 # left here for compatibility
49 -%rpmcflags %{?debug:%debugcflags}%{!?debug:%optflags}%{?debuginfocflags}
50 -%rpmcxxflags %{rpmcflags}
51 -%rpmldflags %{!?no_build_with_as_needed:-Wl,--as-needed}
53 +%rpmcflags %(awk 'BEGIN {
54 + split("%{?debug:%debugcflags}%{!?debug:%optflags}%{?debuginfocflags}",I);
55 + split("%{?filterout} %{?filterout_c} %{?filterout_ld}",F);
58 +%rpmcppflags %(awk 'BEGIN {
59 + split("%{?debug:%debugcppflags}%{!?debug:%optcppflags}%{?debuginfocppflags}",I);
60 + split("%{?filterout} %{?filterout_cpp} %{?filterout_cpp}",F);
63 +%rpmcxxflags %(awk 'BEGIN {
64 + split("%{?debug:%debugcflags}%{!?debug:%optflags}%{?debuginfocflags}",I);
65 + split("%{?filterout} %{?filterout_cxx} %{?filterout_ld}",F);
68 +%rpmldflags %(awk 'BEGIN {
69 + split("%{?optldflags}",I);
70 + split("%{?filterout_ld}",F)
74 +# common compilation flags
75 +%_fortify_cflags -Wp,-D_FORTIFY_SOURCE=2
77 +# cf http://wiki.mandriva.com/en/Development/Packaging/Problems#format_not_a_string_literal_and_no_format_arguments
78 +%Werror_cflags -Wformat -Werror=format-security
80 +%_ssp_cflags -fstack-protector --param=ssp-buffer-size=4
81 +%__common_cflags -O2 -fwrapv -pipe %{Werror_cflags} %{debuginfocflags} %{?_fortify_cflags} %{!?nospecflags:%{?specflags}}
82 +%__common_cflags_with_ssp %{__common_cflags} %{?_ssp_cflags}
84 #------------------------------------------------------------------------
85 # mimetype(...) configuration.