diff --git a/libraries/AP_Common/menu.cpp b/libraries/AP_Common/menu.cpp index c77aab036c..e58f5c444a 100644 --- a/libraries/AP_Common/menu.cpp +++ b/libraries/AP_Common/menu.cpp @@ -12,6 +12,12 @@ #include "include/menu.h" +// workaround for GCC bug c++/34734 +#undef PROGMEM +#define PROGMEM __attribute__(( section(".progmem.data") )) +#undef PSTR +#define PSTR(s) (__extension__({static prog_char __c[] PROGMEM = (s); &__c[0];})) + // statics char Menu::_inbuf[MENU_COMMANDLINE_MAX]; Menu::arg Menu::_argv[MENU_ARGS_MAX + 1];