103 lines
6.1 KiB
Diff
103 lines
6.1 KiB
Diff
|
From ecccbcf66da53779d88e38e2af7f82eff8dde7f8 Mon Sep 17 00:00:00 2001
|
||
|
From: Khem Raj <raj.khem@gmail.com>
|
||
|
Date: Sun, 16 Aug 2015 10:35:47 -0700
|
||
|
Subject: [PATCH] use static inlines as the external inline definition has
|
||
|
changed with gcc5
|
||
|
|
||
|
[Patch from https://raw.githubusercontent.com/openembedded/openembedded-core/master/meta/recipes-support/lzop/lzop/0001-use-static-inlines-as-the-external-inline-definition.patch]
|
||
|
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||
|
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
|
||
|
---
|
||
|
Upstream-Status: Pending
|
||
|
|
||
|
src/miniacc.h | 24 ++++++++----------------
|
||
|
1 file changed, 8 insertions(+), 16 deletions(-)
|
||
|
|
||
|
diff --git a/src/miniacc.h b/src/miniacc.h
|
||
|
index 09e6f0c..cae98d1 100644
|
||
|
--- a/src/miniacc.h
|
||
|
+++ b/src/miniacc.h
|
||
|
@@ -2880,8 +2880,7 @@ typedef void (__acc_cdecl_sighandler *acc_sighandler_t)(acc_signo_t);
|
||
|
#if !(ACC_CFG_NO_INLINE_ASM) && (__acc_HAVE_forceinline)
|
||
|
#if (ACC_ARCH_POWERPC && ACC_ABI_BIG_ENDIAN) && (ACC_CC_GNUC)
|
||
|
#if !defined(ACC_UA_GET_LE16)
|
||
|
-extern __acc_forceinline unsigned long __ACC_UA_GET_LE16(__acc_ua_volatile const void* pp);
|
||
|
-extern __acc_forceinline unsigned long __ACC_UA_GET_LE16(__acc_ua_volatile const void* pp) {
|
||
|
+static __acc_forceinline unsigned long __ACC_UA_GET_LE16(__acc_ua_volatile const void* pp) {
|
||
|
__acc_ua_volatile const acc_uint16e_t* p = (__acc_ua_volatile const acc_uint16e_t*) pp;
|
||
|
unsigned long v;
|
||
|
__asm__ __volatile__("lhbrx %0,0,%1" : "=r" (v) : "r" (p), "m" (*p));
|
||
|
@@ -2890,8 +2889,7 @@ extern __acc_forceinline unsigned long __ACC_UA_GET_LE16(__acc_ua_volatile const
|
||
|
#define ACC_UA_GET_LE16(p) __ACC_UA_GET_LE16(p)
|
||
|
#endif
|
||
|
#if !defined(ACC_UA_SET_LE16)
|
||
|
-extern __acc_forceinline void __ACC_UA_SET_LE16(__acc_ua_volatile void* pp, unsigned long v);
|
||
|
-extern __acc_forceinline void __ACC_UA_SET_LE16(__acc_ua_volatile void* pp, unsigned long v) {
|
||
|
+static __acc_forceinline void __ACC_UA_SET_LE16(__acc_ua_volatile void* pp, unsigned long v) {
|
||
|
__acc_ua_volatile acc_uint16e_t* p = (__acc_ua_volatile acc_uint16e_t*) pp;
|
||
|
__asm__ __volatile__("sthbrx %2,0,%1" : "=m" (*p) : "r" (p), "r" (v));
|
||
|
}
|
||
|
@@ -2916,8 +2914,7 @@ extern __acc_forceinline void __ACC_UA_SET_LE16(__acc_ua_volatile void* pp, unsi
|
||
|
#if !(ACC_CFG_NO_INLINE_ASM) && (__acc_HAVE_forceinline)
|
||
|
#if (ACC_ARCH_POWERPC && ACC_ABI_BIG_ENDIAN) && (ACC_CC_GNUC)
|
||
|
#if !defined(ACC_UA_GET_LE32)
|
||
|
-extern __acc_forceinline unsigned long __ACC_UA_GET_LE32(__acc_ua_volatile const void* pp);
|
||
|
-extern __acc_forceinline unsigned long __ACC_UA_GET_LE32(__acc_ua_volatile const void* pp) {
|
||
|
+static __acc_forceinline unsigned long __ACC_UA_GET_LE32(__acc_ua_volatile const void* pp) {
|
||
|
__acc_ua_volatile const acc_uint32e_t* p = (__acc_ua_volatile const acc_uint32e_t*) pp;
|
||
|
unsigned long v;
|
||
|
__asm__ __volatile__("lwbrx %0,0,%1" : "=r" (v) : "r" (p), "m" (*p));
|
||
|
@@ -2926,8 +2923,7 @@ extern __acc_forceinline unsigned long __ACC_UA_GET_LE32(__acc_ua_volatile const
|
||
|
#define ACC_UA_GET_LE32(p) __ACC_UA_GET_LE32(p)
|
||
|
#endif
|
||
|
#if !defined(ACC_UA_SET_LE32)
|
||
|
-extern __acc_forceinline void __ACC_UA_SET_LE32(__acc_ua_volatile void* pp, unsigned long v);
|
||
|
-extern __acc_forceinline void __ACC_UA_SET_LE32(__acc_ua_volatile void* pp, unsigned long v) {
|
||
|
+static __acc_forceinline void __ACC_UA_SET_LE32(__acc_ua_volatile void* pp, unsigned long v) {
|
||
|
__acc_ua_volatile acc_uint32e_t* p = (__acc_ua_volatile acc_uint32e_t*) pp;
|
||
|
__asm__ __volatile__("stwbrx %2,0,%1" : "=m" (*p) : "r" (p), "r" (v));
|
||
|
}
|
||
|
@@ -3307,8 +3303,7 @@ typedef void (__acc_cdecl_sighandler *acc_sighandler_t)(acc_signo_t);
|
||
|
#if !(ACC_CFG_NO_INLINE_ASM) && (__acc_HAVE_forceinline)
|
||
|
#if (ACC_ARCH_POWERPC && ACC_ABI_BIG_ENDIAN) && (ACC_CC_GNUC)
|
||
|
#if !defined(ACC_UA_GET_LE16)
|
||
|
-extern __acc_forceinline unsigned long __ACC_UA_GET_LE16(__acc_ua_volatile const void* pp);
|
||
|
-extern __acc_forceinline unsigned long __ACC_UA_GET_LE16(__acc_ua_volatile const void* pp) {
|
||
|
+static __acc_forceinline unsigned long __ACC_UA_GET_LE16(__acc_ua_volatile const void* pp) {
|
||
|
__acc_ua_volatile const acc_uint16e_t* p = (__acc_ua_volatile const acc_uint16e_t*) pp;
|
||
|
unsigned long v;
|
||
|
__asm__ __volatile__("lhbrx %0,0,%1" : "=r" (v) : "r" (p), "m" (*p));
|
||
|
@@ -3317,8 +3312,7 @@ extern __acc_forceinline unsigned long __ACC_UA_GET_LE16(__acc_ua_volatile const
|
||
|
#define ACC_UA_GET_LE16(p) __ACC_UA_GET_LE16(p)
|
||
|
#endif
|
||
|
#if !defined(ACC_UA_SET_LE16)
|
||
|
-extern __acc_forceinline void __ACC_UA_SET_LE16(__acc_ua_volatile void* pp, unsigned long v);
|
||
|
-extern __acc_forceinline void __ACC_UA_SET_LE16(__acc_ua_volatile void* pp, unsigned long v) {
|
||
|
+static __acc_forceinline void __ACC_UA_SET_LE16(__acc_ua_volatile void* pp, unsigned long v) {
|
||
|
__acc_ua_volatile acc_uint16e_t* p = (__acc_ua_volatile acc_uint16e_t*) pp;
|
||
|
__asm__ __volatile__("sthbrx %2,0,%1" : "=m" (*p) : "r" (p), "r" (v));
|
||
|
}
|
||
|
@@ -3343,8 +3337,7 @@ extern __acc_forceinline void __ACC_UA_SET_LE16(__acc_ua_volatile void* pp, unsi
|
||
|
#if !(ACC_CFG_NO_INLINE_ASM) && (__acc_HAVE_forceinline)
|
||
|
#if (ACC_ARCH_POWERPC && ACC_ABI_BIG_ENDIAN) && (ACC_CC_GNUC)
|
||
|
#if !defined(ACC_UA_GET_LE32)
|
||
|
-extern __acc_forceinline unsigned long __ACC_UA_GET_LE32(__acc_ua_volatile const void* pp);
|
||
|
-extern __acc_forceinline unsigned long __ACC_UA_GET_LE32(__acc_ua_volatile const void* pp) {
|
||
|
+static __acc_forceinline unsigned long __ACC_UA_GET_LE32(__acc_ua_volatile const void* pp) {
|
||
|
__acc_ua_volatile const acc_uint32e_t* p = (__acc_ua_volatile const acc_uint32e_t*) pp;
|
||
|
unsigned long v;
|
||
|
__asm__ __volatile__("lwbrx %0,0,%1" : "=r" (v) : "r" (p), "m" (*p));
|
||
|
@@ -3353,8 +3346,7 @@ extern __acc_forceinline unsigned long __ACC_UA_GET_LE32(__acc_ua_volatile const
|
||
|
#define ACC_UA_GET_LE32(p) __ACC_UA_GET_LE32(p)
|
||
|
#endif
|
||
|
#if !defined(ACC_UA_SET_LE32)
|
||
|
-extern __acc_forceinline void __ACC_UA_SET_LE32(__acc_ua_volatile void* pp, unsigned long v);
|
||
|
-extern __acc_forceinline void __ACC_UA_SET_LE32(__acc_ua_volatile void* pp, unsigned long v) {
|
||
|
+static __acc_forceinline void __ACC_UA_SET_LE32(__acc_ua_volatile void* pp, unsigned long v) {
|
||
|
__acc_ua_volatile acc_uint32e_t* p = (__acc_ua_volatile acc_uint32e_t*) pp;
|
||
|
__asm__ __volatile__("stwbrx %2,0,%1" : "=m" (*p) : "r" (p), "r" (v));
|
||
|
}
|
||
|
--
|
||
|
2.5.0
|
||
|
|