* [PATCH 0/1] Fix ltp build failure with gcc 5
@ 2015-09-25 4:30 kai.kang
2015-09-25 4:30 ` [PATCH 1/1] ltp: replace 'inline' with 'static inline' for gcc 5.x kai.kang
0 siblings, 1 reply; 2+ messages in thread
From: kai.kang @ 2015-09-25 4:30 UTC (permalink / raw)
To: openembedded-core
From: Kai Kang <kai.kang@windriver.com>
Found and test with configure:
SELECTED_OPTIMIZATION="-O0 -fno-omit-frame-pointer -g -pipe"
The following changes since commit 5a51fb28dbdfcae8ceb503a5290532dd38aeb09f:
bitbake: prserv/serv: Start/Stop daemon using ip instead of host (2015-09-24 17:55:05 +0100)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib kangkai/ltp
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=kangkai/ltp
Kai Kang (1):
ltp: replace 'inline' with 'static inline' for gcc 5.x
...ace-inline-with-static-inline-for-gcc-5.x.patch | 69 ++++++++++++++++++++++
meta/recipes-extended/ltp/ltp_20150420.bb | 1 +
2 files changed, 70 insertions(+)
create mode 100644 meta/recipes-extended/ltp/ltp/0001-replace-inline-with-static-inline-for-gcc-5.x.patch
--
2.6.0.rc2.10.gf4d9753
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 1/1] ltp: replace 'inline' with 'static inline' for gcc 5.x
2015-09-25 4:30 [PATCH 0/1] Fix ltp build failure with gcc 5 kai.kang
@ 2015-09-25 4:30 ` kai.kang
0 siblings, 0 replies; 2+ messages in thread
From: kai.kang @ 2015-09-25 4:30 UTC (permalink / raw)
To: openembedded-core
From: Kai Kang <kai.kang@windriver.com>
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"
Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
...ace-inline-with-static-inline-for-gcc-5.x.patch | 69 ++++++++++++++++++++++
meta/recipes-extended/ltp/ltp_20150420.bb | 1 +
2 files changed, 70 insertions(+)
create mode 100644 meta/recipes-extended/ltp/ltp/0001-replace-inline-with-static-inline-for-gcc-5.x.patch
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 0000000..0b594dc
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0001-replace-inline-with-static-inline-for-gcc-5.x.patch
@@ -0,0 +1,69 @@
+Upstream-Status: Backport [From https://github.com/linux-test-project/ltp/commit/40a2457cb8ec42a05a2f96b0810057efdb2a55f5]
+
+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.
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+ testcases/kernel/controllers/libcontrollers/libcontrollers.c | 2 +-
+ testcases/kernel/controllers/libcontrollers/libcontrollers.h | 2 +-
+ testcases/kernel/syscalls/kill/kill10.c | 4 ++--
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/testcases/kernel/controllers/libcontrollers/libcontrollers.c b/testcases/kernel/controllers/libcontrollers/libcontrollers.c
+index b01e1b8..8857bc9 100644
+--- a/testcases/kernel/controllers/libcontrollers/libcontrollers.c
++++ b/testcases/kernel/controllers/libcontrollers/libcontrollers.c
+@@ -146,7 +146,7 @@ int read_file(char *filepath, int action, unsigned int *value)
+ * Prints error message and returns -1
+ */
+
+-inline int error_function(char *msg1, char *msg2)
++static inline int error_function(char *msg1, char *msg2)
+ {
+ fprintf(stdout, "ERROR: %s ", msg1);
+ fprintf(stdout, "%s\n", msg2);
+diff --git a/testcases/kernel/controllers/libcontrollers/libcontrollers.h b/testcases/kernel/controllers/libcontrollers/libcontrollers.h
+index 4001555..a1a0dfa 100644
+--- a/testcases/kernel/controllers/libcontrollers/libcontrollers.h
++++ b/testcases/kernel/controllers/libcontrollers/libcontrollers.h
+@@ -70,7 +70,7 @@ enum{
+ GET_TASKS
+ };
+
+-inline int error_function(char *msg1, char *msg2);
++static inline int error_function(char *msg1, char *msg2);
+
+ unsigned int read_shares_file (char *filepath);
+
+diff --git a/testcases/kernel/syscalls/kill/kill10.c b/testcases/kernel/syscalls/kill/kill10.c
+index 982d9da..33dbcd3 100644
+--- a/testcases/kernel/syscalls/kill/kill10.c
++++ b/testcases/kernel/syscalls/kill/kill10.c
+@@ -185,7 +185,7 @@ int child_checklist_total = 0;
+ int checklist_cmp(const void *a, const void *b);
+ void checklist_reset(int bit);
+
+-inline int k_sigaction(int sig, struct sigaction *sa, struct sigaction *osa);
++static inline int k_sigaction(int sig, struct sigaction *sa, struct sigaction *osa);
+
+ char *TCID = "kill10";
+ int TST_TOTAL = 1;
+@@ -756,7 +756,7 @@ void checklist_reset(int bit)
+
+ }
+
+-inline int k_sigaction(int sig, struct sigaction *sa, struct sigaction *osa)
++static inline int k_sigaction(int sig, struct sigaction *sa, struct sigaction *osa)
+ {
+ int ret;
+ if ((ret = sigaction(sig, sa, osa)) == -1) {
+---
+-1.9.1
+-
diff --git a/meta/recipes-extended/ltp/ltp_20150420.bb b/meta/recipes-extended/ltp/ltp_20150420.bb
index 108ebf1..ed46b5e 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 \
file://add-knob-for-numa.patch \
file://add-knob-for-tirpc.patch \
file://0001-ltp-vma03-fix-the-alginment-of-page-size.patch \
+ file://0001-replace-inline-with-static-inline-for-gcc-5.x.patch \
"
S = "${WORKDIR}/git"
--
2.6.0.rc2.10.gf4d9753
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-09-25 4:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-25 4:30 [PATCH 0/1] Fix ltp build failure with gcc 5 kai.kang
2015-09-25 4:30 ` [PATCH 1/1] ltp: replace 'inline' with 'static inline' for gcc 5.x kai.kang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.