From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 3E9DD13888F for ; Wed, 14 Oct 2015 21:08:15 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B7F09E07A0; Wed, 14 Oct 2015 21:08:13 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 35CC0E07A0 for ; Wed, 14 Oct 2015 21:08:08 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id DEF4D340A84 for ; Wed, 14 Oct 2015 21:08:06 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 69366922 for ; Wed, 14 Oct 2015 21:08:04 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1444778779.5658f1dc7a9c128630e2c4b0b843ecfd14cbf592.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/x265/files/, media-libs/x265/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-libs/x265/files/1.8-build-Disable-march-selection-from-CMakeLists.txt.patch media-libs/x265/x265-1.8.ebuild media-libs/x265/x265-9999.ebuild X-VCS-Directories: media-libs/x265/ media-libs/x265/files/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 5658f1dc7a9c128630e2c4b0b843ecfd14cbf592 X-VCS-Branch: master Date: Wed, 14 Oct 2015 21:08:04 +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: f627cba2-179e-415b-8eff-a7755110a6cb X-Archives-Hash: faf7cb3c4a9229e6dbdd98e867e6974d commit: 5658f1dc7a9c128630e2c4b0b843ecfd14cbf592 Author: Bertrand Jacquin jacquin bzh> AuthorDate: Mon Jul 28 18:12:43 2014 +0000 Commit: Michał Górny gentoo org> CommitDate: Tue Oct 13 23:26:19 2015 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5658f1dc media-libs/x265: Fix x32 build, bug #510890 x32 arch as defined on https://sites.google.com/site/x32abi is neither X86 nor X64, then forcing -march=i686 leads to build failure as wrong -march is used. Forcing -march, -mfloat-abi and -mfpu for ARM is also wrong As a global sanity sake, disable all forced -march in CMakeLists Upstream report: https://bitbucket.org/multicoreware/x265/pull-requests/21/build-disable-march-selection-from/diff Package-Manager: portage-2.2.20.1 ...sable-march-selection-from-CMakeLists.txt.patch | 35 ++++++++++++++++++++++ media-libs/x265/x265-1.8.ebuild | 9 +++++- media-libs/x265/x265-9999.ebuild | 5 +++- 3 files changed, 47 insertions(+), 2 deletions(-) diff --git a/media-libs/x265/files/1.8-build-Disable-march-selection-from-CMakeLists.txt.patch b/media-libs/x265/files/1.8-build-Disable-march-selection-from-CMakeLists.txt.patch new file mode 100644 index 0000000..33ee254 --- /dev/null +++ b/media-libs/x265/files/1.8-build-Disable-march-selection-from-CMakeLists.txt.patch @@ -0,0 +1,35 @@ +From e89069148db716d30fb81c798d0cfd83250a9f5a Mon Sep 17 00:00:00 2001 +From: Bertrand Jacquin +Date: Sat, 10 Oct 2015 00:05:41 +0100 +Subject: [PATCH] build: Disable -march selection from CMakeLists.txt + +x32 arch as defined on https://sites.google.com/site/x32abi is neither +X86 nor X64, then forcing -march=i686 leads to build failure as wrong +-march is used. + +Forcing -march, -mfloat-abi and -mfpu for ARM is also wrong + +As a global sanity sake, disable all forced -march in CMakeLists +--- + source/CMakeLists.txt | 7 ------- + 1 file changed, 7 deletions(-) + +diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt +index 764d5f2..fbc0d49 100644 +--- a/source/CMakeLists.txt ++++ b/source/CMakeLists.txt +@@ -167,14 +167,7 @@ if(GCC) + if(NATIVE_BUILD) + if(INTEL_CXX) + add_definitions(-xhost) +- else() +- add_definitions(-march=native) + endif() +- elseif(X86 AND NOT X64) +- add_definitions(-march=i686) +- endif() +- if(ARM) +- add_definitions(-march=armv6 -mfloat-abi=hard -mfpu=vfp) + endif() + if(FPROFILE_GENERATE) + if(INTEL_CXX) diff --git a/media-libs/x265/x265-1.8.ebuild b/media-libs/x265/x265-1.8.ebuild index ee4a32f..8138afc 100644 --- a/media-libs/x265/x265-1.8.ebuild +++ b/media-libs/x265/x265-1.8.ebuild @@ -41,6 +41,10 @@ src_unpack() { fi } +src_prepare() { + epatch "${FILESDIR}/${PV}-build-Disable-march-selection-from-CMakeLists.txt.patch" # bug #510890 +} + multilib_src_configure() { append-cflags -fPIC append-cxxflags -fPIC @@ -51,9 +55,12 @@ multilib_src_configure() { -DLIB_INSTALL_DIR="$(get_libdir)" ) - if [ "${ABI}" = x86 ] ; then + if [[ ${ABI} = x86 ]] ; then use 10bit && ewarn "Disabling 10bit support on x86 as it does not build (or requires to disable assembly optimizations)" mycmakeargs+=( -DHIGH_BIT_DEPTH=OFF ) + elif [[ ${ABI} = x32 ]] ; then + # bug #510890 + mycmakeargs+=( -DENABLE_ASSEMBLY=OFF ) fi cmake-utils_src_configure diff --git a/media-libs/x265/x265-9999.ebuild b/media-libs/x265/x265-9999.ebuild index 8a3e36f..5b0348c 100644 --- a/media-libs/x265/x265-9999.ebuild +++ b/media-libs/x265/x265-9999.ebuild @@ -51,9 +51,12 @@ multilib_src_configure() { -DLIB_INSTALL_DIR="$(get_libdir)" ) - if [ "${ABI}" = x86 ] ; then + if [[ ${ABI} = x86 ]] ; then use 10bit && ewarn "Disabling 10bit support on x86 as it does not build (or requires to disable assembly optimizations)" mycmakeargs+=( -DHIGH_BIT_DEPTH=OFF ) + elif [[ ${ABI} = x32 ]] ; then + # bug #510890 + mycmakeargs+=( -DENABLE_ASSEMBLY=OFF ) fi cmake-utils_src_configure