[packages/cross-binutils] use sed instead of perl

glen glen at pld-linux.org
Thu Jan 8 12:33:35 CET 2015


commit 8f81d42dcb34fecfafda2504d622062a602fa71a
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Thu Jan 8 13:33:28 2015 +0200

    use sed instead of perl

 cross-binutils.spec | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/cross-binutils.spec b/cross-binutils.spec
index 563b4f7..6760ac4 100644
--- a/cross-binutils.spec
+++ b/cross-binutils.spec
@@ -215,11 +215,12 @@ cd %{srcdir}
 # On ppc64 we might use 64KiB pages
 sed -i -e '/#define.*ELF_COMMONPAGESIZE/s/0x1000$/0x10000/' bfd/elf*ppc.c
 # LTP sucks
-perl -pi -e 's/i\[3-7\]86/i[34567]86/g' */conf*
+# exclude "gas/config", "libiberty/config", it's a dir
+%{__sed} -i -e 's/i\[3-7\]86/i[34567]86/g' $(echo */conf* | sed -e 's#gas/config##;s#libiberty/config##;')
 sed -i -e 's/%''{release}/%{release}/g' bfd/Makefile{.am,.in}
 sed -i -e '/^libopcodes_la_\(DEPENDENCIES\|LIBADD\)/s,$, ../bfd/libbfd.la,' opcodes/Makefile.{am,in}
 # Build libbfd.so and libopcodes.so with -Bsymbolic-functions if possible.
-if gcc %{optflags} -v --help 2>&1 | grep -q -- -Bsymbolic-functions; then
+if %{__cc} %{rpmcflags} -v --help 2>&1 | grep -q -- -Bsymbolic-functions; then
 	sed -i -e 's/^libbfd_la_LDFLAGS = /&-Wl,-Bsymbolic-functions /' bfd/Makefile.{am,in}
 	sed -i -e 's/^libopcodes_la_LDFLAGS = /&-Wl,-Bsymbolic-functions /' opcodes/Makefile.{am,in}
 fi
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/cross-binutils.git/commitdiff/8f81d42dcb34fecfafda2504d622062a602fa71a



More information about the pld-cvs-commit mailing list