diff options
Diffstat (limited to 'cmake/toolchain/arm-none-eabi-gcc.cmake')
-rw-r--r-- | cmake/toolchain/arm-none-eabi-gcc.cmake | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cmake/toolchain/arm-none-eabi-gcc.cmake b/cmake/toolchain/arm-none-eabi-gcc.cmake index ce54cd5..492abc5 100644 --- a/cmake/toolchain/arm-none-eabi-gcc.cmake +++ b/cmake/toolchain/arm-none-eabi-gcc.cmake @@ -52,7 +52,9 @@ add_compile_options( -mcpu=${GCC_CPU} -mthumb "$<$<CONFIG:DEBUG>:-gdwarf-3>" - "$<$<COMPILE_LANGUAGE:CXX>:-fno-unwind-tables;-fno-rtti;-fno-exceptions>") + "$<$<COMPILE_LANGUAGE:CXX>:-fno-unwind-tables;-fno-rtti;-fno-exceptions>" + -fdata-sections + -ffunction-sections) # Compile defines add_compile_definitions( @@ -88,6 +90,8 @@ if (FLOAT) add_link_options(-mfloat-abi=${FLOAT}) endif() +add_link_options(LINKER:--nmagic,--gc-sections) + # Compilation warnings add_compile_options( -Wall |