summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTing Liu <ting.liu@freescale.com>2015-12-22 14:08:57 +0800
committerZhenhua Luo <zhenhua.luo@nxp.com>2015-12-23 14:22:34 +0800
commit50fc7a56eedf62059881dbb3a8d80364e9e56617 (patch)
tree54eb09e138584e2f5c09228dde7e47c93e305100
parent8af709802ce92b7a2702d6295730b20d3c0f6d2a (diff)
downloadmeta-fsl-ppc-50fc7a56eedf62059881dbb3a8d80364e9e56617.tar.gz
usdpaa-apps: fix the inline function definition with gcc 5.x
Signed-off-by: Ting Liu <ting.liu@freescale.com> Signed-off-by: Zhenhua Luo <zhenhua.luo@nxp.com> Acked-by: Otavio Salvador <otavio@ossystems.com.br>
-rw-r--r--recipes-dpaa/usdpaa-apps/usdpaa-apps/fix-the-inline-function-definition-with-gcc-5.x.patch80
-rw-r--r--recipes-dpaa/usdpaa-apps/usdpaa-apps_git.bb4
2 files changed, 83 insertions, 1 deletions
diff --git a/recipes-dpaa/usdpaa-apps/usdpaa-apps/fix-the-inline-function-definition-with-gcc-5.x.patch b/recipes-dpaa/usdpaa-apps/usdpaa-apps/fix-the-inline-function-definition-with-gcc-5.x.patch
new file mode 100644
index 0000000..9f3d22c
--- /dev/null
+++ b/recipes-dpaa/usdpaa-apps/usdpaa-apps/fix-the-inline-function-definition-with-gcc-5.x.patch
@@ -0,0 +1,80 @@
1From 2b308217d2811e5d1420d7ce6e18f77a992f52e9 Mon Sep 17 00:00:00 2001
2From: Ting Liu <ting.liu@freescale.com>
3Date: Tue, 22 Dec 2015 13:16:33 +0800
4Subject: [PATCH] fix the inline function definition with gcc 5.x
5
6There are different semantics for inline functions for gcc-5.x compared to
7previous gcc. Fix the following build error:
8| dpa_classif_demo.c:(.text+0xeae): undefined reference to `crc64_hash_function'
9| simple_crypto.c:(.text+0x5b8e): undefined reference to `get_num_of_buffers'
10| simple_crypto.c:(.text+0x5b9a): undefined reference to `get_test_mode'
11| simple_crypto.c:(.text+0x5baa): undefined reference to `get_num_of_cpus'
12| simple_crypto.c:(.text+0x5bb2): undefined reference to `requires_authentication'
13| simple_crypto.c:(.text+0x5bbe): undefined reference to `get_thread_barrier'
14
15Upstream-Status: Pending
16
17Signed-off-by: Ting Liu <ting.liu@freescale.com>
18---
19 lib/hash_table/fman_crc64_hash_func.h | 2 +-
20 src/simple_crypto/include/simple_crypto.h | 10 +++++-----
21 src/simple_proto/include/simple_proto.h | 10 +++++-----
22 3 files changed, 11 insertions(+), 11 deletions(-)
23
24diff --git a/lib/hash_table/fman_crc64_hash_func.h b/lib/hash_table/fman_crc64_hash_func.h
25index 5095203..bdcf12b 100644
26--- a/lib/hash_table/fman_crc64_hash_func.h
27+++ b/lib/hash_table/fman_crc64_hash_func.h
28@@ -36,7 +36,7 @@
29 #include <fsl_fman.h>
30
31 /* Hash function used by the hash table based on FMan CRC64 */
32-inline uint32_t crc64_hash_function(uint8_t *key, uint32_t size)
33+static inline uint32_t crc64_hash_function(uint8_t *key, uint32_t size)
34 {
35 uint64_t hashval = 0;
36 hashval = fman_crc64_init();
37diff --git a/src/simple_crypto/include/simple_crypto.h b/src/simple_crypto/include/simple_crypto.h
38index bae3460..46ea176 100644
39--- a/src/simple_crypto/include/simple_crypto.h
40+++ b/src/simple_crypto/include/simple_crypto.h
41@@ -123,10 +123,10 @@ static int validate_test_set(struct test_param crypto_info);
42 void set_crypto_cbs(struct test_cb *crypto_cb, struct test_param crypto_info);
43 inline int get_num_of_iterations(void *stuff);
44 void set_num_of_iterations(void *stuff, unsigned int itr_num);
45-inline int get_num_of_buffers(void *stuff);
46-inline enum test_mode get_test_mode(void *stuff);
47-inline uint8_t requires_authentication(void *);
48-inline long get_num_of_cpus(void);
49-inline pthread_barrier_t *get_thread_barrier(void);
50+static inline int get_num_of_buffers(void *stuff);
51+static inline enum test_mode get_test_mode(void *stuff);
52+static inline uint8_t requires_authentication(void *);
53+static inline long get_num_of_cpus(void);
54+static inline pthread_barrier_t *get_thread_barrier(void);
55
56 #endif /* __SIMPLE_CRYPTO_H */
57diff --git a/src/simple_proto/include/simple_proto.h b/src/simple_proto/include/simple_proto.h
58index d413e70..ce0e842 100644
59--- a/src/simple_proto/include/simple_proto.h
60+++ b/src/simple_proto/include/simple_proto.h
61@@ -83,11 +83,11 @@ struct protocol_info *(*register_protocol[])(void) = {
62 static void set_crypto_cbs(struct test_cb *crypto_cb);
63 int get_num_of_iterations(void *params);
64 void set_num_of_iterations(void *params, unsigned int itr_num);
65-inline int get_num_of_buffers(void *params);
66-inline enum test_mode get_test_mode(void *params);
67-inline uint8_t requires_authentication(void *);
68-inline long get_num_of_cpus(void);
69-inline pthread_barrier_t *get_thread_barrier(void);
70+static inline int get_num_of_buffers(void *params);
71+static inline enum test_mode get_test_mode(void *params);
72+static inline uint8_t requires_authentication(void *);
73+static inline long get_num_of_cpus(void);
74+static inline pthread_barrier_t *get_thread_barrier(void);
75 int register_modules(void);
76 void unregister_modules(void);
77
78--
791.9.2
80
diff --git a/recipes-dpaa/usdpaa-apps/usdpaa-apps_git.bb b/recipes-dpaa/usdpaa-apps/usdpaa-apps_git.bb
index cf7910b..837c45a 100644
--- a/recipes-dpaa/usdpaa-apps/usdpaa-apps_git.bb
+++ b/recipes-dpaa/usdpaa-apps/usdpaa-apps_git.bb
@@ -14,7 +14,9 @@ RDEPENDS_${PN} = "libgcc bash"
14RDEPENDS_${PN}_append_b4860qds = " ipc-ust" 14RDEPENDS_${PN}_append_b4860qds = " ipc-ust"
15RDEPENDS_${PN}_append_b4420qds = " ipc-ust" 15RDEPENDS_${PN}_append_b4420qds = " ipc-ust"
16 16
17SRC_URI = "git://git.freescale.com/ppc/sdk/usdpaa/usdpaa-apps;nobranch=1" 17SRC_URI = "git://git.freescale.com/ppc/sdk/usdpaa/usdpaa-apps;nobranch=1 \
18 file://fix-the-inline-function-definition-with-gcc-5.x.patch \
19"
18SRCREV = "95744440cf214d73884c44c0dbc296e1e4b4c8f4" 20SRCREV = "95744440cf214d73884c44c0dbc296e1e4b4c8f4"
19 21
20S = "${WORKDIR}/git" 22S = "${WORKDIR}/git"