diff options
| author | Ting Liu <ting.liu@freescale.com> | 2015-12-22 14:08:57 +0800 |
|---|---|---|
| committer | Otavio Salvador <otavio@ossystems.com.br> | 2016-04-19 15:03:22 -0300 |
| commit | 7ff32dff9fac53afd4ad54595236881aa2496ac4 (patch) | |
| tree | 11434f26c6168c56184ffeb45f47870a1fa52a14 | |
| parent | f301302d391eaa01ff04910772049aed4619aa8d (diff) | |
| download | meta-freescale-7ff32dff9fac53afd4ad54595236881aa2496ac4.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.patch | 80 | ||||
| -rw-r--r-- | recipes-dpaa/usdpaa-apps/usdpaa-apps_git.bb | 4 |
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 000000000..9f3d22cc5 --- /dev/null +++ b/recipes-dpaa/usdpaa-apps/usdpaa-apps/fix-the-inline-function-definition-with-gcc-5.x.patch | |||
| @@ -0,0 +1,80 @@ | |||
| 1 | From 2b308217d2811e5d1420d7ce6e18f77a992f52e9 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Ting Liu <ting.liu@freescale.com> | ||
| 3 | Date: Tue, 22 Dec 2015 13:16:33 +0800 | ||
| 4 | Subject: [PATCH] fix the inline function definition with gcc 5.x | ||
| 5 | |||
| 6 | There are different semantics for inline functions for gcc-5.x compared to | ||
| 7 | previous 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 | |||
| 15 | Upstream-Status: Pending | ||
| 16 | |||
| 17 | Signed-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 | |||
| 24 | diff --git a/lib/hash_table/fman_crc64_hash_func.h b/lib/hash_table/fman_crc64_hash_func.h | ||
| 25 | index 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(); | ||
| 37 | diff --git a/src/simple_crypto/include/simple_crypto.h b/src/simple_crypto/include/simple_crypto.h | ||
| 38 | index 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 */ | ||
| 57 | diff --git a/src/simple_proto/include/simple_proto.h b/src/simple_proto/include/simple_proto.h | ||
| 58 | index 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 | -- | ||
| 79 | 1.9.2 | ||
| 80 | |||
diff --git a/recipes-dpaa/usdpaa-apps/usdpaa-apps_git.bb b/recipes-dpaa/usdpaa-apps/usdpaa-apps_git.bb index cf7910b8c..837c45af4 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" | |||
| 14 | RDEPENDS_${PN}_append_b4860qds = " ipc-ust" | 14 | RDEPENDS_${PN}_append_b4860qds = " ipc-ust" |
| 15 | RDEPENDS_${PN}_append_b4420qds = " ipc-ust" | 15 | RDEPENDS_${PN}_append_b4420qds = " ipc-ust" |
| 16 | 16 | ||
| 17 | SRC_URI = "git://git.freescale.com/ppc/sdk/usdpaa/usdpaa-apps;nobranch=1" | 17 | SRC_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 | " | ||
| 18 | SRCREV = "95744440cf214d73884c44c0dbc296e1e4b4c8f4" | 20 | SRCREV = "95744440cf214d73884c44c0dbc296e1e4b4c8f4" |
| 19 | 21 | ||
| 20 | S = "${WORKDIR}/git" | 22 | S = "${WORKDIR}/git" |
