Misc Fixes
v2 cover Misc Fixes
Musl has some important fixes
distutils fix is taking care of some missed flags for C/C++ plugins, helps builds with PIE/PIC Systemd patch fix is found out by clang
v2:
Add gpgme fix
The following changes since commit a5439ff9627d309f6980947f5ee573d85e672228:
cpan.bbclass: make RPATH fix more general (2018-08-28 10:27:15 +0100)
are available in the Git repository at:
git://git.openembedded.org/openembedded-core-contrib kraj/pu
http://cgit.openembedded.org/openembedded-core-contrib/log/?h=kraj/pu
Khem Raj (4):
distutils-common-base.bbclass: Define commonly used compiler variables
systemd: Fix qsort_r patch for function return mismatch
musl: Update to latest
gpgme: Inherit distutils3-base
meta/classes/distutils-common-base.bbclass | 12 ++++++++++++ meta/recipes-core/musl/musl_git.bb | 2 +- .../0002-don-t-use-glibc-specific-qsort_r.patch | 16 ++++++++-------- meta/recipes-support/gpgme/gpgme_1.11.1.bb | 4 ++-- 4 files changed, 23 insertions(+), 11 deletions(-)
Signature · 1 line
2.18.0
PATCH v2 1/4 distutils-common-base.bbclass: Define commonly used compiler variables
This is inspired from
https://github.com/python/cpython/blob/master/configure.ac
Helps cross compiling python C modules in some cases where they do not respect normal CFLAGS
Errors like using gcc to link when compiler is clang is fixed
--- meta/classes/distutils-common-base.bbclass | 12 ++++++++++++ 1 file changed, 12 insertions(+)
meta/classes/distutils-common-base.bbclass +12 -0
@@ -1,6 +1,18 @@ export STAGING_INCDIR export STAGING_LIBDIR +# LDSHARED is the ld *command* used to create shared library +export LDSHARED = "${CCLD} -shared" +# LDXXSHARED is the ld *command* used to create shared library of C++ +# objects +export LDCXXSHARED = "${CXX} -shared" +# CCSHARED are the C *flags* used to create objects to go into a shared +# library (module) +export CCSHARED = "-fPIC -DPIC" +# LINKFORSHARED are the flags passed to the $(CC) command that links +# the python executable +export LINKFORSHARED = "{SECURITY_CFLAGS} -Xlinker -export-dynamic" + FILES_${PN} += "${libdir}/* ${libdir}/${PYTHON_DIR}/*" FILES_${PN}-staticdev += "\
Signature · 1 line
2.18.0
PATCH v2 2/4 systemd: Fix qsort_r patch for function return mismatch
In reply to Khem Rajclang is fussy and complains that a valueless return is used from a function which should return a value
--- .../0002-don-t-use-glibc-specific-qsort_r.patch | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch +8 -8
@@ -1,7 +1,7 @@ -From d43faf6d253db789225b7c454c8f255fbc68857e Mon Sep 17 00:00:00 2001 +From d74a4de6daea5a511c2b5636bbb552c15b3a4ad9 Mon Sep 17 00:00:00 2001 From: Emil Renner Berthing <[email protected]> Date: Thu, 18 Sep 2014 15:24:56 +0200 -Subject: [PATCH 02/19] don't use glibc-specific qsort_r +Subject: [PATCH] don't use glibc-specific qsort_r Upstream-Status: Inappropriate [musl specific]
@@ -14,7 +14,7 @@ Signed-off-by: Khem Raj <[email protected]> 4 files changed, 37 insertions(+), 31 deletions(-) diff --git a/src/basic/format-table.c b/src/basic/format-table.c -index 94e796d1c..f7b4eade9 100644 +index 94e796d1ca..9b3f35c29a 100644 --- a/src/basic/format-table.c +++ b/src/basic/format-table.c @@ -745,29 +745,29 @@ static int cell_data_compare(TableData *a, size_t index_a, TableData *b, size_t
@@ -63,7 +63,7 @@ index 94e796d1c..f7b4eade9 100644 - qsort_r_safe(sorted, n_rows, sizeof(size_t), table_data_compare, t); + if (n_rows <= 1) -+ return; ++ return 0; + assert(sorted); + user_table = t; + qsort(sorted, n_rows, sizeof(size_t), table_data_compare);
@@ -72,7 +72,7 @@ index 94e796d1c..f7b4eade9 100644 if (t->display_map) diff --git a/src/basic/util.h b/src/basic/util.h -index 9699d228f..40eaf518c 100644 +index 9699d228f9..40eaf518cb 100644 --- a/src/basic/util.h +++ b/src/basic/util.h @@ -105,13 +105,6 @@ static inline void qsort_safe(void *base, size_t nmemb, size_t size, comparison_
@@ -90,7 +90,7 @@ index 9699d228f..40eaf518c 100644 /** * Normal memcpy requires src to be nonnull. We do nothing if n is 0. diff --git a/src/hwdb/hwdb.c b/src/hwdb/hwdb.c -index 317cad8a6..701d59a1e 100644 +index 317cad8a67..701d59a1eb 100644 --- a/src/hwdb/hwdb.c +++ b/src/hwdb/hwdb.c @@ -135,13 +135,12 @@ static void trie_free(struct trie *trie) {
@@ -135,7 +135,7 @@ index 317cad8a6..701d59a1e 100644 } diff --git a/src/udev/udevadm-hwdb.c b/src/udev/udevadm-hwdb.c -index 02408a428..491d367d1 100644 +index 02408a4285..491d367d12 100644 --- a/src/udev/udevadm-hwdb.c +++ b/src/udev/udevadm-hwdb.c @@ -114,13 +114,13 @@ static void trie_node_cleanup(struct trie_node *node) {
@@ -179,5 +179,5 @@ index 02408a428..491d367d1 100644 } -- -2.11.0 +2.18.0
Signature · 1 line
2.18.0
PATCH v2 3/4 musl: Update to latest
In reply to Khem RajImportant regression fixes for mips and pthreads
--- meta/recipes-core/musl/musl_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/musl/musl_git.bb +1 -1
@@ -3,7 +3,7 @@ require musl.inc -SRCREV = "1ad8138819ced49851e618c9c063aa0ffc86718c" +SRCREV = "767f7a1091af3a3dcee2f7a49d0713359a81961c" PV = "1.1.19+git${SRCPV}"
Signature · 1 line
2.18.0
PATCH v2 4/4 gpgme: Inherit distutils3-base
In reply to Khem Rajits building a module therefore its important to provide correct cross build environment, distutils3-base automatically inherits python3native this is seen when using clang where it tried to link with gcc since the environment falls back to builtin LDSHARED variable
--- meta/recipes-support/gpgme/gpgme_1.11.1.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta/recipes-support/gpgme/gpgme_1.11.1.bb +2 -2
@@ -48,8 +48,8 @@ LANGUAGES ?= "${DEFAULT_LANGUAGES}" LANGUAGES .= "${@bb.utils.contains('PACKAGECONFIG', 'python2', ' python2', '', d)}" LANGUAGES .= "${@bb.utils.contains('PACKAGECONFIG', 'python3', ' python3', '', d)}" -PYTHON_INHERIT = "${@bb.utils.contains('PACKAGECONFIG', 'python2', 'pythonnative', '', d)}" -PYTHON_INHERIT .= "${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3native', '', d)}" +PYTHON_INHERIT = "${@bb.utils.contains('PACKAGECONFIG', 'python2', ' distutils-base', '', d)}" +PYTHON_INHERIT .= "${@bb.utils.contains('PACKAGECONFIG', 'python3', ' distutils3-base', '', d)}" EXTRA_OECONF += '--enable-languages="${LANGUAGES}" \ --disable-gpgconf-test \
Signature · 1 line
2.18.0
Re: [PATCH 4/4] gpgme: Inherit distutils3-base
Hi Khem
Quoted 7 lines · Khem Raj
its building a module therefore its important to provide correct cross build environment, distutils3-base automatically inherits python3native this is seen when using clang where it tried to link with gcc since the environment falls back to builtin LDSHARED variable
Signed-off-by Khem Raj <[email protected]>
With this change I'm getting python3 pulled into images when using gpgme, which I really don't want. If I add:
(quoted diff) +0 -0
b/meta/recipes-support/gpgme/gpgme_1.11.1.bb
index ac9fccf..8b34aa3 100644
meta/recipes-support/gpgme/gpgme_1.11.1.bb +0 -0
@@ -50,6 +50,8 @@ LANGUAGES .= "${@bb.utils.contains('PACKAGECONFIG',
'python3', ' python3', '', d
PYTHON_INHERIT = "${@bb.utils.contains('PACKAGECONFIG', 'python2', '
distutils-base', '', d)}"
PYTHON_INHERIT .= "${@bb.utils.contains('PACKAGECONFIG', 'python3', '
distutils3-base', '', d)}"
+PYTHON_INHERIT_class-target = "${@bb.utils.contains('PACKAGECONFIG', 'python2', ' pythonnative', '', d)}" +PYTHON_INHERIT_class-target .= "${@bb.utils.contains('PACKAGECONFIG', 'python3', ' python3native', '', d)}"
EXTRA_OECONF += '--enable-languages="${LANGUAGES}" \
--disable-gpgconf-test \I avoid that runtime dep, but does that still work for clang?
Quoted 27 lines
--- meta/recipes-support/gpgme/gpgme_1.11.1.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)meta/recipes-support/gpgme/gpgme_1.11.1.bb +2
-3@@ -48,8 +48,8 @@ LANGUAGES ?= "${DEFAULT_LANGUAGES}" LANGUAGES .= "${@bb.utils.contains('PACKAGECONFIG', 'python2', ' python2', '', d)}" LANGUAGES .= "${@bb.utils.contains('PACKAGECONFIG', 'python3', ' python3', '', d)}" -PYTHON_INHERIT = "${@bb.utils.contains('PACKAGECONFIG', 'python2', 'pythonnative', '', d)}" -PYTHON_INHERIT .= "${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3native', '', d)}" +PYTHON_INHERIT = "${@bb.utils.contains('PACKAGECONFIG', 'python2', ' distutils-base', '', d)}" +PYTHON_INHERIT .= "${@bb.utils.contains('PACKAGECONFIG', 'python3', ' distutils3-base', '', d)}" EXTRA_OECONF += '--enable-languages="${LANGUAGES}" \ --disable-gpgconf-test \ --2.18.0
--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Signature · 1 line
Alex Kiernan
Re: [PATCH 4/4] gpgme: Inherit distutils3-base
No, it doesn't. but
inherit distutils-common-base python3native together will work and also drop the runtime dep on python
Quoted 69 lines · Alex Kiernan
Hi Khem
Quoted 7 lines · Khem Raj
its building a module therefore its important to provide correct cross build environment, distutils3-base automatically inherits python3native this is seen when using clang where it tried to link with gcc since the environment falls back to builtin LDSHARED variable
Signed-off-by Khem Raj <[email protected]>With this change I'm getting python3 pulled into images when using gpgme, which I really don't want. If I add:
meta/recipes-support/gpgme/gpgme_1.11.1.bb +0
-0@@ -50,6 +50,8 @@ LANGUAGES .= "${@bb.utils.contains('PACKAGECONFIG','python3', ' python3', '', d
PYTHON_INHERIT= "${@bb.utils.contains('PACKAGECONFIG', 'python2', '
distutils-base', '', d)}"
PYTHON_INHERIT.= "${@bb.utils.contains('PACKAGECONFIG', 'python3', '
distutils3-base', '', d)}"
+PYTHON_INHERIT_class-target = "${@bb.utils.contains('PACKAGECONFIG', 'python2', ' pythonnative', '', d)}" +PYTHON_INHERIT_class-target .= "${@bb.utils.contains('PACKAGECONFIG', 'python3', ' python3native', '', d)}"EXTRA_OECONF += '--enable-languages="${LANGUAGES}" \ --disable-gpgconf-test \I avoid that runtime dep, but does that still work for clang?
Quoted 22 lines
--- meta/recipes-support/gpgme/gpgme_1.11.1.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)meta/recipes-support/gpgme/gpgme_1.11.1.bb +2
-3@@ -48,8 +48,8 @@ LANGUAGES ?= "${DEFAULT_LANGUAGES}" LANGUAGES .= "${@bb.utils.contains('PACKAGECONFIG', 'python2', ' python2', '', d)}" LANGUAGES .= "${@bb.utils.contains('PACKAGECONFIG', 'python3', ' python3', '', d)}" -PYTHON_INHERIT = "${@bb.utils.contains('PACKAGECONFIG', 'python2', 'pythonnative', '', d)}" -PYTHON_INHERIT .= "${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3native', '', d)}" +PYTHON_INHERIT = "${@bb.utils.contains('PACKAGECONFIG', 'python2', ' distutils-base', '', d)}" +PYTHON_INHERIT .= "${@bb.utils.contains('PACKAGECONFIG', 'python3', ' distutils3-base', '', d)}" EXTRA_OECONF += '--enable-languages="${LANGUAGES}" \ --disable-gpgconf-test \ --2.18.0
Quoted 5 lines
--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core--
Alex Kiernan
Re: [PATCH 4/4] gpgme: Inherit distutils3-base
Thanks, that works for me. I'll get a patch posted.
Quoted 74 lines · Khem Raj
No, it doesn't. but
inherit distutils-common-base python3native together will work and also drop the runtime dep on pythonQuoted 69 lines · Alex Kiernan
Hi Khem
Quoted 7 lines · Khem Raj
its building a module therefore its important to provide correct cross build environment, distutils3-base automatically inherits python3native this is seen when using clang where it tried to link with gcc since the environment falls back to builtin LDSHARED variable
Signed-off-by Khem Raj <[email protected]>With this change I'm getting python3 pulled into images when using gpgme, which I really don't want. If I add:
meta/recipes-support/gpgme/gpgme_1.11.1.bb +0
-0@@ -50,6 +50,8 @@ LANGUAGES .= "${@bb.utils.contains('PACKAGECONFIG','python3', ' python3', '', d
PYTHON_INHERIT= "${@bb.utils.contains('PACKAGECONFIG', 'python2', '
distutils-base', '', d)}"
PYTHON_INHERIT.= "${@bb.utils.contains('PACKAGECONFIG', 'python3', '
distutils3-base', '', d)}"
+PYTHON_INHERIT_class-target = "${@bb.utils.contains('PACKAGECONFIG', 'python2', ' pythonnative', '', d)}" +PYTHON_INHERIT_class-target .= "${@bb.utils.contains('PACKAGECONFIG', 'python3', ' python3native', '', d)}"EXTRA_OECONF += '--enable-languages="${LANGUAGES}" \ --disable-gpgconf-test \I avoid that runtime dep, but does that still work for clang?
Quoted 22 lines
--- meta/recipes-support/gpgme/gpgme_1.11.1.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)meta/recipes-support/gpgme/gpgme_1.11.1.bb +2
-3@@ -48,8 +48,8 @@ LANGUAGES ?= "${DEFAULT_LANGUAGES}" LANGUAGES .= "${@bb.utils.contains('PACKAGECONFIG', 'python2', ' python2', '', d)}" LANGUAGES .= "${@bb.utils.contains('PACKAGECONFIG', 'python3', ' python3', '', d)}" -PYTHON_INHERIT = "${@bb.utils.contains('PACKAGECONFIG', 'python2', 'pythonnative', '', d)}" -PYTHON_INHERIT .= "${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3native', '', d)}" +PYTHON_INHERIT = "${@bb.utils.contains('PACKAGECONFIG', 'python2', ' distutils-base', '', d)}" +PYTHON_INHERIT .= "${@bb.utils.contains('PACKAGECONFIG', 'python3', ' distutils3-base', '', d)}" EXTRA_OECONF += '--enable-languages="${LANGUAGES}" \ --disable-gpgconf-test \ --2.18.0
Quoted 5 lines
--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core--
Alex Kiernan
Signature · 1 line
Alex Kiernan