]> TLD Linux GIT Repositories - packages/rpm.git/blob - rpm-macros-ti.patch
9ddff0bd72ff47ec985657d6604ae51632c5ce47
[packages/rpm.git] / rpm-macros-ti.patch
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
4 @@ -277,6 +277,9 @@
5  #
6  #%distribution
7  
8 +# TLD Linux Release for backward compatibility with PLD spec files
9 +%pld_release   ti
10 +
11  #      Configurable distribution URL, same as DistURL: tag in a specfile.
12  #      The URL will be used to supply reliable information to tools like
13  #      rpmfind.
14 @@ -1449,7 +1452,7 @@
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}
20  
21  #------------------------------------------------------------------------
22  # pkgconfig(...) configuration.
23 @@ -1459,7 +1462,7 @@
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}
29  
30  #------------------------------------------------------------------------
31  # executable(...) configuration.
32 @@ -1478,16 +1481,49 @@
33  #-----------------------------------------------------------------
34  # CFLAGS and LDFLAGS used to build
35  
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.
39  
40  %debugcflags   -O0 -g -Wall
41 +%debugcppflags %{nil}
42 +%debugldflags  %{nil}
43 +
44 +%optldflags    -Wl,--as-needed -Wl,--no-copy-dt-needed-entries -Wl,-z,relro -Wl,-z,combreloc
45 +%optcppflags   %{nil}
46  
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}
52 -  
53 +%rpmcflags %(awk 'BEGIN {
54 +       split("%{?debug:%debugcflags}%{!?debug:%optflags}%{?debuginfocflags}",I);
55 +       split("%{?filterout} %{?filterout_c} %{?filterout_ld}",F);
56 +       %{filter_out}
57 +}')
58 +%rpmcppflags       %(awk 'BEGIN {
59 +       split("%{?debug:%debugcppflags}%{!?debug:%optcppflags}%{?debuginfocppflags}",I);
60 +       split("%{?filterout} %{?filterout_cpp} %{?filterout_cpp}",F);
61 +       %{filter_out}
62 +}')
63 +%rpmcxxflags       %(awk 'BEGIN {
64 +       split("%{?debug:%debugcflags}%{!?debug:%optflags}%{?debuginfocflags}",I);
65 +       split("%{?filterout} %{?filterout_cxx} %{?filterout_ld}",F);
66 +       %{filter_out}
67 +}')
68 +%rpmldflags        %(awk 'BEGIN {
69 +       split("%{?optldflags}",I);
70 +       split("%{?filterout_ld}",F)
71 +       %{filter_out}
72 +}')
73 +
74 +# common compilation flags
75 +%_fortify_cflags       -Wp,-D_FORTIFY_SOURCE=2
76 +
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
79 +
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}
83 +
84  #------------------------------------------------------------------------
85  # mimetype(...) configuration.
86  #