From 0d7110012cedc095d2e4d8d13b5ebcf57f4560d3 Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Wed, 17 Jul 2013 11:06:01 +0000 Subject: [PATCH] - updated cflags/ldflags for TLD platforms --- rpm-installplatform.patch | 105 ++++++++++++++++++++++++++++++++++++++ rpm-macros-ti.patch | 2 +- rpm-rpmrc.patch | 22 ++++---- rpm.spec | 4 +- 4 files changed, 120 insertions(+), 13 deletions(-) create mode 100644 rpm-installplatform.patch diff --git a/rpm-installplatform.patch b/rpm-installplatform.patch new file mode 100644 index 0000000..250055b --- /dev/null +++ b/rpm-installplatform.patch @@ -0,0 +1,105 @@ +--- rpm-4.5/installplatform.orig 2013-07-17 10:01:04.000000000 +0000 ++++ rpm-4.5/installplatform 2013-07-17 10:18:26.094178797 +0000 +@@ -35,7 +35,7 @@ + sparc*) SUBSTS='s_sparc\(64\|v9\)_sparc_ s_sparc64_sparcv9_;s_sparc\([^v]\|$\)_sparcv9\1_ s_sparcv9_sparc64_;s_sparc\([^6]\|$\)_sparc64\1_' ;; + powerpc*|ppc*) SUBSTS='s_ppc64_ppc_ s_ppc\([^6ip]\|$\)_ppc64\1_ s_ppc\([^6ip]\|$\)_ppciseries_ s_ppc\([^6ip]\|$\)_ppcpseries_ s_ppc\([^6ip]\|$\)_ppc64iseries_ s_ppc\([^6ip]\|$\)_ppc64pseries_' ;; + s390*) SUBSTS='s_s390x_s390_ s_s390\([^x]\|$\)_s390x\1_' ;; +- x86_64|amd64|ia32e) SUBSTS='s,x86_64,x86_64, s,x86_64,ia32e, s,x86_64,amd64,' ;; ++ x86_64|amd64|ia32e) SUBSTS='s|x86_64|x86_64| s|x86_64|ia32e| s|x86_64|amd64|' ;; + *) SUBSTS=y___ ;; + esac + +@@ -50,7 +50,7 @@ + [ -d $PPD ] || mkdir $PPD + + RPMRC_OPTFLAGS="`sed -n 's/^optflags: '$ARCH' //p' $RPMRC`" +- RPMRC_OPTFLAGS="`echo $RPMRC_OPTFLAGS | sed -e 's, ,\ ,g'`" ++ RPMRC_OPTFLAGS="`echo $RPMRC_OPTFLAGS | sed -e 's| |\ |g'`" + case $RPMRC_OPTFLAGS in + *-g*) ;; + *) RPMRC_OPTFLAGS="$RPMRC_OPTFLAGS -g" ;; +@@ -71,45 +71,45 @@ + esac + + if [ -n "$MULTILIBNO" ]; then +- MULTILIBSED='-e /^@MULTILIB/d -e s,@MULTILIBNO@,'$MULTILIBNO, ++ MULTILIBSED='-e /^@MULTILIB/d -e s|@MULTILIBNO@|'$MULTILIBNO'|' + else + MULTILIBSED='-e /^@MULTILIBSTART@/,/^@MULTILIBEND@/d' + fi + + case $VENDOR in + yellowdog) +- VENDORSED='-e s,^@yellowdog@,,' ++ VENDORSED='-e s|^@yellowdog@||' + ;; + tld) +- VENDORSED='-e s,^@tld@,,' ++ VENDORSED='-e s|^@tld@||' + RPMRC_OPTFLAGS="`echo $RPMRC_OPTFLAGS | sed -e "s/ -g/ /"`" + ;; + mandrake) +- VENDORSED='-e s,^@mandrake@,,' ++ VENDORSED='-e s|^@mandrake@||' + RPMRC_OPTFLAGS="`echo $RPMRC_OPTFLAGS | sed -e s/i386/i686/`" + ;; + conectiva) +- VENDORSED='-e s,^@conectiva@,,' ++ VENDORSED='-e s|^@conectiva@||' + ;; + redhat) +- VENDORSED='-e s,^@redhat@,,' ++ VENDORSED='-e s|^@redhat@||' + ;; + apple) +- VENDORSED='-e s,^@apple@,,' ++ VENDORSED='-e s|^@apple@||' + ;; + crux) +- VENDORSED='-e s,^@crux@,,' ++ VENDORSED='-e s|^@crux@||' + ;; + esac + + cat $PLATFORM \ +- | sed -e "s,@RPMRC_OPTFLAGS@,$RPMRC_OPTFLAGS," \ +- -e "s,@RPMRC_ARCH@,$ARCH," \ +- -e "s,@RPMRC_GNU@,$RPMRC_GNU," \ +- -e "s,@LIB@,$LIB," \ +- -e "s,@ARCH_INSTALL_POST@,$ARCH_INSTALL_POST," \ +- -e "s,@DEFAULTDOCDIR@,$DEFAULTDOCDIR," \ +- -e '/\${\w*:-/!s,\${,%{_,' \ ++ | sed -e "s|@RPMRC_OPTFLAGS@|$RPMRC_OPTFLAGS|" \ ++ -e "s|@RPMRC_ARCH@|$ARCH|" \ ++ -e "s|@RPMRC_GNU@|$RPMRC_GNU|" \ ++ -e "s|@LIB@|$LIB|" \ ++ -e "s|@ARCH_INSTALL_POST@|$ARCH_INSTALL_POST|" \ ++ -e "s|@DEFAULTDOCDIR@|$DEFAULTDOCDIR|" \ ++ -e '/\${\w*:-/!s|\${|%{_|' \ + $MULTILIBSED \ + $VENDORSED \ + | grep -v '^@' \ +@@ -117,19 +117,20 @@ + + done + ++ + { cd ${DESTDIR}/${pkglibdir} + [ -L noarch-${OS} ] && rm -f noarch-${OS} 2>/dev/null + mkdir -p noarch-${OS} +- sed -e "/^%_arch/s,${arch},noarch," ${arch}-${OS}/macros | grep -v '^%optflags' > noarch-${OS}/macros ++ sed -e "/^%_arch/s|${arch}|noarch|" ${arch}-${OS}/macros | grep -v '^%optflags' > noarch-${OS}/macros + # [ -d ${VENDOR} ] || mkdir ${VENDOR} + # for i in brp-* find-lang.sh find-provides find-requires perl.prov perl.req + # do +-# sed -e "s,/usr/lib/rpm,/usr/lib/rpm/${VENDOR},g" < $i > ${VENDOR}/$i ++# sed -e "s|/usr/lib/rpm|/usr/lib/rpm/${VENDOR}|g" < $i > ${VENDOR}/$i + # chmod +x ${VENDOR}/$i + # done + ## chmod -x ${VENDOR}/perl.req + # echo "macrofiles: /usr/lib/rpm/macros:/usr/lib/rpm/${VENDOR}/macros:/etc/rpm/macros.specspo:/etc/rpm/macros.cdb" > ${VENDOR}/rpmrc +-# sed -e "s,/usr/lib/rpm,/usr/lib/rpm/${VENDOR},g" < ${arch}-${OS}/macros | grep -v '^%(_arch|optflags)' > ${VENDOR}/macros ++# sed -e "s|/usr/lib/rpm|/usr/lib/rpm/${VENDOR}|g" < ${arch}-${OS}/macros | grep -v '^%(_arch|optflags)' > ${VENDOR}/macros + } + + rm $TEMPRC diff --git a/rpm-macros-ti.patch b/rpm-macros-ti.patch index dbe7d01..ac1956d 100644 --- a/rpm-macros-ti.patch +++ b/rpm-macros-ti.patch @@ -35,7 +35,7 @@ diff -urN rpm-4.5/macros.in rpm-4.5.new//macros.in %debugcflags -O0 -g -Wall +%debugcppflags %{nil} +%optldflags -Wl,--as-needed -Wl,--no-copy-dt-needed-entries -Wl,-z,relro -Wl,-z,combreloc -+%optcppflags -D_FORTIFY_SOURCE=2 ++%optcppflags %{nil} # Warning: those macros are overwritten by macros.build, # left here for compatibility diff --git a/rpm-rpmrc.patch b/rpm-rpmrc.patch index 1c19c17..53f1741 100644 --- a/rpm-rpmrc.patch +++ b/rpm-rpmrc.patch @@ -65,17 +65,17 @@ -optflags: atariclone -O2 -g -fomit-frame-pointer -optflags: milan -O2 -g -fomit-frame-pointer -optflags: hades -O2 -g -fomit-frame-pointer -+optflags: i386 -O2 -pipe -fno-strict-aliasing -fwrapv -march=i386%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32: %{specflags_ia32}}%{?specflags_i386: %{specflags_i386}}} -+optflags: i486 -O2 -pipe -fno-strict-aliasing -fwrapv -march=i486%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32: %{specflags_ia32}}%{?specflags_i486: %{specflags_i486}}} -+optflags: i586 -O2 -pipe -fno-strict-aliasing -fwrapv -march=i586%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32: %{specflags_ia32}}%{?specflags_i586: %{specflags_i586}}} -+optflags: i686 -O2 -pipe -fno-strict-aliasing -fwrapv -march=i686 -mtune=pentium4%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32: %{specflags_ia32}}%{?specflags_i686: %{specflags_i686}}} -+optflags: pentium3 -O2 -pipe -fno-strict-aliasing -fwrapv -march=pentium3%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32: %{specflags_ia32}}%{?specflags_pentium3: %{specflags_pentium3}}} -+optflags: pentium4 -O2 -pipe -fno-strict-aliasing -fwrapv -march=pentium4%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32: %{specflags_ia32}}%{?specflags_pentium4: %{specflags_pentium4}}} -+optflags: athlon -O2 -pipe -fno-strict-aliasing -fwrapv -march=athlon%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32: %{specflags_ia32}}%{?specflags_athlon: %{specflags_athlon}}} -+optflags: ia64 -O2 -pipe -fno-strict-aliasing -fwrapv%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia64: %{specflags_ia64}}} -+optflags: x86_64 -O2 -pipe -fno-strict-aliasing -fwrapv -march=x86-64%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_x86_64: %{specflags_x86_64}}} -+optflags: amd64 -O2 -pipe -fno-strict-aliasing -fwrapv -march=k8%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_amd64: %{specflags_amd64}}} -+optflags: ia32e -O2 -pipe -fno-strict-aliasing -fwrapv -march=nocona%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32e: %{specflags_ia32e}}} ++optflags: i386 -O2 -pipe -fno-strict-aliasing -fwrapv -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fomit-frame-pointer -fasynchronous-unwind-tables -mtune=generic -march=i386%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32: %{specflags_ia32}}%{?specflags_i386: %{specflags_i386}}} ++optflags: i486 -O2 -pipe -fno-strict-aliasing -fwrapv -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fomit-frame-pointer -fasynchronous-unwind-tables -march=i486%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32: %{specflags_ia32}}%{?specflags_i486: %{specflags_i486}}} ++optflags: i586 -O2 -pipe -fno-strict-aliasing -fwrapv -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fomit-frame-pointer -fasynchronous-unwind-tables -mtune=generic -march=i586%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32: %{specflags_ia32}}%{?specflags_i586: %{specflags_i586}}} ++optflags: i686 -O2 -pipe -fno-strict-aliasing -fwrapv -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fomit-frame-pointer -fasynchronous-unwind-tables -march=i686 -mtune=pentium4%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32: %{specflags_ia32}}%{?specflags_i686: %{specflags_i686}}} ++optflags: pentium3 -O2 -pipe -fno-strict-aliasing -fwrapv -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fomit-frame-pointer -march=pentium3%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32: %{specflags_ia32}}%{?specflags_pentium3: %{specflags_pentium3}}} ++optflags: pentium4 -O2 -pipe -fno-strict-aliasing -fwrapv -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fomit-frame-pointer -march=pentium4%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32: %{specflags_ia32}}%{?specflags_pentium4: %{specflags_pentium4}}} ++optflags: athlon -O2 -pipe -fno-strict-aliasing -fwrapv -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fomit-frame-pointer -fasynchronous-unwind-tables -march=athlon%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32: %{specflags_ia32}}%{?specflags_athlon: %{specflags_athlon}}} ++optflags: ia64 -O2 -pipe -fno-strict-aliasing -fwrapv -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia64: %{specflags_ia64}}} ++optflags: x86_64 -O2 -pipe -fno-strict-aliasing -fwrapv -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fPIC -march=x86-64%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_x86_64: %{specflags_x86_64}}} ++optflags: amd64 -O2 -pipe -fno-strict-aliasing -fwrapv -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fPIC -march=k8%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_amd64: %{specflags_amd64}}} ++optflags: ia32e -O2 -pipe -fno-strict-aliasing -fwrapv -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fPIC -march=nocona%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32e: %{specflags_ia32e}}} + +optflags: alpha -O2 -fno-strict-aliasing -fwrapv -mieee%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_alpha: %{specflags_alpha}}} +optflags: alphaev5 -O2 -fno-strict-aliasing -fwrapv -mieee -mcpu=ev5%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_alpha: %{specflags_alpha}}%{?specflags_alphaev5: %{specflags_alphaev5}}} diff --git a/rpm.spec b/rpm.spec index 881443c..902c98e 100644 --- a/rpm.spec +++ b/rpm.spec @@ -42,7 +42,7 @@ Summary(ru.UTF-8): Менеджер пакетов от RPM Summary(uk.UTF-8): Менеджер пакетів від RPM Name: rpm Version: 4.5 -Release: 71 +Release: 72 License: LGPL Group: Base Source0: %{name}-%{version}.tar.gz @@ -166,6 +166,7 @@ Patch105: %{name}-am.patch Patch106: %{name}-automake_1.12.patch Patch107: %{name}-debugedit-dwarf4.patch Patch108: %{name}-changelog_order_check_nonfatal.patch +Patch109: %{name}-installplatform.patch URL: http://rpm5.org/ BuildRequires: autoconf >= 2.57 BuildRequires: automake >= 1.4 @@ -783,6 +784,7 @@ install %{SOURCE13} scripts/perl.prov %patch106 -p1 %patch107 -p1 %patch108 -p1 +%patch109 -p1 mv -f po/{sr,sr@Latn}.po rm -rf sqlite zlib popt -- 2.46.0