Fix build on arm

el8
Nicolas Chauvet 7 years ago
parent ecc0e1cf46
commit 00c7d180d2

@ -0,0 +1,60 @@
diff -up x265_2.7/source/CMakeLists.txt.cflags x265_2.7/source/CMakeLists.txt
--- x265_2.7/source/CMakeLists.txt.cflags 2018-02-27 20:19:33.328932385 +0100
+++ x265_2.7/source/CMakeLists.txt 2018-02-27 20:29:14.808956583 +0100
@@ -233,18 +233,6 @@ if(GCC)
endif()
endif()
endif()
- if(ARM AND CROSS_COMPILE_ARM)
- set(ARM_ARGS -march=armv6 -mfloat-abi=soft -mfpu=vfp -marm -fPIC)
- elseif(ARM)
- find_package(Neon)
- if(CPU_HAS_NEON)
- set(ARM_ARGS -mcpu=native -mfloat-abi=hard -mfpu=neon -marm -fPIC)
- add_definitions(-DHAVE_NEON)
- else()
- set(ARM_ARGS -mcpu=native -mfloat-abi=hard -mfpu=vfp -marm)
- endif()
- endif()
- add_definitions(${ARM_ARGS})
if(FPROFILE_GENERATE)
if(INTEL_CXX)
add_definitions(-prof-gen -prof-dir="${CMAKE_CURRENT_BINARY_DIR}")
@@ -517,7 +505,7 @@ if((MSVC_IDE OR XCODE OR GCC) AND ENABLE
add_custom_command(
OUTPUT ${ASM}.${SUFFIX}
COMMAND ${CMAKE_CXX_COMPILER}
- ARGS ${ARM_ARGS} -c ${ASM_SRC} -o ${ASM}.${SUFFIX}
+ ARGS ${CFLAGS} -c ${ASM_SRC} -o ${ASM}.${SUFFIX}
DEPENDS ${ASM_SRC})
endforeach()
elseif(X86)
diff -up x265_2.7/source/dynamicHDR10/CMakeLists.txt.cflags x265_2.7/source/dynamicHDR10/CMakeLists.txt
--- x265_2.7/source/dynamicHDR10/CMakeLists.txt.cflags 2018-02-21 09:55:56.000000000 +0100
+++ x265_2.7/source/dynamicHDR10/CMakeLists.txt 2018-02-27 20:29:45.377062994 +0100
@@ -42,18 +42,6 @@ if(GCC)
endif()
endif()
endif()
- if(ARM AND CROSS_COMPILE_ARM)
- set(ARM_ARGS -march=armv6 -mfloat-abi=soft -mfpu=vfp -marm -fPIC)
- elseif(ARM)
- find_package(Neon)
- if(CPU_HAS_NEON)
- set(ARM_ARGS -mcpu=native -mfloat-abi=hard -mfpu=neon -marm -fPIC)
- add_definitions(-DHAVE_NEON)
- else()
- set(ARM_ARGS -mcpu=native -mfloat-abi=hard -mfpu=vfp -marm)
- endif()
- endif()
- add_definitions(${ARM_ARGS})
if(FPROFILE_GENERATE)
if(INTEL_CXX)
add_definitions(-prof-gen -prof-dir="${CMAKE_CURRENT_BINARY_DIR}")
@@ -150,4 +138,4 @@ set(BIN_INSTALL_DIR bin CACHE STRING "In
option(ENABLE_SHARED "Build shared library" OFF)
install(FILES hdr10plus.h DESTINATION include)
-endif()
\ Pas de fin de ligne à la fin du fichier
+endif()

@ -3,7 +3,7 @@
Summary: H.265/HEVC encoder
Name: x265
Version: 2.7
Release: 1%{?dist}
Release: 2%{?dist}
URL: http://x265.org/
# source/Lib/TLibCommon - BSD
# source/Lib/TLibEncoder - BSD
@ -16,6 +16,7 @@ Source0: https://bitbucket.org/multicoreware/%{name}/downloads/%{name}_%{vers
Patch0: x265-pic.patch
Patch1: x265-high-bit-depth-soname.patch
Patch2: x265-detect_cpu_armhfp.patch
Patch3: x265-arm-cflags.patch
BuildRequires: cmake3
BuildRequires: nasm
@ -135,6 +136,9 @@ done
%{_libdir}/pkgconfig/x265.pc
%changelog
* Tue Feb 27 2018 Nicolas Chauvet <kwizart@gmail.com> - 2.7-2
- Fix CFLAGS on ARM
* Tue Feb 27 2018 Leigh Scott <leigh123linux@googlemail.com> - 2.7-1
- update to 2.7
- Drop shared test patch as it causes nasm build to fail

Loading…
Cancel
Save