diff options
author | Michał Górny <mgorny@gentoo.org> | 2015-10-14 23:06:52 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2015-10-14 23:07:53 +0200 |
commit | 173c390663b03eb0201d5875469fa3e50ed4a75a (patch) | |
tree | 975149bb89386863a438b43fd141286a0157a801 | |
parent | app-office/homebank: update Manifest (diff) | |
parent | media-libs/x265: Fix x32 build, bug #510890 (diff) | |
download | gentoo-173c390663b03eb0201d5875469fa3e50ed4a75a.tar.gz gentoo-173c390663b03eb0201d5875469fa3e50ed4a75a.tar.bz2 gentoo-173c390663b03eb0201d5875469fa3e50ed4a75a.zip |
media-libs/x265: Merge x32 build fix by bjacquin
Pull-Request: https://github.com/gentoo/gentoo/pull/173
-rw-r--r-- | media-libs/x265/files/1.8-build-Disable-march-selection-from-CMakeLists.txt.patch | 35 | ||||
-rw-r--r-- | media-libs/x265/x265-1.8.ebuild | 9 | ||||
-rw-r--r-- | 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 000000000000..33ee254661cf --- /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 <bertrand@jacquin.bzh> +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 ee4a32fe9fae..8138afcc4b0e 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 8a3e36f86b72..5b0348cfe2a3 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 |