diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2022-04-27 13:54:22 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2022-04-27 15:25:00 +0200 |
commit | e07ea03fce26197d31a9654f4ba217e842049d65 (patch) | |
tree | b773153c17036a2c05d85d27140000bcf583f2d9 /gcc/ada/tracebak.c | |
parent | 1b21d79e4e462e38868486bbf3d1eaf4c14cc6d0 (diff) | |
download | gcc-e07ea03fce26197d31a9654f4ba217e842049d65.zip gcc-e07ea03fce26197d31a9654f4ba217e842049d65.tar.gz gcc-e07ea03fce26197d31a9654f4ba217e842049d65.tar.bz2 |
ada: Fix build for RTEMS
Commit 621cccba3f8b0cd2757feda171e66e3820b55c2c broke the Ada build for all
RTEMS targets except aarch64.
gcc/ada/
* tracebak.c: Add support for ARM RTEMS. Add support for RTEMS to PPC
ELF. Add support for RTEMS to SPARC. Merge aarch64 support of Linux
and RTEMS.
Diffstat (limited to 'gcc/ada/tracebak.c')
-rw-r--r-- | gcc/ada/tracebak.c | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/gcc/ada/tracebak.c b/gcc/ada/tracebak.c index 54e547d2..6cc5d30 100644 --- a/gcc/ada/tracebak.c +++ b/gcc/ada/tracebak.c @@ -316,6 +316,13 @@ __gnat_backtrace (void **array, #define PC_ADJUST -2 #define USING_ARM_UNWINDING 1 +/*---------------------- ARM RTEMS ------------------------------------ -*/ +#elif (defined (__arm__) && defined (__rtems__)) + +#define USE_GCC_UNWINDER +#define PC_ADJUST -2 +#define USING_ARM_UNWINDING 1 + /*---------------------- PPC AIX/PPC Lynx 178/Older Darwin --------------*/ #elif ((defined (_POWER) && defined (_AIX)) || \ (defined (__powerpc__) && defined (__Lynx__) && !defined(__ELF__)) || \ @@ -370,11 +377,12 @@ extern void __runnit(); /* thread entry point. */ #define BASE_SKIP 1 -/*----------- PPC ELF (GNU/Linux & VxWorks & Lynx178e) -------------------*/ +/*----------- PPC ELF (GNU/Linux & VxWorks & Lynx178e & RTEMS ) ----------*/ #elif (defined (_ARCH_PPC) && defined (__vxworks)) || \ (defined (__powerpc__) && defined (__Lynx__) && defined(__ELF__)) || \ - (defined (__linux__) && defined (__powerpc__)) + (defined (__linux__) && defined (__powerpc__)) || \ + (defined (__powerpc__) && defined (__rtems__)) #if defined (_ARCH_PPC64) && !defined (__USING_SJLJ_EXCEPTIONS__) #define USE_GCC_UNWINDER @@ -404,9 +412,9 @@ struct layout #define BASE_SKIP 1 -/*-------------------------- SPARC Solaris -----------------------------*/ +/*-------------------------- SPARC Solaris or RTEMS --------------------*/ -#elif defined (__sun__) && defined (__sparc__) +#elif (defined (__sun__) || defined (__rtems__)) && defined (__sparc__) #define USE_GENERIC_UNWINDER @@ -551,21 +559,9 @@ is_return_from(void *symbol_addr, void *ret_addr) #error Unhandled QNX architecture. #endif -/*---------------------------- RTEMS ---------------------------------*/ - -#elif defined (__rtems__) - -#define USE_GCC_UNWINDER - -#if defined (__aarch64__) -#define PC_ADJUST -4 -#else -#error Unhandled RTEMS architecture. -#endif - -/*------------------- aarch64-linux ----------------------------------*/ +/*------------------- aarch64-linux or aarch64-rtems -----------------*/ -#elif (defined (__aarch64__) && defined (__linux__)) +#elif (defined (__aarch64__) && (defined (__linux__) || defined (__rtems__))) #define USE_GCC_UNWINDER #define PC_ADJUST -4 |