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 B0B27138330 for ; Tue, 4 Oct 2016 15:40:59 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8D199E0C14; Tue, 4 Oct 2016 15:40:55 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 5F5ABE0C14 for ; Tue, 4 Oct 2016 15:40:55 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 346FF340F98 for ; Tue, 4 Oct 2016 15:40:54 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 39478248A for ; Tue, 4 Oct 2016 15:40:52 +0000 (UTC) From: "Alexis Ballier" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Alexis Ballier" Message-ID: <1475595643.c85538388f2e1ed476edd2917618fead3578b5d5.aballier@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/crypto++/, dev-libs/crypto++/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-libs/crypto++/crypto++-5.6.4-r1.ebuild dev-libs/crypto++/crypto++-5.6.4.ebuild dev-libs/crypto++/files/crypto++-5.6.4-nonative.patch X-VCS-Directories: dev-libs/crypto++/ dev-libs/crypto++/files/ X-VCS-Committer: aballier X-VCS-Committer-Name: Alexis Ballier X-VCS-Revision: c85538388f2e1ed476edd2917618fead3578b5d5 X-VCS-Branch: master Date: Tue, 4 Oct 2016 15:40:52 +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-Archives-Salt: c1bf3a79-21e7-4c86-8016-ee5e85f8df05 X-Archives-Hash: 1b6e7f9bec0f3129a6b30dc1ccb59785 commit: c85538388f2e1ed476edd2917618fead3578b5d5 Author: Alexis Ballier gentoo org> AuthorDate: Tue Oct 4 15:40:31 2016 +0000 Commit: Alexis Ballier gentoo org> CommitDate: Tue Oct 4 15:40:43 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c8553838 dev-libs/crypto++: Drop forced usage of march=native. This completely breaks for my usecases where I build binary packages for older CPUs. Package-Manager: portage-2.3.1 ...pto++-5.6.4.ebuild => crypto++-5.6.4-r1.ebuild} | 4 ++++ .../crypto++/files/crypto++-5.6.4-nonative.patch | 28 ++++++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/dev-libs/crypto++/crypto++-5.6.4.ebuild b/dev-libs/crypto++/crypto++-5.6.4-r1.ebuild similarity index 93% rename from dev-libs/crypto++/crypto++-5.6.4.ebuild rename to dev-libs/crypto++/crypto++-5.6.4-r1.ebuild index c632e00..6444560 100644 --- a/dev-libs/crypto++/crypto++-5.6.4.ebuild +++ b/dev-libs/crypto++/crypto++-5.6.4-r1.ebuild @@ -18,6 +18,10 @@ IUSE="static-libs" DEPEND="app-arch/unzip" S="${WORKDIR}" +PATCHES=( + # Building with -march=native breaks when one wants to build for older CPUs. + "${FILESDIR}/${P}-nonative.patch" +) src_configure() { cp config.recommend config.h || die diff --git a/dev-libs/crypto++/files/crypto++-5.6.4-nonative.patch b/dev-libs/crypto++/files/crypto++-5.6.4-nonative.patch new file mode 100644 index 00000000..77d74ee --- /dev/null +++ b/dev-libs/crypto++/files/crypto++-5.6.4-nonative.patch @@ -0,0 +1,28 @@ +Index: work/GNUmakefile +=================================================================== +--- work.orig/GNUmakefile ++++ work/GNUmakefile +@@ -125,23 +125,6 @@ ifeq ($(IS_X86)$(IS_X32)$(IS_CYGWIN)$(IS + endif + endif + +-# Guard use of -march=native +-ifeq ($(GCC42_OR_LATER)$(IS_NETBSD),10) +- CXXFLAGS += -march=native +-else ifneq ($(CLANG_COMPILER)$(INTEL_COMPILER),00) +- CXXFLAGS += -march=native +-else +- # GCC 3.3 and "unknown option -march=" +- # Ubuntu GCC 4.1 compiler crash with -march=native +- # NetBSD GCC 4.8 compiler and "bad value (native) for -march= switch" +- # Sun compiler is handled below +- ifeq ($(SUN_COMPILER)$(IS_X64),01) +- CXXFLAGS += -m64 +- else ifeq ($(SUN_COMPILER)$(IS_X86),01) +- CXXFLAGS += -m32 +- endif # X86/X32/X64 +-endif +- + # Aligned access required for -O3 and above due to vectorization + UNALIGNED_ACCESS := $(shell $(EGREP) -c "^[[:space:]]*//[[:space:]]*\#[[:space:]]*define[[:space:]]*CRYPTOPP_NO_UNALIGNED_DATA_ACCESS" config.h) + ifneq ($(UNALIGNED_ACCESS),0)