]> TLD Linux GIT Repositories - packages/rpm.git/blobdiff - rpm-macros-ti.patch
- merged cflags/ldflags macros from PLD, we need this to their specs
[packages/rpm.git] / rpm-macros-ti.patch
index ac1956d8951ba1d1b8e8677fb1d97e732c86325d..1e2a93427ba6e200604848253668375890c9b20e 100644 (file)
@@ -1,6 +1,6 @@
-diff -urN rpm-4.5/macros.in rpm-4.5.new//macros.in
---- rpm-4.5/macros.in  2010-05-28 20:56:02.854032755 +0200
-+++ rpm-4.5.new//macros.in     2010-05-28 20:59:04.177348180 +0200
+diff -ur rpm-4.5.orig/macros.in rpm-4.5/macros.in
+--- rpm-4.5.orig/macros.in     2013-07-17 11:43:34.000000000 +0000
++++ rpm-4.5/macros.in  2013-07-17 11:55:15.035117233 +0000
 @@ -277,6 +277,9 @@
  #
  #%distribution
@@ -29,13 +29,58 @@ diff -urN rpm-4.5/macros.in rpm-4.5.new//macros.in
  
  #------------------------------------------------------------------------
  # executable(...) configuration.
-@@ -1482,6 +1485,9 @@
- # -feliminate-dwarf2-dups disabled until PR ld/3290 is fixed.
+@@ -1478,16 +1481,49 @@
+ #-----------------------------------------------------------------
+ # CFLAGS and LDFLAGS used to build
+-%debuginfocflags      %{expand:%%define __dic_%{?_enable_debug_packages} 1}%{?__dic_1: -gdwarf-4 -fno-debug-types-section -g2}%{expand:%%undefine __dic_%{?_enable_debug_packages}}
++%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}}
++# -feliminate-dwarf2-dups disabled until PR ld/3290 is fixed.
  
  %debugcflags  -O0 -g -Wall
 +%debugcppflags        %{nil}
++%debugldflags %{nil}
++
 +%optldflags   -Wl,--as-needed -Wl,--no-copy-dt-needed-entries -Wl,-z,relro -Wl,-z,combreloc
 +%optcppflags  %{nil}
  
  # Warning: those macros are overwritten by macros.build,
  #          left here for compatibility
+-%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.
+ #