diff options
author | Tomasz Konojacki <me@xenu.pl> | 2020-04-06 04:05:22 +0200 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2020-04-05 21:31:40 -0600 |
commit | d711360400f0d6e611cc4aa81fb0cfadfa5312e4 (patch) | |
tree | 36d9f824ee02009c78c7a687c87af2ef81762764 | |
parent | 5c1c42cb3b1c905ab450445eaf8010952dd1f9e5 (diff) | |
download | perl-d711360400f0d6e611cc4aa81fb0cfadfa5312e4.tar.gz |
disable __attribute__((always_inline)) for gcc <= 4.6
It was causing compilation errors in DEBUGGING builds:
pp_sort.c: In function 'sortsv_cmp_locale_desc':
pp_sort.c:1329:1: sorry, unimplemented: inlining failed in call to 'S_cmp_locale_desc': function not inlinable
pp_sort.c:188:17: sorry, unimplemented: called from here
pp_sort.c:1329:1: sorry, unimplemented: inlining failed in call to 'S_cmp_locale_desc': function not inlinable
pp_sort.c:194:21: sorry, unimplemented: called from here
(...)
-rw-r--r-- | perl.h | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -340,7 +340,8 @@ # if __GNUC__ == 3 && __GNUC_MINOR__ >= 4 || __GNUC__ > 3 /* 3.4 -> */ # define HASATTRIBUTE_WARN_UNUSED_RESULT # endif -# if __GNUC__ == 3 && __GNUC_MINOR__ >= 1 || __GNUC__ > 3 /* 3.1 -> */ +/* always_inline is buggy in gcc <= 4.6 and causes compilation errors */ +# if __GNUC__ == 4 && __GNUC_MINOR__ >= 7 || __GNUC__ > 4 /* 4.7 -> */ # define HASATTRIBUTE_ALWAYS_INLINE # endif #endif @@ -371,7 +372,10 @@ # define __attribute__warn_unused_result__ __attribute__((warn_unused_result)) #endif #ifdef HASATTRIBUTE_ALWAYS_INLINE -# define __attribute__always_inline__ __attribute__((always_inline)) +/* always_inline is buggy in gcc <= 4.6 and causes compilation errors */ +# if __GNUC__ == 4 && __GNUC_MINOR__ >= 7 || __GNUC__ > 4 +# define __attribute__always_inline__ __attribute__((always_inline)) +# endif #endif /* If we haven't defined the attributes yet, define them to blank. */ |