From fffff5e7bc10eb58069128b636acc167e31b9b5f Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Mon, 10 Aug 2020 11:27:29 +0200 Subject: [PATCH] cmake: increase function inlining limit gcc sets the inlining limit a bit arbitrary and the default gcc on the RPi2 seems to use a lower value so compiling the SIMD extensions fails with an "inlining failed" error in srslte_mat_2x2_mmse_csi_simd(). this patch increases the default value. even though its increased for all platforms it shouldn't case issues on other machines. the value isn't used by clang. --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index f238ece0d..7c88a69a4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -471,6 +471,9 @@ if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") endif() +# Increase inlining limit to allow gcc compilation on e.g. RPi2 +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --param large-function-growth=1600") + message(STATUS "CMAKE_C_FLAGS is ${CMAKE_C_FLAGS}") message(STATUS "CMAKE_CXX_FLAGS is ${CMAKE_CXX_FLAGS}")