diff --git a/sdk_container/src/third_party/portage-stable/dev-util/stressapptest/files/stressapptest-1.0.4-cpuid-pic.patch b/sdk_container/src/third_party/portage-stable/dev-util/stressapptest/files/stressapptest-1.0.4-cpuid-pic.patch new file mode 100644 index 0000000000..740349bc6f --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-util/stressapptest/files/stressapptest-1.0.4-cpuid-pic.patch @@ -0,0 +1,43 @@ +http://code.google.com/p/stressapptest/issues/detail?id=26 + +--- a/src/os.cc ++++ b/src/os.cc +@@ -149,7 +149,16 @@ void OsLayer::GetFeatures() { + // http://www.sandpile.org/ia32/cpuid.htm + int ax, bx, cx, dx; + __asm__ __volatile__ ( +- "cpuid": "=a" (ax), "=b" (bx), "=c" (cx), "=d" (dx) : "a" (1)); ++# if defined(STRESSAPPTEST_CPU_I686) && defined(__PIC__) ++ "xchg %%ebx, %%esi;" ++ "cpuid;" ++ "xchg %%esi, %%ebx;" ++ : "=S" (bx), ++# else ++ "cpuid;" ++ : "=b" (bx), ++# endif ++ "=a" (ax), "=c" (cx), "=d" (dx) : "a" (1)); + has_clflush_ = (dx >> 19) & 1; + has_sse2_ = (dx >> 26) & 1; + +--- a/src/worker.cc ++++ b/src/worker.cc +@@ -85,7 +85,17 @@ namespace { + inline int apicid(void) { + int cpu; + #if defined(STRESSAPPTEST_CPU_X86_64) || defined(STRESSAPPTEST_CPU_I686) +- __asm __volatile("cpuid" : "=b" (cpu) : "a" (1) : "cx", "dx"); ++ __asm__ __volatile__ ( ++# if defined(STRESSAPPTEST_CPU_I686) && defined(__PIC__) ++ "xchg %%ebx, %%esi;" ++ "cpuid;" ++ "xchg %%esi, %%ebx;" ++ : "=S" (cpu) ++# else ++ "cpuid;" ++ : "=b" (cpu) ++# endif ++ : "a" (1) : "cx", "dx"); + #elif defined(STRESSAPPTEST_CPU_ARMV7A) + #warning "Unsupported CPU type ARMV7A: unable to determine core ID." + cpu = 0; diff --git a/sdk_container/src/third_party/portage-stable/dev-util/stressapptest/stressapptest-1.0.4.ebuild b/sdk_container/src/third_party/portage-stable/dev-util/stressapptest/stressapptest-1.0.4.ebuild index 5aecd250e7..35112539c7 100644 --- a/sdk_container/src/third_party/portage-stable/dev-util/stressapptest/stressapptest-1.0.4.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-util/stressapptest/stressapptest-1.0.4.ebuild @@ -1,9 +1,11 @@ -# Copyright 1999-2012 Gentoo Foundation +# Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-util/stressapptest/stressapptest-1.0.4.ebuild,v 1.2 2012/11/27 06:54:01 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-util/stressapptest/stressapptest-1.0.4.ebuild,v 1.4 2013/01/05 04:35:30 vapier Exp $ EAPI="4" +inherit eutils + MY_P="${P}_autoconf" DESCRIPTION="Stressful Application Test" HOMEPAGE="http://code.google.com/p/stressapptest/" @@ -11,7 +13,7 @@ SRC_URI="http://stressapptest.googlecode.com/files/${MY_P}.tar.gz" LICENSE="Apache-2.0" SLOT="0" -KEYWORDS="amd64 x86 arm" +KEYWORDS="amd64 arm x86" IUSE="debug" RDEPEND="dev-libs/libaio" @@ -20,6 +22,7 @@ DEPEND="${RDEPEND}" S="${WORKDIR}/${MY_P}" src_prepare() { + epatch "${FILESDIR}"/${P}-cpuid-pic.patch sed -i \ '/CXXFLAGS/s:-O3 -funroll-all-loops -funroll-loops::' \ configure || die diff --git a/sdk_container/src/third_party/portage-stable/metadata/md5-cache/dev-util/stressapptest-1.0.4 b/sdk_container/src/third_party/portage-stable/metadata/md5-cache/dev-util/stressapptest-1.0.4 index e73bf1036d..3812b9b07e 100644 --- a/sdk_container/src/third_party/portage-stable/metadata/md5-cache/dev-util/stressapptest-1.0.4 +++ b/sdk_container/src/third_party/portage-stable/metadata/md5-cache/dev-util/stressapptest-1.0.4 @@ -4,9 +4,10 @@ DESCRIPTION=Stressful Application Test EAPI=4 HOMEPAGE=http://code.google.com/p/stressapptest/ IUSE=debug -KEYWORDS=amd64 x86 arm +KEYWORDS=amd64 ~arm ~x86 LICENSE=Apache-2.0 RDEPEND=dev-libs/libaio SLOT=0 SRC_URI=http://stressapptest.googlecode.com/files/stressapptest-1.0.4_autoconf.tar.gz -_md5_=9e3133bf4f780a1dac0d4e29ca889b7a +_eclasses_=eutils 33ef77a15337022e05342d2c772a7a5a multilib 5f4ad6cf85e365e8f0c6050ddd21659e portability 0be430f759a631e692678ed796e09f5c toolchain-funcs 6526ac6fc9aedf391efb91fcd75ace68 user 9e552f935106ff0bc92af16da64b4b29 +_md5_=90f1ff23792866d05cec886262dc29da