From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 47927138359 for ; Wed, 2 Sep 2020 12:39:33 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 75538E0951; Wed, 2 Sep 2020 12:39:32 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 5D117E0951 for ; Wed, 2 Sep 2020 12:39:32 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E3774340E7D for ; Wed, 2 Sep 2020 12:39:30 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 4C94D33D for ; Wed, 2 Sep 2020 12:39:29 +0000 (UTC) From: "Conrad Kostecki" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Conrad Kostecki" Message-ID: <1599050297.285d1df0bf8f3e4208def7b36974e72b9b929f7e.conikost@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-benchmarks/stress-ng/files/, app-benchmarks/stress-ng/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-benchmarks/stress-ng/files/stress-ng-0.11.19-optimization-checks.patch app-benchmarks/stress-ng/stress-ng-0.11.19.ebuild X-VCS-Directories: app-benchmarks/stress-ng/files/ app-benchmarks/stress-ng/ X-VCS-Committer: conikost X-VCS-Committer-Name: Conrad Kostecki X-VCS-Revision: 285d1df0bf8f3e4208def7b36974e72b9b929f7e X-VCS-Branch: master Date: Wed, 2 Sep 2020 12:39:29 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: f1f5bb0e-ace6-4972-85b5-1dc80bc24794 X-Archives-Hash: b61190658b80be84a1a99becf34a1d7b commit: 285d1df0bf8f3e4208def7b36974e72b9b929f7e Author: Conrad Kostecki gentoo org> AuthorDate: Wed Sep 2 12:38:17 2020 +0000 Commit: Conrad Kostecki gentoo org> CommitDate: Wed Sep 2 12:38:17 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=285d1df0 app-benchmarks/stress-ng: fix compilation due optimization Closes: https://bugs.gentoo.org/739830 Package-Manager: Portage-3.0.4, Repoman-3.0.1 Signed-off-by: Conrad Kostecki gentoo.org> .../stress-ng-0.11.19-optimization-checks.patch | 87 ++++++++++++++++++++++ app-benchmarks/stress-ng/stress-ng-0.11.19.ebuild | 5 +- 2 files changed, 91 insertions(+), 1 deletion(-) diff --git a/app-benchmarks/stress-ng/files/stress-ng-0.11.19-optimization-checks.patch b/app-benchmarks/stress-ng/files/stress-ng-0.11.19-optimization-checks.patch new file mode 100644 index 00000000000..18bd02ae9d5 --- /dev/null +++ b/app-benchmarks/stress-ng/files/stress-ng-0.11.19-optimization-checks.patch @@ -0,0 +1,87 @@ +From 70acc386b6afb726d4576a3d4368b51114e92530 Mon Sep 17 00:00:00 2001 +From: Colin Ian King +Date: Tue, 1 Sep 2020 12:54:19 +0100 +Subject: [PATCH] stress-ng.h: build in target clone types if gcc supports the + feature + +Add in more build time optimization checks, try to build smarter with +various gcc compatibility support checks. + +Signed-off-by: Colin Ian King +--- + stress-ng.h | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++- + 1 file changed, 61 insertions(+), 1 deletion(-) + +diff --git a/stress-ng.h b/stress-ng.h +index 3803bc71..6ce7d72e 100644 +--- a/stress-ng.h ++++ b/stress-ng.h +@@ -1686,7 +1686,67 @@ extern void pr_dbg_lock(bool *locked, const char *fmt, ...) FORMAT(printf, 2, 3 + + /* GCC5.0+ target_clones attribute */ + #if defined(HAVE_TARGET_CLONES) && defined(STRESS_ARCH_X86) +-#define TARGET_CLONES __attribute__((target_clones("mmx","sse","sse2","ssse3", "sse4.1", "sse4a", "avx", "avx2", "arch=skylake-avx512", "default"))) ++#if defined(__MMX_WITH_SSE__) ++#define TARGET_CLONE_MMX "mmx", ++#else ++#define TARGET_CLONE_MMX ++#endif ++ ++#if defined(__AVX__) ++#define TARGET_CLONE_AVX "avx", ++#else ++#define TARGET_CLONE_AVX ++#endif ++ ++#if defined(__AVX2__) ++#define TARGET_CLONE_AVX2 "avx2", ++#else ++#define TARGET_CLONE_AVX2 ++#endif ++ ++#if defined(__SSE__) ++#define TARGET_CLONE_SSE "sse", ++#else ++#define TARGET_CLONE_SSE ++#endif ++ ++#if defined(__SSE2__) ++#define TARGET_CLONE_SSE2 "sse2", ++#else ++#define TARGET_CLONE_SSE2 ++#endif ++ ++#if defined(__SSE3__) ++#define TARGET_CLONE_SSE3 "sse3", ++#else ++#define TARGET_CLONE_SSE3 ++#endif ++ ++#if defined(__SSSE3__) ++#define TARGET_CLONE_SSSE3 "ssse3", ++#else ++#define TARGET_CLONE_SSSE3 ++#endif ++ ++#if defined(__SSE4_1__) ++#define TARGET_CLONE_SSE4_1 "sse4.1", ++#else ++#define TARGET_CLONE_SSE4_1 ++#endif ++ ++#if defined(__SSE4_2__) ++#define TARGET_CLONE_SSE4_2 "sse4.2", ++#else ++#define TARGET_CLONE_SSE4_2 ++#endif ++ ++#if defined(__AVX512F__) ++#define TARGET_CLONE_SKYLAKE_AVX512 "arch=skylake-avx512", ++#else ++#define TARGET_CLONE_SKYLAKE_AVX512 ++#endif ++ ++#define TARGET_CLONES __attribute__((target_clones(TARGET_CLONE_AVX TARGET_CLONE_AVX2 TARGET_CLONE_MMX TARGET_CLONE_SSE TARGET_CLONE_SSE2 TARGET_CLONE_SSE3 TARGET_CLONE_SSSE3 TARGET_CLONE_SSE4_1 TARGET_CLONE_SSE4_2 TARGET_CLONE_SKYLAKE_AVX512 "default"))) + #elif defined(HAVE_TARGET_CLONES) && defined(STRESS_ARCH_PPC64) + #define TARGET_CLONES __attribute__((target_clones("cpu=power9,default"))) + #else diff --git a/app-benchmarks/stress-ng/stress-ng-0.11.19.ebuild b/app-benchmarks/stress-ng/stress-ng-0.11.19.ebuild index 4c88cc73a96..cadf668aef4 100644 --- a/app-benchmarks/stress-ng/stress-ng-0.11.19.ebuild +++ b/app-benchmarks/stress-ng/stress-ng-0.11.19.ebuild @@ -27,7 +27,10 @@ RDEPEND="${DEPEND}" DOCS=( "README" "README.Android" "TODO" "syscalls.txt" ) -PATCHES=( "${FILESDIR}/${PN}-0.11.17-makefile.patch" ) +PATCHES=( + "${FILESDIR}/${PN}-0.11.17-makefile.patch" + "${FILESDIR}/${PN}-0.11.19-optimization-checks.patch" +) src_compile() { tc-export CC