From 50e11294cd64ec045768a6c0d415b347dc867e0f Mon Sep 17 00:00:00 2001 From: Samuel Sadok Date: Thu, 16 May 2019 22:11:59 +0200 Subject: [PATCH 1/2] fix compilation issue with GCC 9 --- Firmware/fibre/cpp/include/fibre/protocol.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Firmware/fibre/cpp/include/fibre/protocol.hpp b/Firmware/fibre/cpp/include/fibre/protocol.hpp index 498d5172..c1f3cc68 100644 --- a/Firmware/fibre/cpp/include/fibre/protocol.hpp +++ b/Firmware/fibre/cpp/include/fibre/protocol.hpp @@ -976,17 +976,17 @@ public: output_properties_.register_endpoints(list, id + 1 + decltype(input_properties_)::endpoint_count, length); } - template std::enable_if_t + template std::enable_if_t handle_ex() { invoke_function_with_tuple(*obj_, func_ptr_, in_args_); } - template std::enable_if_t + template std::enable_if_t handle_ex() { std::get<0>(out_args_) = invoke_function_with_tuple(*obj_, func_ptr_, in_args_); } - template std::enable_if_t= 2> + template std::enable_if_t= 2> handle_ex() { out_args_ = invoke_function_with_tuple(*obj_, func_ptr_, in_args_); } @@ -997,7 +997,7 @@ public: (void) output; LOG_FIBRE("tuple still at %x and of size %u\r\n", (uintptr_t)&in_args_, sizeof(in_args_)); LOG_FIBRE("invoke function using %d and %.3f\r\n", std::get<0>(in_args_), std::get<1>(in_args_)); - handle_ex(); + handle_ex(); } const char * name_; From 53c70bee206c13de076c0fe31701df4cd7b8ccf4 Mon Sep 17 00:00:00 2001 From: Samuel Sadok Date: Wed, 29 May 2019 12:31:53 +0200 Subject: [PATCH 2/2] Remove stack pointer from clobber list This fixes an issue when compiling with GCC 9.1: "In function 'void early_start_checks()': error: listing the stack pointer register 'sp' in a clobber list is deprecated [-Werror=deprecated]" Corresponds fix in upstream ARM CMSIS: https://github.com/ARM-software/CMSIS_5/commit/a07b56505471fd789111bd7dba726461449cc261 --- Firmware/Board/v3/Drivers/CMSIS/Include/cmsis_gcc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Firmware/Board/v3/Drivers/CMSIS/Include/cmsis_gcc.h b/Firmware/Board/v3/Drivers/CMSIS/Include/cmsis_gcc.h index bb89fbba..3e522777 100644 --- a/Firmware/Board/v3/Drivers/CMSIS/Include/cmsis_gcc.h +++ b/Firmware/Board/v3/Drivers/CMSIS/Include/cmsis_gcc.h @@ -161,7 +161,7 @@ __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_PSP(void) */ __attribute__( ( always_inline ) ) __STATIC_INLINE void __set_PSP(uint32_t topOfProcStack) { - __ASM volatile ("MSR psp, %0\n" : : "r" (topOfProcStack) : "sp"); + __ASM volatile ("MSR psp, %0\n" : : "r" (topOfProcStack) : ); } @@ -187,7 +187,7 @@ __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_MSP(void) */ __attribute__( ( always_inline ) ) __STATIC_INLINE void __set_MSP(uint32_t topOfMainStack) { - __ASM volatile ("MSR msp, %0\n" : : "r" (topOfMainStack) : "sp"); + __ASM volatile ("MSR msp, %0\n" : : "r" (topOfMainStack) : ); }