From b3d195f0188758a14875a5a2f270e4fd190a679f Mon Sep 17 00:00:00 2001 From: manuel Date: Tue, 17 Apr 2018 00:15:38 +0200 Subject: sync with upstream --- cmake/scripts/linux/ArchSetup.cmake | 28 +++++++++++++++++++--------- cmake/scripts/linux/ExtraTargets.cmake | 6 ++++-- 2 files changed, 23 insertions(+), 11 deletions(-) (limited to 'cmake/scripts/linux') 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 @@ -set(ARCH_DEFINES -D_LINUX -DTARGET_POSIX -DTARGET_LINUX) -# temp until further cleanup is done -if(CORE_PLATFORM_NAME_LC STREQUAL rbpi) - list(APPEND ARCH_DEFINES -D_ARMEL -DTARGET_RASPBERRY_PI) -endif() +# we always want to use GNU features if available, so set _GNU_SOURCE +set(ARCH_DEFINES -D_LINUX -DTARGET_POSIX -DTARGET_LINUX -D_GNU_SOURCE) set(SYSTEM_DEFINES -D__STDC_CONSTANT_MACROS -D_FILE_DEFINED -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64) set(PLATFORM_DIR platform/linux) @@ -21,14 +18,17 @@ 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) - set(NEON_FLAGS "-mfpu=neon -mvectorize-with-neon-quad") elseif(CPU MATCHES aarch64 OR CPU MATCHES arm64) set(ARCH aarch64) set(NEON True) @@ -37,6 +37,16 @@ else() endif() endif() +# temp until further cleanup is done +# add Raspberry Pi 2 and 3 specific flags +if(CORE_PLATFORM_NAME_LC STREQUAL rbpi) + 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 @@ -84,7 +94,7 @@ set(CMAKE_REQUIRED_DEFINITIONS "-D_GNU_SOURCE") check_symbol_exists("mkostemp" "stdlib.h" HAVE_MKOSTEMP) set(CMAKE_REQUIRED_DEFINITIONS "") if(HAVE_MKOSTEMP) - list(APPEND ARCH_DEFINES "-DHAVE_MKOSTEMP=1" "-D_GNU_SOURCE") + list(APPEND ARCH_DEFINES "-DHAVE_MKOSTEMP=1") endif() # Additional SYSTEM_DEFINES diff --git a/cmake/scripts/linux/ExtraTargets.cmake b/cmake/scripts/linux/ExtraTargets.cmake index 4753f73..37d196a 100644 --- a/cmake/scripts/linux/ExtraTargets.cmake +++ b/cmake/scripts/linux/ExtraTargets.cmake @@ -17,7 +17,9 @@ endif() if(CORE_PLATFORM_NAME_LC STREQUAL "wayland") # This cannot go into wayland.cmake since it requires the Wayland dependencies # to already be resolved - set(PROTOCOL_XMLS "${WAYLAND_PROTOCOLS_DIR}/unstable/xdg-shell/xdg-shell-unstable-v6.xml" + set(PROTOCOL_XMLS "${WAYLANDPP_PROTOCOLS_DIR}/presentation-time.xml" + "${WAYLANDPP_PROTOCOLS_DIR}/xdg-shell.xml" + "${WAYLAND_PROTOCOLS_DIR}/unstable/xdg-shell/xdg-shell-unstable-v6.xml" "${WAYLAND_PROTOCOLS_DIR}/unstable/idle-inhibit/idle-inhibit-unstable-v1.xml") add_custom_command(OUTPUT "${WAYLAND_EXTRA_PROTOCOL_GENERATED_DIR}/wayland-extra-protocols.hpp" "${WAYLAND_EXTRA_PROTOCOL_GENERATED_DIR}/wayland-extra-protocols.cpp" COMMAND "${WAYLANDPP_SCANNER}" ${PROTOCOL_XMLS} "${WAYLAND_EXTRA_PROTOCOL_GENERATED_DIR}/wayland-extra-protocols.hpp" "${WAYLAND_EXTRA_PROTOCOL_GENERATED_DIR}/wayland-extra-protocols.cpp" @@ -26,4 +28,4 @@ if(CORE_PLATFORM_NAME_LC STREQUAL "wayland") # Dummy target for dependencies add_custom_target(generate-wayland-extra-protocols DEPENDS wayland-extra-protocols.hpp) -endif() \ No newline at end of file +endif() -- cgit v1.2.3