2 # User Bertrand Jacquin <bertrand@jacquin.bzh>
3 # Date 1444431941 -3600
4 # Node ID 5c6d2a6f2f9a0534933cc999b3845be4344e1af0
5 # Parent b6156a08b1def3584647f26096866c1a0c11e54a
6 build: Disable -march selection from CMakeLists.txt
8 x32 arch as defined on https://sites.google.com/site/x32abi is neither
9 X86 nor X64, then forcing -march=i686 leads to build failure as wrong
12 Forcing -march, -mfloat-abi and -mfpu for ARM is also wrong
14 As a global sanity sake, disable all forced -march in CMakeLists
16 Backported from upstream pull request:
17 https://bitbucket.org/multicoreware/x265/pull-requests/21
19 Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
21 diff -r 58dddcf01b7d source/CMakeLists.txt
22 --- a/source/CMakeLists.txt Mon Jan 23 09:50:33 2017 +0530
23 +++ b/source/CMakeLists.txt Mon Jan 23 21:03:10 2017 +0100
27 add_definitions(-xhost)
29 - add_definitions(-march=native)
31 - elseif(X86 AND NOT X64)
32 - string(FIND "${CMAKE_CXX_FLAGS}" "-march" marchPos)
33 - if(marchPos LESS "0")
34 - add_definitions(-march=i686)
35 - if(WIN32 AND NOT INTEL_CXX AND NOT CLANG AND
36 - CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 6.0 AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0)
37 - add_definitions(-mpreferred-stack-boundary=2)
41 - if(ARM AND CROSS_COMPILE_ARM)
42 - set(ARM_ARGS -march=armv6 -mfloat-abi=soft -mfpu=vfp -marm -fPIC)
46 - set(ARM_ARGS -mcpu=native -mfloat-abi=hard -mfpu=neon -marm -fPIC)
47 - add_definitions(-DHAVE_NEON)
49 - set(ARM_ARGS -mcpu=native -mfloat-abi=hard -mfpu=vfp -marm)
52 add_definitions(${ARM_ARGS})