summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended
diff options
context:
space:
mode:
authorKai Kang <kai.kang@windriver.com>2015-09-25 12:30:39 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-28 12:00:27 +0100
commit9028d9371a46c3e317d288b6368775c693ec71a2 (patch)
tree68b9d9801da4a0e21c7b7f040aedf3ee1a665e00 /meta/recipes-extended
parent5942dfec50c811da07105b4d062163796c65733a (diff)
downloadpoky-9028d9371a46c3e317d288b6368775c693ec71a2.tar.gz
ltp: replace 'inline' with 'static inline' for gcc 5.x
gcc 5.x defaults to -std=gnu11 instead of -std=gnu89 which causes semantics for inline functions changes. The standalone 'inline' causes error with gcc 5 such as: git/testcases/kernel/syscalls/kill/kill10.c:355: undefined reference to `k_sigaction' Replace inline with static inline to be compatible with both gcc 4 and 5. Found and test with configure: SELECTED_OPTIMIZATION="-O0 -fno-omit-frame-pointer -g -pipe" (From OE-Core rev: 90e28e33c408d1607ebe0afb0db97e39255395d1) Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended')
-rw-r--r--meta/recipes-extended/ltp/ltp/0001-replace-inline-with-static-inline-for-gcc-5.x.patch69
-rw-r--r--meta/recipes-extended/ltp/ltp_20150420.bb1
2 files changed, 70 insertions, 0 deletions
diff --git a/meta/recipes-extended/ltp/ltp/0001-replace-inline-with-static-inline-for-gcc-5.x.patch b/meta/recipes-extended/ltp/ltp/0001-replace-inline-with-static-inline-for-gcc-5.x.patch
new file mode 100644
index 0000000000..0b594dc550
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0001-replace-inline-with-static-inline-for-gcc-5.x.patch
@@ -0,0 +1,69 @@
1Upstream-Status: Backport [From https://github.com/linux-test-project/ltp/commit/40a2457cb8ec42a05a2f96b0810057efdb2a55f5]
2
3gcc 5.x defaults to -std=gnu11 instead of -std=gnu89 which causes
4semantics for inline functions changes.
5
6The standalone 'inline' causes error with gcc 5 such as:
7
8git/testcases/kernel/syscalls/kill/kill10.c:355: undefined reference to `k_sigaction'
9
10Replace inline with static inline to be compatible with both gcc 4 and 5.
11
12Signed-off-by: Kai Kang <kai.kang@windriver.com>
13---
14 testcases/kernel/controllers/libcontrollers/libcontrollers.c | 2 +-
15 testcases/kernel/controllers/libcontrollers/libcontrollers.h | 2 +-
16 testcases/kernel/syscalls/kill/kill10.c | 4 ++--
17 3 files changed, 4 insertions(+), 4 deletions(-)
18
19diff --git a/testcases/kernel/controllers/libcontrollers/libcontrollers.c b/testcases/kernel/controllers/libcontrollers/libcontrollers.c
20index b01e1b8..8857bc9 100644
21--- a/testcases/kernel/controllers/libcontrollers/libcontrollers.c
22+++ b/testcases/kernel/controllers/libcontrollers/libcontrollers.c
23@@ -146,7 +146,7 @@ int read_file(char *filepath, int action, unsigned int *value)
24 * Prints error message and returns -1
25 */
26
27-inline int error_function(char *msg1, char *msg2)
28+static inline int error_function(char *msg1, char *msg2)
29 {
30 fprintf(stdout, "ERROR: %s ", msg1);
31 fprintf(stdout, "%s\n", msg2);
32diff --git a/testcases/kernel/controllers/libcontrollers/libcontrollers.h b/testcases/kernel/controllers/libcontrollers/libcontrollers.h
33index 4001555..a1a0dfa 100644
34--- a/testcases/kernel/controllers/libcontrollers/libcontrollers.h
35+++ b/testcases/kernel/controllers/libcontrollers/libcontrollers.h
36@@ -70,7 +70,7 @@ enum{
37 GET_TASKS
38 };
39
40-inline int error_function(char *msg1, char *msg2);
41+static inline int error_function(char *msg1, char *msg2);
42
43 unsigned int read_shares_file (char *filepath);
44
45diff --git a/testcases/kernel/syscalls/kill/kill10.c b/testcases/kernel/syscalls/kill/kill10.c
46index 982d9da..33dbcd3 100644
47--- a/testcases/kernel/syscalls/kill/kill10.c
48+++ b/testcases/kernel/syscalls/kill/kill10.c
49@@ -185,7 +185,7 @@ int child_checklist_total = 0;
50 int checklist_cmp(const void *a, const void *b);
51 void checklist_reset(int bit);
52
53-inline int k_sigaction(int sig, struct sigaction *sa, struct sigaction *osa);
54+static inline int k_sigaction(int sig, struct sigaction *sa, struct sigaction *osa);
55
56 char *TCID = "kill10";
57 int TST_TOTAL = 1;
58@@ -756,7 +756,7 @@ void checklist_reset(int bit)
59
60 }
61
62-inline int k_sigaction(int sig, struct sigaction *sa, struct sigaction *osa)
63+static inline int k_sigaction(int sig, struct sigaction *sa, struct sigaction *osa)
64 {
65 int ret;
66 if ((ret = sigaction(sig, sa, osa)) == -1) {
67---
68-1.9.1
69-
diff --git a/meta/recipes-extended/ltp/ltp_20150420.bb b/meta/recipes-extended/ltp/ltp_20150420.bb
index 108ebf1e63..ed46b5e096 100644
--- a/meta/recipes-extended/ltp/ltp_20150420.bb
+++ b/meta/recipes-extended/ltp/ltp_20150420.bb
@@ -29,6 +29,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \
29 file://add-knob-for-numa.patch \ 29 file://add-knob-for-numa.patch \
30 file://add-knob-for-tirpc.patch \ 30 file://add-knob-for-tirpc.patch \
31 file://0001-ltp-vma03-fix-the-alginment-of-page-size.patch \ 31 file://0001-ltp-vma03-fix-the-alginment-of-page-size.patch \
32 file://0001-replace-inline-with-static-inline-for-gcc-5.x.patch \
32" 33"
33 34
34S = "${WORKDIR}/git" 35S = "${WORKDIR}/git"