diff options
author | Rechi <Rechi@users.noreply.github.com> | 2018-03-17 11:08:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-17 11:08:34 +0100 |
commit | a489ea666f677192ce6fcdc8ceea37680b1fa4a0 (patch) | |
tree | ed81df93a7983be427651cacebbf5caefb781e60 | |
parent | 417cd6995d87cbeb85728b1e1ece77e7be67dd56 (diff) | |
parent | b41f8c2ab820cc1ca06a95c20631f8abc2b5cc78 (diff) |
Merge pull request #13638 from graysky2/master
Add support for Raspberry Pi 3 (Cortex-A53) at build time (v18)
-rw-r--r-- | cmake/scripts/linux/ArchSetup.cmake | 19 | ||||
-rw-r--r-- | tools/depends/configure.ac | 12 |
2 files changed, 27 insertions, 4 deletions
diff --git a/cmake/scripts/linux/ArchSetup.cmake b/cmake/scripts/linux/ArchSetup.cmake index 45b1da709b..64a758e18f 100644 --- a/cmake/scripts/linux/ArchSetup.cmake +++ b/cmake/scripts/linux/ArchSetup.cmake @@ -22,10 +22,14 @@ else() set(ARCH arm) set(NEON False) set(NEON_FLAGS "-mcpu=arm1176jzf-s -mtune=arm1176jzf-s -mfloat-abi=hard -mfpu=vfp") - elseif(CPU MATCHES "cortex-a7" OR CPU MATCHES "cortex-a53") + elseif(CPU MATCHES "cortex-a7") set(ARCH arm) set(NEON True) - set(NEON_FLAGS "-fPIC -mcpu=cortex-a7 -mfloat-abi=hard -mfpu=neon-vfpv4 -mvectorize-with-neon-quad") + set(NEON_FLAGS "-fPIC -mcpu=cortex-a7") + elseif(CPU MATCHES "cortex-a53") + set(ARCH arm) + set(NEON True) + set(NEON_FLAGS "-fPIC -mcpu=cortex-a53") elseif(CPU MATCHES arm) set(ARCH arm) set(NEON True) @@ -37,6 +41,17 @@ else() endif() endif() +# temp until further cleanup is done +# add Raspberry Pi 2 and 3 specific flags +if(CORE_PLATFORM_NAME_LC STREQUAL rbpi) + list(APPEND ARCH_DEFINES -D_ARMEL -DTARGET_RASPBERRY_PI) + if(CPU MATCHES "cortex-a7") + set(NEON_FLAGS "-fPIC -mcpu=cortex-a7 -mfloat-abi=hard -mfpu=neon-vfpv4 -mvectorize-with-neon-quad") + elseif(CPU MATCHES "cortex-a53") + set(NEON_FLAGS "-fPIC -mcpu=cortex-a53 -mfloat-abi=hard -mfpu=neon-fp-armv8 -mvectorize-with-neon-quad") + endif() +endif() + if((CMAKE_BUILD_TYPE STREQUAL Release OR CMAKE_BUILD_TYPE STREQUAL MinSizeRel) AND CMAKE_COMPILER_IS_GNUCXX) # Make sure we strip binaries in Release build diff --git a/tools/depends/configure.ac b/tools/depends/configure.ac index 2663261434..186da4e476 100644 --- a/tools/depends/configure.ac +++ b/tools/depends/configure.ac @@ -429,8 +429,16 @@ case $use_platform in target_platform=raspberry-pi use_cpu=cortex-a7 ffmpeg_options_default="--cpu=cortex-a7" - platform_cflags="-fPIC -mcpu=cortex-a7 -mfloat-abi=hard -mfpu=neon-vfpv4" - platform_cxxflags="-fPIC -mcpu=cortex-a7 -mfloat-abi=hard -mfpu=neon-vfpv4" + platform_cflags="-fPIC -mcpu=cortex-a7 -mfloat-abi=hard -mfpu=neon-vfpv4 -mvectorize-with-neon-quad" + platform_cxxflags="-fPIC -mcpu=cortex-a7 -mfloat-abi=hard -mfpu=neon-vfpv4 -mvectorize-with-neon-quad" + platform_ldflags="-lpthread" + ;; + raspberry-pi3) + target_platform=raspberry-pi + use_cpu=cortex-a53 + ffmpeg_options_default="--cpu=cortex-a53" + platform_cflags="-fPIC -mcpu=cortex-a53 -mfloat-abi=hard -mfpu=neon-fp-armv8 -mvectorize-with-neon-quad" + platform_cxxflags="-fPIC -mcpu=cortex-a53 -mfloat-abi=hard -mfpu=neon-fp-armv8 -mvectorize-with-neon-quad" platform_ldflags="-lpthread" ;; auto) |