diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2012-12-01 17:51:26 +0000 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2012-12-01 17:51:26 +0000 |
commit | 9fc57c73f5567fb648ec0d8281f38f9d2a142a9e (patch) | |
tree | cee318c0992a0edf72c950c5928207a64e7a7232 /app-benchmarks/ramspeed | |
parent | sparc stable wrt #437832 (diff) | |
download | gentoo-2-9fc57c73f5567fb648ec0d8281f38f9d2a142a9e.tar.gz gentoo-2-9fc57c73f5567fb648ec0d8281f38f9d2a142a9e.tar.bz2 gentoo-2-9fc57c73f5567fb648ec0d8281f38f9d2a142a9e.zip |
Fix to build on hardened/PIE, but #442778
(Portage version: 2.1.11.31/cvs/Linux x86_64, signed Manifest commit with key 0xF52D4BBA)
Diffstat (limited to 'app-benchmarks/ramspeed')
-rw-r--r-- | app-benchmarks/ramspeed/ChangeLog | 12 | ||||
-rw-r--r-- | app-benchmarks/ramspeed/metadata.xml | 4 | ||||
-rw-r--r-- | app-benchmarks/ramspeed/ramspeed-2.6.0.ebuild | 11 | ||||
-rw-r--r-- | app-benchmarks/ramspeed/ramspeed-3.5.0-r1.ebuild | 67 | ||||
-rw-r--r-- | app-benchmarks/ramspeed/ramspeed-3.5.0.ebuild | 11 |
5 files changed, 95 insertions, 10 deletions
diff --git a/app-benchmarks/ramspeed/ChangeLog b/app-benchmarks/ramspeed/ChangeLog index c48a705c59a0..fbd02268778b 100644 --- a/app-benchmarks/ramspeed/ChangeLog +++ b/app-benchmarks/ramspeed/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for app-benchmarks/ramspeed -# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-benchmarks/ramspeed/ChangeLog,v 1.5 2011/10/22 18:59:34 patrick Exp $ +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/app-benchmarks/ramspeed/ChangeLog,v 1.6 2012/12/01 17:51:26 blueness Exp $ + +*ramspeed-3.5.0-r1 (01 Dec 2012) + + 01 Dec 2012; Anthony G. Basile <blueness@gentoo.org> + +ramspeed-3.5.0-r1.ebuild, metadata.xml, ramspeed-2.6.0.ebuild, + ramspeed-3.5.0.ebuild: + Fix to build on hardened/PIE, but #442778 *ramspeed-3.5.0 (22 Oct 2011) @@ -23,4 +30,3 @@ +metadata.xml: Moved from sunrise overlay. Fixes bug #304101. Thanks to Dane Smith <smithdanea@gmail.com> for the ebuild. He will proxy-maintain this one - diff --git a/app-benchmarks/ramspeed/metadata.xml b/app-benchmarks/ramspeed/metadata.xml index c2d0fa277895..275b4ba95e15 100644 --- a/app-benchmarks/ramspeed/metadata.xml +++ b/app-benchmarks/ramspeed/metadata.xml @@ -7,5 +7,7 @@ </maintainer> <longdescription lang="en"> </longdescription> + <use> + <flag name='pic'>Force shared libraries to be built as PIC (this is slower)</flag> + </use> </pkgmetadata> - diff --git a/app-benchmarks/ramspeed/ramspeed-2.6.0.ebuild b/app-benchmarks/ramspeed/ramspeed-2.6.0.ebuild index b558819c6c98..3e1f6bcec990 100644 --- a/app-benchmarks/ramspeed/ramspeed-2.6.0.ebuild +++ b/app-benchmarks/ramspeed/ramspeed-2.6.0.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2010 Gentoo Foundation +# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-benchmarks/ramspeed/ramspeed-2.6.0.ebuild,v 1.3 2010/08/27 23:32:42 hwoarang Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-benchmarks/ramspeed/ramspeed-2.6.0.ebuild,v 1.4 2012/12/01 17:51:26 blueness Exp $ EAPI=2 inherit flag-o-matic toolchain-funcs @@ -12,7 +12,7 @@ SRC_URI="http://www.alasir.com/software/${PN}/${P}.tar.gz" LICENSE="Alasir" SLOT="0" KEYWORDS="amd64 x86" -IUSE="sse" +IUSE="sse pic" src_prepare(){ tc-export CC AS @@ -29,6 +29,11 @@ src_configure(){ append-ldflags -Wl,-z,noexecstack obj=( ramspeed.o ${arch_prefix}{fltmark,fltmem,intmark,intmem}.o ) + #avoid pic unfriendly assembly, bug #442778 + if use pic; then + append-ldflags -nopie + fi + if use x86; then obj=( "${obj[@]}" ${arch_prefix}{cpuinfo/cpuinfo_main,cpuinfo/cpuinfo_ext}.o ) fi diff --git a/app-benchmarks/ramspeed/ramspeed-3.5.0-r1.ebuild b/app-benchmarks/ramspeed/ramspeed-3.5.0-r1.ebuild new file mode 100644 index 000000000000..dfe668516430 --- /dev/null +++ b/app-benchmarks/ramspeed/ramspeed-3.5.0-r1.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-benchmarks/ramspeed/ramspeed-3.5.0-r1.ebuild,v 1.1 2012/12/01 17:51:26 blueness Exp $ + +EAPI="4" +inherit flag-o-matic toolchain-funcs + +MY_PN="ramsmp" +MY_P=${MY_PN}-${PV} + +DESCRIPTION="Benchmarking for memory and cache" +HOMEPAGE="http://www.alasir.com/software/ramspeed/" +SRC_URI="http://www.alasir.com/software/${PN}/${MY_P}.tar.gz" + +LICENSE="Alasir" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="sse pic" + +src_prepare(){ + tc-export CC AS + + # Deal with changed package name and file name + mv ${MY_P} ${P} +} + +src_configure(){ + local obj + local arch_prefix=./ + + use x86 && arch_prefix=i386/ + use amd64 && arch_prefix=amd64/ + + #fix the stack + append-ldflags -Wl,-z,noexecstack + obj=( ramsmp.o ${arch_prefix}{fltmark,fltmem,intmark,intmem}.o ) + + if use pic; then + append-ldflags -nopie + fi + + if use amd64; then + sed -i \ + -e 's/call.*free/call\tfree@PLT/' \ + -e 's/call.*gettimeofday/call\tgettimeofday@PLT/' \ + -e 's/call.*malloc/call\tmalloc@PLT/' \ + ${arch_prefix}/*.s + fi + + if use x86; then + obj=( "${obj[@]}" ${arch_prefix}{cpuinfo/cpuinfo_main,cpuinfo/cpuinfo_ext}.o ) + fi + + if use sse; then + use x86 && append-flags "-DLINUX -DI386_ASM" + use amd64 && append-flags "-DLINUX -DAMD64_ASM" + obj=( "${obj[@]}" ${arch_prefix}{mmxmark,mmxmem,ssemark,ssemem}.o ) + fi + + echo "ramsmp: ${obj[@]}" > Makefile +} + +src_install(){ + dobin ramsmp + dosym /usr/bin/ramsmp /usr/bin/ramspeed + dodoc HISTORY README +} diff --git a/app-benchmarks/ramspeed/ramspeed-3.5.0.ebuild b/app-benchmarks/ramspeed/ramspeed-3.5.0.ebuild index 53ce7b8c1244..523c5e37d07a 100644 --- a/app-benchmarks/ramspeed/ramspeed-3.5.0.ebuild +++ b/app-benchmarks/ramspeed/ramspeed-3.5.0.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2011 Gentoo Foundation +# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-benchmarks/ramspeed/ramspeed-3.5.0.ebuild,v 1.1 2011/10/22 18:59:34 patrick Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-benchmarks/ramspeed/ramspeed-3.5.0.ebuild,v 1.2 2012/12/01 17:51:26 blueness Exp $ EAPI=2 inherit flag-o-matic toolchain-funcs @@ -15,7 +15,7 @@ SRC_URI="http://www.alasir.com/software/${PN}/${MY_P}.tar.gz" LICENSE="Alasir" SLOT="0" KEYWORDS="~amd64 ~x86" -IUSE="sse" +IUSE="sse pic" src_prepare(){ tc-export CC AS @@ -35,6 +35,11 @@ src_configure(){ append-ldflags -Wl,-z,noexecstack obj=( ramsmp.o ${arch_prefix}{fltmark,fltmem,intmark,intmem}.o ) + #avoid pic unfriendly assembly, bug #442778 + if use pic; then + append-ldflags -nopie + fi + if use x86; then obj=( "${obj[@]}" ${arch_prefix}{cpuinfo/cpuinfo_main,cpuinfo/cpuinfo_ext}.o ) fi |