diff options
| author | manuel <manuel@mausz.at> | 2018-04-17 00:15:38 +0200 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2018-04-17 00:15:38 +0200 |
| commit | b3d195f0188758a14875a5a2f270e4fd190a679f (patch) | |
| tree | cbe6a2d51afd7be095e29fd612107044cf1f391e /cmake/scripts/linux/ArchSetup.cmake | |
| parent | a51f51db67e3eab80ac2ed28d403a6d77f7acc45 (diff) | |
| download | kodi-pvr-build-b3d195f0188758a14875a5a2f270e4fd190a679f.tar.gz kodi-pvr-build-b3d195f0188758a14875a5a2f270e4fd190a679f.tar.bz2 kodi-pvr-build-b3d195f0188758a14875a5a2f270e4fd190a679f.zip | |
sync with upstream
Diffstat (limited to 'cmake/scripts/linux/ArchSetup.cmake')
| -rw-r--r-- | cmake/scripts/linux/ArchSetup.cmake | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/cmake/scripts/linux/ArchSetup.cmake b/cmake/scripts/linux/ArchSetup.cmake index ee69c09..fcee675 100644 --- a/cmake/scripts/linux/ArchSetup.cmake +++ b/cmake/scripts/linux/ArchSetup.cmake | |||
| @@ -1,8 +1,5 @@ | |||
| 1 | set(ARCH_DEFINES -D_LINUX -DTARGET_POSIX -DTARGET_LINUX) | 1 | # we always want to use GNU features if available, so set _GNU_SOURCE |
| 2 | # temp until further cleanup is done | 2 | set(ARCH_DEFINES -D_LINUX -DTARGET_POSIX -DTARGET_LINUX -D_GNU_SOURCE) |
| 3 | if(CORE_PLATFORM_NAME_LC STREQUAL rbpi) | ||
| 4 | list(APPEND ARCH_DEFINES -D_ARMEL -DTARGET_RASPBERRY_PI) | ||
| 5 | endif() | ||
| 6 | set(SYSTEM_DEFINES -D__STDC_CONSTANT_MACROS -D_FILE_DEFINED | 3 | set(SYSTEM_DEFINES -D__STDC_CONSTANT_MACROS -D_FILE_DEFINED |
| 7 | -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64) | 4 | -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64) |
| 8 | set(PLATFORM_DIR platform/linux) | 5 | set(PLATFORM_DIR platform/linux) |
| @@ -21,14 +18,17 @@ else() | |||
| 21 | set(ARCH arm) | 18 | set(ARCH arm) |
| 22 | set(NEON False) | 19 | set(NEON False) |
| 23 | set(NEON_FLAGS "-mcpu=arm1176jzf-s -mtune=arm1176jzf-s -mfloat-abi=hard -mfpu=vfp") | 20 | set(NEON_FLAGS "-mcpu=arm1176jzf-s -mtune=arm1176jzf-s -mfloat-abi=hard -mfpu=vfp") |
| 24 | elseif(CPU MATCHES "cortex-a7" OR CPU MATCHES "cortex-a53") | 21 | elseif(CPU MATCHES "cortex-a7") |
| 25 | set(ARCH arm) | 22 | set(ARCH arm) |
| 26 | set(NEON True) | 23 | set(NEON True) |
| 27 | set(NEON_FLAGS "-fPIC -mcpu=cortex-a7 -mfloat-abi=hard -mfpu=neon-vfpv4 -mvectorize-with-neon-quad") | 24 | set(NEON_FLAGS "-fPIC -mcpu=cortex-a7") |
| 25 | elseif(CPU MATCHES "cortex-a53") | ||
| 26 | set(ARCH arm) | ||
| 27 | set(NEON True) | ||
| 28 | set(NEON_FLAGS "-fPIC -mcpu=cortex-a53") | ||
| 28 | elseif(CPU MATCHES arm) | 29 | elseif(CPU MATCHES arm) |
| 29 | set(ARCH arm) | 30 | set(ARCH arm) |
| 30 | set(NEON True) | 31 | set(NEON True) |
| 31 | set(NEON_FLAGS "-mfpu=neon -mvectorize-with-neon-quad") | ||
| 32 | elseif(CPU MATCHES aarch64 OR CPU MATCHES arm64) | 32 | elseif(CPU MATCHES aarch64 OR CPU MATCHES arm64) |
| 33 | set(ARCH aarch64) | 33 | set(ARCH aarch64) |
| 34 | set(NEON True) | 34 | set(NEON True) |
| @@ -37,6 +37,16 @@ else() | |||
| 37 | endif() | 37 | endif() |
| 38 | endif() | 38 | endif() |
| 39 | 39 | ||
| 40 | # temp until further cleanup is done | ||
| 41 | # add Raspberry Pi 2 and 3 specific flags | ||
| 42 | if(CORE_PLATFORM_NAME_LC STREQUAL rbpi) | ||
| 43 | if(CPU MATCHES "cortex-a7") | ||
| 44 | set(NEON_FLAGS "-fPIC -mcpu=cortex-a7 -mfloat-abi=hard -mfpu=neon-vfpv4 -mvectorize-with-neon-quad") | ||
| 45 | elseif(CPU MATCHES "cortex-a53") | ||
| 46 | set(NEON_FLAGS "-fPIC -mcpu=cortex-a53 -mfloat-abi=hard -mfpu=neon-fp-armv8 -mvectorize-with-neon-quad") | ||
| 47 | endif() | ||
| 48 | endif() | ||
| 49 | |||
| 40 | if((CMAKE_BUILD_TYPE STREQUAL Release OR CMAKE_BUILD_TYPE STREQUAL MinSizeRel) | 50 | if((CMAKE_BUILD_TYPE STREQUAL Release OR CMAKE_BUILD_TYPE STREQUAL MinSizeRel) |
| 41 | AND CMAKE_COMPILER_IS_GNUCXX) | 51 | AND CMAKE_COMPILER_IS_GNUCXX) |
| 42 | # Make sure we strip binaries in Release build | 52 | # Make sure we strip binaries in Release build |
| @@ -84,7 +94,7 @@ set(CMAKE_REQUIRED_DEFINITIONS "-D_GNU_SOURCE") | |||
| 84 | check_symbol_exists("mkostemp" "stdlib.h" HAVE_MKOSTEMP) | 94 | check_symbol_exists("mkostemp" "stdlib.h" HAVE_MKOSTEMP) |
| 85 | set(CMAKE_REQUIRED_DEFINITIONS "") | 95 | set(CMAKE_REQUIRED_DEFINITIONS "") |
| 86 | if(HAVE_MKOSTEMP) | 96 | if(HAVE_MKOSTEMP) |
| 87 | list(APPEND ARCH_DEFINES "-DHAVE_MKOSTEMP=1" "-D_GNU_SOURCE") | 97 | list(APPEND ARCH_DEFINES "-DHAVE_MKOSTEMP=1") |
| 88 | endif() | 98 | endif() |
| 89 | 99 | ||
| 90 | # Additional SYSTEM_DEFINES | 100 | # Additional SYSTEM_DEFINES |
