From c8339709e00e892720b82e44fbe3b5e404285ecd Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 21 Feb 2017 08:58:29 +0100 Subject: score: Add RTEMS_WEAK_ALIAS() --- cpukit/score/include/rtems/score/basedefs.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'cpukit/score/include/rtems/score/basedefs.h') diff --git a/cpukit/score/include/rtems/score/basedefs.h b/cpukit/score/include/rtems/score/basedefs.h index 22cc246899..79bf15e879 100644 --- a/cpukit/score/include/rtems/score/basedefs.h +++ b/cpukit/score/include/rtems/score/basedefs.h @@ -189,6 +189,16 @@ #define RTEMS_ALIAS( _target ) #endif +/** + * @brief Instructs the compiler to generate a weak alias to the specified + * target function. + */ +#if defined(__GNUC__) + #define RTEMS_WEAK_ALIAS( _target ) __attribute__((__weak__, __alias__(#_target))) +#else + #define RTEMS_WEAK_ALIAS( _target ) +#endif + /** * @brief Instructs the compiler to enforce the specified alignment. */ -- cgit v1.2.3