aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended/s-nail/files/0001-su_INLINE-eh-no-give-up-share-detection.patch
blob: 41f98281f8eceef7287803b35baad51a8b032264 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
From 9db4c0f6bc0dd11c77b54296fce6b8afe18f4325 Mon Sep 17 00:00:00 2001
From: Steffen Nurpmeso <steffen@sdaoden.eu> 
Date: Thu, 9 Jun 2022 18:26:38 +0800
Subject: [PATCH] su_INLINE: eh no; give up, share detection with clang but for
 a thing

Upstream-Status: Backport [https://git.sdaoden.eu/browse/s-nail.git/commit/?id=de2a44c393a39d80ddf12154aec94cace84b19c1]

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
---
 include/su/code.h | 34 +++++++++-------------------------
 1 file changed, 9 insertions(+), 25 deletions(-)

diff --git a/include/su/code.h b/include/su/code.h
index 9683f4a..c7a2af3 100644
--- a/include/su/code.h
+++ b/include/su/code.h
@@ -308,29 +308,8 @@ do{\
 # ifdef DOXYGEN
 #  define su_INLINE inline
 #  define su_SINLINE inline
-# elif su_CC_GCC
-#  if !su_CC_VCHECK_GCC(3, 1)
-#   define su_INLINE extern __inline__
-#   define su_SINLINE static __inline__
-#  elif !defined __GNUC_GNU_INLINE__  /*4.1.3; !su_CC_VCHECK_GCC(4, 2)*/
-#   define su_INLINE extern __inline __attribute__((always_inline))
-#   define su_SINLINE static __inline __attribute__((always_inline))
-   /* gcc 8.3.0 bug: does not gracefully inline with -Os
-    * gcc 12.1.0 bug: ditto, -Og
-    * Thus: always gcc-specific! */
-#  elif 1 /*!defined __OPTIMIZE__ || \
-      !defined __STDC_VERSION__ || __STDC_VERSION__ +0 < 199901L*/
-#   define su_INLINE extern __inline __attribute__((gnu_inline))
-#   define su_SINLINE static __inline __attribute__((gnu_inline))
-#  elif !defined NDEBUG || !defined __OPTIMIZE__
-#   define su_INLINE static inline
-#   define su_SINLINE static inline
-#  else
-#   define su_INLINE inline
-#   define su_SINLINE static inline
-#  endif
-# elif su_CC_CLANG || su_CC_PCC
-#  if defined __STDC_VERSION__ && __STDC_VERSION__ +0 >= 199901L
+# elif su_CC_CLANG || su_CC_GCC || su_CC_PCC
+#  if defined __STDC_VERSION__ && __STDC_VERSION__ +0 >= 199901l
 #   if !defined NDEBUG || !defined __OPTIMIZE__
 #    define su_INLINE static inline
 #    define su_SINLINE static inline
@@ -340,8 +319,13 @@ do{\
 #    define su_SINLINE static inline __attribute__((always_inline))
 #   endif
 #  else
-#   define su_INLINE static __inline
-#   define su_SINLINE static __inline
+#   if su_CC_VCHECK_GCC(3, 1)
+#    define su_INLINE static __inline __attribute__((always_inline))
+#    define su_SINLINE static __inline __attribute__((always_inline))
+#   else
+#    define su_INLINE static __inline
+#    define su_SINLINE static __inline
+#   endif
 #  endif
 # else
 #  define su_INLINE static /* TODO __attribute__((unused)) alike? */
-- 
2.25.1