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-21 22:43:04 +0000 |
commit | aa30853693a8b6092e1ea9785d64267858454d17 (patch) | |
tree | cd537de9615c335dae33f1c74c7a40471ba252e9 /meta/recipes-devtools | |
parent | cde30d70b04eb66bff66a351ddf733022e98ddab (diff) | |
download | openembedded-core-aa30853693a8b6092e1ea9785d64267858454d17.tar.gz openembedded-core-aa30853693a8b6092e1ea9785d64267858454d17.tar.bz2 openembedded-core-aa30853693a8b6092e1ea9785d64267858454d17.zip |
libcomps: Fix/optimize building with clang
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/recipes-devtools')
-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 @@ +From 91a324f8771818b81017fdf4daaad0c8c4b6987c Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 20 Mar 2017 11:38:54 -0700 +Subject: [PATCH] Make __comps_objmrtree_all() static inline + +This helps compilers to scope the symbol correctly +and apply the inlining optimizations, clang e.g. +emits the functions and calls in code which is +suboptimal, therefore give a little help to compiler +this function is not used anywhere else to have +a global scope. + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + libcomps/src/comps_objmradix.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libcomps/src/comps_objmradix.c b/libcomps/src/comps_objmradix.c +index 9be6648..55f7793 100644 +--- a/libcomps/src/comps_objmradix.c ++++ b/libcomps/src/comps_objmradix.c +@@ -604,7 +604,7 @@ inline void comps_objmrtree_pair_destroy_v(void * pair) { + free(pair); + } + +-inline COMPS_HSList* __comps_objmrtree_all(COMPS_ObjMRTree * rt, char keyvalpair) { ++static inline COMPS_HSList* __comps_objmrtree_all(COMPS_ObjMRTree * rt, char keyvalpair) { + COMPS_HSList *to_process, *ret; + COMPS_HSListItem *hsit, *oldit; + size_t x; +-- +2.12.0 + 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" SRC_URI = "git://github.com/rpm-software-management/libcomps.git \ file://0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch \ file://0002-Set-library-installation-path-correctly.patch \ + file://0001-Make-__comps_objmrtree_all-static-inline.patch \ " PV = "0.1.8+git${SRCPV}" |