Mercurial > ecos
changeset 3199:1151035b20da
Add CYGBLD_FORCE_INLINE macro to be used to enforce function inlining when compiling with no optimization.
| author | vae |
|---|---|
| date | Tue, 12 Feb 2013 20:58:56 +0000 |
| parents | c568d113df01 |
| children | 5e8c9e64b5b0 |
| files | packages/infra/current/ChangeLog packages/infra/current/include/cyg_type.h |
| diffstat | 2 files changed, 15 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/packages/infra/current/ChangeLog +++ b/packages/infra/current/ChangeLog @@ -1,3 +1,9 @@ +2013-02-09 Ilija Kocho <ilijak@siva.com.mk> + + * include/cyg_type.h: Add CYGBLD_FORCE_INLINE macro to be used + to enforce function inlining when compiling with no optimization. + [ Bugzilla Bug 1001759 ] + 2012-03-06 Grant Edwards <grant.b.edwards@gmail.com> * include/cyg_type.h: Add CYGBLD_ATTRIB_UNUSED macro to be used to
--- a/packages/infra/current/include/cyg_type.h +++ b/packages/infra/current/include/cyg_type.h @@ -467,6 +467,14 @@ typedef cyg_haladdrword CYG_ADDRWORD; # define CYGBLD_ATTRIB_USED __attribute__((unused)) # endif # endif + +// Enforce inlining of a C function. GCC does not inline any C +// function when not optimizing, unless you specify "always_inline" attribute. +// Other attributes suppress generation of standalone function. +# if !defined(CYGBLD_FORCE_INLINE) +# define CYGBLD_FORCE_INLINE __externC inline __attribute((gnu_inline)) __attribute((always_inline)) +# endif + #else // non-GNU # define CYGBLD_ATTRIB_UNUSED /* nothing */ @@ -498,6 +506,7 @@ typedef cyg_haladdrword CYG_ADDRWORD; # define CYGBLD_ATTRIB_STRFTIME_FORMAT(__format__, __args__) +#define CYGBLD_FORCE_INLINE #endif
