diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2013-03-27 01:59:26 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2013-03-27 01:59:26 +0000 |
commit | fcb6c6a573a97fde16bb7016e1a0f346519af4d5 (patch) | |
tree | b6fb4da51e0ed562c346c07aed4dfbd936135a1b /sys-block | |
parent | vanilla-3.8.4 + genpatches-3.8-5 + grsecurity-2.9.1-3.8.4-201303252035 (diff) | |
download | gentoo-2-fcb6c6a573a97fde16bb7016e1a0f346519af4d5.tar.gz gentoo-2-fcb6c6a573a97fde16bb7016e1a0f346519af4d5.tar.bz2 gentoo-2-fcb6c6a573a97fde16bb7016e1a0f346519af4d5.zip |
PIC compile fixes for 32-bit.
(Portage version: 2.2.0_alpha169/cvs/Linux x86_64, unsigned Manifest commit)
Diffstat (limited to 'sys-block')
-rw-r--r-- | sys-block/fio/ChangeLog | 8 | ||||
-rw-r--r-- | sys-block/fio/files/fio-2.0.14-pic-clobber-fix.patch | 29 | ||||
-rw-r--r-- | sys-block/fio/fio-2.0.14-r1.ebuild | 51 |
3 files changed, 87 insertions, 1 deletions
diff --git a/sys-block/fio/ChangeLog b/sys-block/fio/ChangeLog index f07044b5e754..04ea1a2dbf7f 100644 --- a/sys-block/fio/ChangeLog +++ b/sys-block/fio/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sys-block/fio # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-block/fio/ChangeLog,v 1.28 2013/03/04 19:41:54 robbat2 Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-block/fio/ChangeLog,v 1.29 2013/03/27 01:59:26 robbat2 Exp $ + +*fio-2.0.14-r1 (27 Mar 2013) + + 27 Mar 2013; Robin H. Johnson <robbat2@gentoo.org> + +files/fio-2.0.14-pic-clobber-fix.patch, +fio-2.0.14-r1.ebuild: + PIC compile fixes for 32-bit. *fio-2.0.14 (04 Mar 2013) diff --git a/sys-block/fio/files/fio-2.0.14-pic-clobber-fix.patch b/sys-block/fio/files/fio-2.0.14-pic-clobber-fix.patch new file mode 100644 index 000000000000..fa35e27c754e --- /dev/null +++ b/sys-block/fio/files/fio-2.0.14-pic-clobber-fix.patch @@ -0,0 +1,29 @@ +diff -Nuar fio-2.0.14.orig/arch/arch-x86-common.h fio-2.0.14/arch/arch-x86-common.h +--- fio-2.0.14.orig/arch/arch-x86-common.h 2013-02-21 18:12:32.000000000 +0000 ++++ fio-2.0.14/arch/arch-x86-common.h 2013-03-27 01:48:04.000000000 +0000 +@@ -6,10 +6,24 @@ + static inline void do_cpuid(unsigned int *eax, unsigned int *ebx, + unsigned int *ecx, unsigned int *edx) + { ++#ifdef __PIC__ ++ /* 32-bit Hardened GCC (PIC) uses register EBX, so it must be preserved ++ * Fix ported from Gentoo's x86info-1.24-pic patch ++ * http://tuxion.com/2010/07/02/clobber-registers.html */ ++ asm volatile( ++ "movl %%ebx,%%edi\n" ++ "cpuid\n" ++ "movl %%ebx,%1\n" ++ "movl %%edi,%%ebx\n" ++ : "=a" (*eax), "=m" (*ebx), "=c" (*ecx), "=d" (*edx) ++ : "0" (*eax), "2" (*ecx) ++ : "memory", "%edi"); ++#else + asm volatile("cpuid" + : "=a" (*eax), "=b" (*ebx), "=c" (*ecx), "=d" (*edx) + : "0" (*eax), "2" (*ecx) + : "memory"); ++#endif + } + + static inline void cpuid(unsigned int op, + diff --git a/sys-block/fio/fio-2.0.14-r1.ebuild b/sys-block/fio/fio-2.0.14-r1.ebuild new file mode 100644 index 000000000000..c4b05df9e21b --- /dev/null +++ b/sys-block/fio/fio-2.0.14-r1.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-block/fio/fio-2.0.14-r1.ebuild,v 1.1 2013/03/27 01:59:26 robbat2 Exp $ + +EAPI="4" + +inherit toolchain-funcs flag-o-matic + +MY_PV="${PV/_rc/-rc}" +MY_P="${PN}-${MY_PV}" + +DESCRIPTION="Jens Axboe's Flexible IO tester" +HOMEPAGE="http://brick.kernel.dk/snaps/" +SRC_URI="http://brick.kernel.dk/snaps/${MY_P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~x86" +IUSE="" + +DEPEND="dev-libs/libaio" +RDEPEND="${DEPEND}" + +S="${WORKDIR}/${MY_P}" + +src_prepare() { + sed -i \ + -e '/filter /s:-o:$(LDFLAGS) -o:' \ + -e '/: depend$/d' \ + -e '/^DEBUGFLAGS/s, -D_FORTIFY_SOURCE=2,,g' \ + Makefile || die + epatch "$FILESDIR"/fio-2.0.14-pic-clobber-fix.patch +} + +src_configure() { + : # not a real configure script + ./configure --extra-cflags="${CFLAGS}" --cc="$(tc-getCC)" +} + +src_compile() { + append-flags -W + emake V=1 +} + +src_install() { + emake install DESTDIR="${D}" prefix="/usr" mandir="/usr/share/man" + dodoc README REPORTING-BUGS HOWTO + docinto examples + dodoc examples/* + doman fio.1 +} |