diff options
author | Khem Raj <raj.khem@gmail.com> | 2017-03-20 22:02:55 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-03-22 11:35:22 +0000 |
commit | 853a1548507dd8bfc3362052cfee8e89e6b51b33 (patch) | |
tree | 2bc0f415db3e11f4643a417112936a72d072f733 | |
parent | 6786f662cd4a081c041f352118cd0d43e39f8270 (diff) | |
download | poky-853a1548507dd8bfc3362052cfee8e89e6b51b33.tar.gz |
libcomps: Fix/optimize building with clang
(From OE-Core rev: aa30853693a8b6092e1ea9785d64267858454d17)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-devtools/libcomps/libcomps/0001-Make-__comps_objmrtree_all-static-inline.patch | 35 | ||||
-rw-r--r-- | meta/recipes-devtools/libcomps/libcomps_git.bb | 1 |
2 files changed, 36 insertions, 0 deletions
diff --git a/meta/recipes-devtools/libcomps/libcomps/0001-Make-__comps_objmrtree_all-static-inline.patch b/meta/recipes-devtools/libcomps/libcomps/0001-Make-__comps_objmrtree_all-static-inline.patch new file mode 100644 index 0000000000..88469fb331 --- /dev/null +++ b/meta/recipes-devtools/libcomps/libcomps/0001-Make-__comps_objmrtree_all-static-inline.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | From 91a324f8771818b81017fdf4daaad0c8c4b6987c Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Mon, 20 Mar 2017 11:38:54 -0700 | ||
4 | Subject: [PATCH] Make __comps_objmrtree_all() static inline | ||
5 | |||
6 | This helps compilers to scope the symbol correctly | ||
7 | and apply the inlining optimizations, clang e.g. | ||
8 | emits the functions and calls in code which is | ||
9 | suboptimal, therefore give a little help to compiler | ||
10 | this function is not used anywhere else to have | ||
11 | a global scope. | ||
12 | |||
13 | Upstream-Status: Pending | ||
14 | |||
15 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
16 | --- | ||
17 | libcomps/src/comps_objmradix.c | 2 +- | ||
18 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
19 | |||
20 | diff --git a/libcomps/src/comps_objmradix.c b/libcomps/src/comps_objmradix.c | ||
21 | index 9be6648..55f7793 100644 | ||
22 | --- a/libcomps/src/comps_objmradix.c | ||
23 | +++ b/libcomps/src/comps_objmradix.c | ||
24 | @@ -604,7 +604,7 @@ inline void comps_objmrtree_pair_destroy_v(void * pair) { | ||
25 | free(pair); | ||
26 | } | ||
27 | |||
28 | -inline COMPS_HSList* __comps_objmrtree_all(COMPS_ObjMRTree * rt, char keyvalpair) { | ||
29 | +static inline COMPS_HSList* __comps_objmrtree_all(COMPS_ObjMRTree * rt, char keyvalpair) { | ||
30 | COMPS_HSList *to_process, *ret; | ||
31 | COMPS_HSListItem *hsit, *oldit; | ||
32 | size_t x; | ||
33 | -- | ||
34 | 2.12.0 | ||
35 | |||
diff --git a/meta/recipes-devtools/libcomps/libcomps_git.bb b/meta/recipes-devtools/libcomps/libcomps_git.bb index 8ff13b26b6..db4481bc8c 100644 --- a/meta/recipes-devtools/libcomps/libcomps_git.bb +++ b/meta/recipes-devtools/libcomps/libcomps_git.bb | |||
@@ -5,6 +5,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" | |||
5 | SRC_URI = "git://github.com/rpm-software-management/libcomps.git \ | 5 | SRC_URI = "git://github.com/rpm-software-management/libcomps.git \ |
6 | file://0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch \ | 6 | file://0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch \ |
7 | file://0002-Set-library-installation-path-correctly.patch \ | 7 | file://0002-Set-library-installation-path-correctly.patch \ |
8 | file://0001-Make-__comps_objmrtree_all-static-inline.patch \ | ||
8 | " | 9 | " |
9 | 10 | ||
10 | PV = "0.1.8+git${SRCPV}" | 11 | PV = "0.1.8+git${SRCPV}" |