diff options
author | Mike Frysinger <vapier@gentoo.org> | 2013-05-11 19:52:32 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2013-05-11 19:52:32 +0000 |
commit | 669c62b56f8527ad4f37f0be26edcb9cd8008aad (patch) | |
tree | 8349d50350553900001b09a1ad55e087b9fc606c /sys-devel/prelink | |
parent | Clean old (diff) | |
download | gentoo-2-669c62b56f8527ad4f37f0be26edcb9cd8008aad.tar.gz gentoo-2-669c62b56f8527ad4f37f0be26edcb9cd8008aad.tar.bz2 gentoo-2-669c62b56f8527ad4f37f0be26edcb9cd8008aad.zip |
Version bump.
(Portage version: 2.2.0_alpha170/cvs/Linux x86_64, signed Manifest commit with key FB7C4156)
Diffstat (limited to 'sys-devel/prelink')
-rw-r--r-- | sys-devel/prelink/ChangeLog | 10 | ||||
-rw-r--r-- | sys-devel/prelink/files/prelink-20130503-libiberty-md5.patch | 61 | ||||
-rw-r--r-- | sys-devel/prelink/files/prelink-20130503-prelink-conf.patch | 39 | ||||
-rw-r--r-- | sys-devel/prelink/files/prelink-armhf-dynamic-linker.patch | 12 | ||||
-rw-r--r-- | sys-devel/prelink/prelink-20130503.ebuild | 84 |
5 files changed, 205 insertions, 1 deletions
diff --git a/sys-devel/prelink/ChangeLog b/sys-devel/prelink/ChangeLog index c38397d6a050..ed4771318c15 100644 --- a/sys-devel/prelink/ChangeLog +++ b/sys-devel/prelink/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for sys-devel/prelink # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/prelink/ChangeLog,v 1.91 2013/05/11 16:33:54 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/prelink/ChangeLog,v 1.92 2013/05/11 19:52:32 vapier Exp $ + +*prelink-20130503 (11 May 2013) + + 11 May 2013; Mike Frysinger <vapier@gentoo.org> + +files/prelink-20130503-libiberty-md5.patch, + +files/prelink-20130503-prelink-conf.patch, + +files/prelink-armhf-dynamic-linker.patch, +prelink-20130503.ebuild: + Version bump. 11 May 2013; Mike Frysinger <vapier@gentoo.org> prelink-20120628.ebuild: Fix building w/automake-1.13 #469126 by ablepharus. diff --git a/sys-devel/prelink/files/prelink-20130503-libiberty-md5.patch b/sys-devel/prelink/files/prelink-20130503-libiberty-md5.patch new file mode 100644 index 000000000000..36b8bcecb312 --- /dev/null +++ b/sys-devel/prelink/files/prelink-20130503-libiberty-md5.patch @@ -0,0 +1,61 @@ +From 8eeb9da6d017761037bf757780ea544dfeabbad8 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger <vapier@gentoo.org> +Date: Tue, 31 Jul 2012 09:02:35 +0000 +Subject: [PATCH] libiberty/md5: fix strict alias warnings +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Current libiberty md5 code triggers these warnings with gcc-4.7.1 for me: + +libiberty/md5.c: In function âmd5_finish_ctxâ: +libiberty/md5.c:117:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] +libiberty/md5.c:118:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] + +The change below fixes things for me. The optimized output (-O2) is the same +before/after my change on x86_64-linux. I imagine it'll be the same for most +targets. It seems simpler than using a union on the md5_ctx buffer since these +are the only two locations in the code where this occurs. +--- + libiberty/ChangeLog | 5 +++++ + libiberty/md5.c | 12 ++++++++---- + 2 files changed, 13 insertions(+), 4 deletions(-) + +2012-07-31 Mike Frysinger <vapier@gentoo.org> + + * md5.c (md5_finish_ctx): Declare swap_bytes. Assign SWAP() output + to swap_bytes, and then call memcpy to move it to ctx->buffer. + +diff --git a/libiberty/md5.c b/libiberty/md5.c +index 0db8fc8..8cc0cb5 100644 +--- a/src/md5.c ++++ b/src/md5.c +@@ -103,6 +103,7 @@ md5_finish_ctx (struct md5_ctx *ctx, void *resbuf) + { + /* Take yet unprocessed bytes into account. */ + md5_uint32 bytes = ctx->buflen; ++ md5_uint32 swap_bytes; + size_t pad; + + /* Now count remaining bytes. */ +@@ -113,10 +114,13 @@ md5_finish_ctx (struct md5_ctx *ctx, void *resbuf) + pad = bytes >= 56 ? 64 + 56 - bytes : 56 - bytes; + memcpy (&ctx->buffer[bytes], fillbuf, pad); + +- /* Put the 64-bit file length in *bits* at the end of the buffer. */ +- *(md5_uint32 *) &ctx->buffer[bytes + pad] = SWAP (ctx->total[0] << 3); +- *(md5_uint32 *) &ctx->buffer[bytes + pad + 4] = SWAP ((ctx->total[1] << 3) | +- (ctx->total[0] >> 29)); ++ /* Put the 64-bit file length in *bits* at the end of the buffer. ++ Use memcpy to avoid aliasing problems. On most systems, this ++ will be optimized away to the same code. */ ++ swap_bytes = SWAP (ctx->total[0] << 3); ++ memcpy (&ctx->buffer[bytes + pad], &swap_bytes, sizeof (swap_bytes)); ++ swap_bytes = SWAP ((ctx->total[1] << 3) | (ctx->total[0] >> 29)); ++ memcpy (&ctx->buffer[bytes + pad + 4], &swap_bytes, sizeof (swap_bytes)); + + /* Process last bytes. */ + md5_process_block (ctx->buffer, bytes + pad + 8, ctx); +-- +1.8.2.1 + diff --git a/sys-devel/prelink/files/prelink-20130503-prelink-conf.patch b/sys-devel/prelink/files/prelink-20130503-prelink-conf.patch new file mode 100644 index 000000000000..9233a4114827 --- /dev/null +++ b/sys-devel/prelink/files/prelink-20130503-prelink-conf.patch @@ -0,0 +1,39 @@ +--- a/doc/prelink.conf ++++ b/doc/prelink.conf +@@ -5,6 +5,7 @@ + # If a directory name is prefixed with `-h ', symbolic links in a + # directory hierarchy are followed. + # Directories or files with `-b ' prefix will be blacklisted. ++-c /etc/prelink.conf.d/*.conf + -b *.la + -b *.png + -b *.py +@@ -16,8 +16,11 @@ + -b *.a + -b *.js + -b /lib/modules +--b /usr/lib/locale +--b /usr/X11R6/lib{,64}/X11/xfig ++-b /usr/lib{,x32,32,64}/locale ++-b /usr/lib{,x32,32,64}/wine ++-b /usr/lib{,x32,32,64}/valgrind ++-b /usr/X11R6/lib{,x32,32,64}/X11/xfig ++-b /usr/src + -l /bin + -l /usr/bin + -l /sbin +@@ -27,9 +30,9 @@ + -l /usr/games + -l /usr/libexec + -l /var/ftp/bin +--l /lib{,64} +--l /usr/lib{,64} +--l /usr/X11R6/lib{,64} +--l /usr/kerberos/lib{,64} ++-l /lib{,x32,32,64} ++-l /usr/lib{,x32,32,64} ++-l /usr/X11R6/lib{,x32,32,64} ++-l /usr/kerberos/lib{,x32,32,64} + -l /usr/X11R6/LessTif +--l /var/ftp/lib{,64} ++-l /var/ftp/lib{,x32,32,64} diff --git a/sys-devel/prelink/files/prelink-armhf-dynamic-linker.patch b/sys-devel/prelink/files/prelink-armhf-dynamic-linker.patch new file mode 100644 index 000000000000..896101040b5b --- /dev/null +++ b/sys-devel/prelink/files/prelink-armhf-dynamic-linker.patch @@ -0,0 +1,12 @@ +diff -urNp prelink_orig/src/arch-arm.c prelink/src/arch-arm.c +--- prelink_orig/src/arch-arm.c 2011-08-26 03:20:49.000000000 -0400 ++++ prelink/src/arch-arm.c 2012-11-28 23:59:28.030164736 -0500 +@@ -832,7 +832,7 @@ PL_ARCH = { + .R_COPY = R_ARM_COPY, + .R_RELATIVE = R_ARM_RELATIVE, + .rtype_class_valid = RTYPE_CLASS_VALID, +- .dynamic_linker = "/lib/ld-linux.so.3", ++ .dynamic_linker = "/lib/ld-linux-armhf.so.3", + .adjust_dyn = arm_adjust_dyn, + .adjust_rel = arm_adjust_rel, + .adjust_rela = arm_adjust_rela, diff --git a/sys-devel/prelink/prelink-20130503.ebuild b/sys-devel/prelink/prelink-20130503.ebuild new file mode 100644 index 000000000000..ffdfa5ff8a57 --- /dev/null +++ b/sys-devel/prelink/prelink-20130503.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-devel/prelink/prelink-20130503.ebuild,v 1.1 2013/05/11 19:52:32 vapier Exp $ + +EAPI="4" + +inherit autotools eutils flag-o-matic + +DESCRIPTION="Modifies ELFs to avoid runtime symbol resolutions resulting in faster load times" +HOMEPAGE="http://people.redhat.com/jakub/prelink" + +SRC_URI="mirror://gentoo/${P}.tar.bz2" +#SRC_URI="http://people.redhat.com/jakub/prelink/${P}.tar.bz2" + +# if not available on jakub's dev space extract the distfile with rpm2tarbz2 from +# http://mirrors.kernel.org/fedora/development/rawhide/source/SRPMS/p/prelink-[ver].src.rpm +# +# track http://pkgs.fedoraproject.org/cgit/prelink.git/ for updates + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 -arm ~ppc ~ppc64 ~x86" +IUSE="selinux" + +DEPEND=">=dev-libs/elfutils-0.100[static-libs(+)] + selinux? ( sys-libs/libselinux[static-libs(+)] ) + !dev-libs/libelf + >=sys-libs/glibc-2.8" +RDEPEND="${DEPEND} + >=sys-devel/binutils-2.18" + +S=${WORKDIR}/${PN} + +src_prepare() { + epatch "${FILESDIR}"/${PN}-20130503-prelink-conf.patch + epatch "${FILESDIR}"/${PN}-20130503-libiberty-md5.patch + epatch "${FILESDIR}"/${PN}-armhf-dynamic-linker.patch + + sed -i -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' configure.in || die #469126 + + sed -i -e '/^CC=/s: : -Wl,--disable-new-dtags :' testsuite/functions.sh #100147 + # >=binutils-2.22 --no-copy-dt-needed-entries is the default + # --copy-dt-needed-entries was renamed from --add-needed in 2.21, use the + # former so we don't have to bump the dep + sed -i \ + -e '/CCLINK=/s:CCLINK="$(CC):& -Wl,--add-needed :' \ + -e '/CXXLINK=/s:CXXLINK="$(CXX):& -Wl,--add-needed :' \ + testsuite/Makefile.am + + has_version 'dev-libs/elfutils[threads]' && append-ldflags -pthread + + eautoreconf # prevent maintainer mode + + # have to do this after eautoreconf or automake barfs on the trailing + # backslash of the previous line + sed -i -e 's:undosyslibs.sh::' testsuite/Makefile.in #254201 + + export ac_cv_{header_selinux_selinux_h,lib_selinux_is_selinux_enabled}=$(usex selinux) +} + +src_install() { + default + + insinto /etc + doins doc/prelink.conf + + exeinto /etc/cron.daily + newexe "${FILESDIR}"/prelink.cron prelink + newconfd "${FILESDIR}"/prelink.confd prelink + + dodir /var/{lib/misc,log} + touch "${ED}"/var/lib/misc/prelink.{full,quick,force} + touch "${ED}"/var/log/prelink.log +} + +pkg_postinst() { + if [ -z "${REPLACING_VERSIONS}" ] ; then + elog "You may wish to read the Gentoo Linux Prelink Guide, which can be" + elog "found online at:" + elog " http://www.gentoo.org/doc/en/prelink-howto.xml" + elog "Please edit /etc/conf.d/prelink to enable and configure prelink" + fi + touch "${EROOT}/var/lib/misc/prelink.force" +} |