diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
commit | 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch) | |
tree | 7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /app-benchmarks/ramspeed/ramspeed-3.5.0-r2.ebuild | |
parent | 30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff) |
gentoo resync : 14.07.2018
Diffstat (limited to 'app-benchmarks/ramspeed/ramspeed-3.5.0-r2.ebuild')
-rw-r--r-- | app-benchmarks/ramspeed/ramspeed-3.5.0-r2.ebuild | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/app-benchmarks/ramspeed/ramspeed-3.5.0-r2.ebuild b/app-benchmarks/ramspeed/ramspeed-3.5.0-r2.ebuild new file mode 100644 index 000000000000..cf2ff261ad0b --- /dev/null +++ b/app-benchmarks/ramspeed/ramspeed-3.5.0-r2.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +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="cpu_flags_x86_sse pic" + +S="${WORKDIR}/${MY_P}" + +src_configure(){ + local obj + local arch_prefix=./ + + use x86 && arch_prefix=i386/ + use amd64 && arch_prefix=amd64/ + + tc-export CC AS + + #fix the stack + append-ldflags -Wl,-z,noexecstack + obj=( ramsmp.o ${arch_prefix}{fltmark,fltmem,intmark,intmem}.o ) + + use pic && append-ldflags -nopie + + 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 || die + fi + + use x86 && obj+=( ${arch_prefix}{cpuinfo/cpuinfo_main,cpuinfo/cpuinfo_ext}.o ) + + if use cpu_flags_x86_sse; then + use x86 && append-flags "-DLINUX -DI386_ASM" + use amd64 && append-flags "-DLINUX -DAMD64_ASM" + obj+=( ${arch_prefix}{mmxmark,mmxmem,ssemark,ssemem}.o ) + fi + + echo "ramsmp: ${obj[@]}" > Makefile +} + +src_install(){ + dobin ramsmp + dosym ramsmp /usr/bin/ramspeed + dodoc HISTORY README +} |