musl-obstack: Add recipe
PATCH 1/3 musl-obstack: Add recipe
obstacks from GNUlib is used in some OE-Core packages e.g. elfutils and other packages outside OE-Core, this recipe helps provide this functionality standalone on musl systems, and helps in getting full versions of dependent packages
--- meta/recipes-core/musl/musl-obstack.bb | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 meta/recipes-core/musl/musl-obstack.bb
meta/recipes-core/musl/musl-obstack.bb new file +22 -0
@@ -0,0 +1,22 @@ +# Copyright (C) 2019 Khem Raj <[email protected]> +# Released under the MIT license (see COPYING.MIT for the terms) + +SUMMARY = "A standalone library to implement GNU libc's obstack" +DESCRIPTION = "copy + paste of the obstack functions and macros found in GNU gcc libiberty library for use with musl libc" +HOMEPAGE = "https://github.com/pullmoll/musl-obstack" +LICENSE = "GPL-2.0+" +LIC_FILES_CHKSUM = "file://COPYING;md5=3d23e4eef8243efcaab6f0a438078932" +SECTION = "libs" + +PV = "1.1" +SRCREV = "d2ad66b0df44a4b784956f7f7f2717131ddc05f4" +SRC_URI = "git://github.com/pullmoll/musl-obstack" + +UPSTREAM_CHECK_COMMITS = "1" + +inherit autotools + +S = "${WORKDIR}/git" + +COMPATIBLE_HOST = ".*-musl.*" +
Signature · 1 line
2.21.0
PATCH 2/3 maintainers: Account for musl-obstack and libssp-nonshared
--- meta/conf/distro/include/maintainers.inc | 2 ++ 1 file changed, 2 insertions(+)
meta/conf/distro/include/maintainers.inc +2 -0
@@ -382,6 +382,7 @@ RECIPE_MAINTAINER_pn-libsm = "Armin Kuster <[email protected]>" RECIPE_MAINTAINER_pn-libsndfile1 = "Tanu Kaskinen <[email protected]>" RECIPE_MAINTAINER_pn-libsolv = "Anuj Mittal <[email protected]>" RECIPE_MAINTAINER_pn-libsoup-2.4 = "Anuj Mittal <[email protected]>" +RECIPE_MAINTAINER_pn-libssp-nonshared = "Khem Raj <[email protected]>" RECIPE_MAINTAINER_pn-libtasn1 = "Anuj Mittal <[email protected]>" RECIPE_MAINTAINER_pn-libtest-needs-perl = "Tim Orling <[email protected]>" RECIPE_MAINTAINER_pn-libtheora = "Alexander Kanavin <[email protected]>"
@@ -512,6 +513,7 @@ RECIPE_MAINTAINER_pn-mtd-utils = "Denys Dmytriyenko <[email protected]>" RECIPE_MAINTAINER_pn-mtdev = "Anuj Mittal <[email protected]>" RECIPE_MAINTAINER_pn-mtools = "Anuj Mittal <[email protected]>" RECIPE_MAINTAINER_pn-musl = "Khem Raj <[email protected]>" +RECIPE_MAINTAINER_pn-musl-obstack = "Khem Raj <[email protected]>" RECIPE_MAINTAINER_pn-musl-utils = "Khem Raj <[email protected]>" RECIPE_MAINTAINER_pn-mx-1.0 = "Anuj Mittal <[email protected]>" RECIPE_MAINTAINER_pn-nasm = "Richard Purdie <[email protected]>"
Signature · 1 line
2.21.0
PATCH 3/3 elfutils: Fix eu-* utils builds for musl
In reply to Khem RajRe-organize the musl patches in three different areas namely libs, utils and tests, this will help maintain them in future version bumps
Add obstack dependency on musl targets which is needed for eu-*
PN and PN-binutils is not empty anymore on musl
---
.../elfutils/elfutils_0.176.bb | 15 +-
...-err-variable-and-function-conflicts.patch | 91 --------
...ternatives-for-glibc-assumptions-hel.patch | 196 ------------------
.../elfutils/files/musl-libs.patch | 111 ++++++++++
.../elfutils/files/musl-obstack-fts.patch | 105 ++++++++++
.../files/{musl.patch => musl-tests.patch} | 0
.../elfutils/files/musl-utils.patch | 136 ++++++++++++
7 files changed, 359 insertions(+), 295 deletions(-)
delete mode 100644 meta/recipes-devtools/elfutils/files/0001-fix-err-variable-and-function-conflicts.patch
delete mode 100644 meta/recipes-devtools/elfutils/files/0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch
create mode 100644 meta/recipes-devtools/elfutils/files/musl-libs.patch
create mode 100644 meta/recipes-devtools/elfutils/files/musl-obstack-fts.patch
rename meta/recipes-devtools/elfutils/files/{musl.patch => musl-tests.patch} (100%)
create mode 100644 meta/recipes-devtools/elfutils/files/musl-utils.patchmeta/recipes-devtools/elfutils/elfutils_0.176.bb +7 -8
@@ -4,7 +4,7 @@ SECTION = "base" LICENSE = "GPLv2 & LGPLv3+ & GPLv3+" LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" DEPENDS = "libtool bzip2 zlib virtual/libintl" -DEPENDS_append_libc-musl = " argp-standalone fts " +DEPENDS_append_libc-musl = " argp-standalone fts musl-obstack " # The Debian patches below are from: # http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.175-1.debian.tar.xz SRC_URI = "https://sourceware.org/elfutils/ftp/${PV}/${BP}.tar.bz2 \
@@ -31,12 +31,13 @@ SRC_URI = "https://sourceware.org/elfutils/ftp/${PV}/${BP}.tar.bz2 \ file://0001-skip-the-test-when-gcc-not-deployed.patch \ file://run-ptest \ file://ptest.patch \ - file://musl.patch \ " -SRC_URI_append_libc-musl = " file://0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch \ - file://0001-fix-err-variable-and-function-conflicts.patch \ -" - +SRC_URI_append_libc-musl = " \ + file://musl-obstack-fts.patch \ + file://musl-libs.patch \ + file://musl-utils.patch \ + file://musl-tests.patch \ + " SRC_URI[md5sum] = "077e4f49320cad82bf17a997068b1db9" SRC_URI[sha256sum] = "eb5747c371b0af0f71e86215a5ebb88728533c3a104a43d4231963f308cd1023"
@@ -73,8 +74,6 @@ do_install_ptest() { EXTRA_OEMAKE_class-native = "" EXTRA_OEMAKE_class-nativesdk = "" -ALLOW_EMPTY_${PN}_libc-musl = "1" - BBCLASSEXTEND = "native nativesdk" # Package utilities separately
meta/recipes-devtools/elfutils/files/0001-fix-err-variable-and-function-conflicts.patch deleted +0 -91
91 lines not on this page · raw message
meta/recipes-devtools/elfutils/files/0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch deleted +0 -196
196 lines not on this page · raw message
meta/recipes-devtools/elfutils/files/musl-libs.patch new file +111 -0
111 lines not on this page · raw message
meta/recipes-devtools/elfutils/files/musl-obstack-fts.patch new file +105 -0
105 lines not on this page · raw message
meta/recipes-devtools/elfutils/files/musl-tests.patch renamed from meta/recipes-devtools/elfutils/files/musl.patch +0 -0
meta/recipes-devtools/elfutils/files/musl-utils.patch new file +136 -0
136 lines not on this page · raw message
Signature · 1 line
2.21.0
Re: [PATCH 3/3] elfutils: Fix eu-* utils builds for musl
Quoted 7 lines · Khem Raj
...
PN and PN-binutils is not empty anymore on musl
...
++#if !defined(FNM_EXTMATCH)
++# defineFNM_EXTMATCH(1 << 5) /* Use ksh-like extended matching. */ ++#endif
...
This might fix the compilation, but it is horribly wrong.
It passes a flag to a function that this function does not understand.
In the best case the function returns with an error on unknown flags.
In the worst case the function does silently something different from what the caller expects it to do.
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon SeedRe: [PATCH 3/3] elfutils: Fix eu-* utils builds for musl
Quoted 10 lines · Adrian Bunk
Quoted 7 lines · Khem Raj
...
PN and PN-binutils is not empty anymore on musl
...
++#if !defined(FNM_EXTMATCH)
++# defineFNM_EXTMATCH(1 << 5) /* Use ksh-like extended matching. */ ++#endif
...
Quoted 9 lines
This might fix the compilation, but it is horribly wrong.
It passes a flag to a function that this function does not understand.
In the best case the function returns with an error on unknown flags.
In the worst case the function does silently something different from what the caller expects it to do.
I forgot that the API is provided by libc here so mimic'ing the define infact could
cause pain. I think its better to nullify it in this case where it is being used in these
files.
Quoted 10 lines
cu
Adrian--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
Re: [PATCH 3/3] elfutils: Fix eu-* utils builds for musl
Quoted 21 lines · Khem Raj
Quoted 10 lines · Adrian Bunk
Quoted 7 lines · Khem Raj
...
PN and PN-binutils is not empty anymore on musl
...
++#if !defined(FNM_EXTMATCH)
++# defineFNM_EXTMATCH(1 << 5) /* Use ksh-like extended matching. */ ++#endif
...Quoted 9 lines
This might fix the compilation, but it is horribly wrong.
It passes a flag to a function that this function does not understand.
In the best case the function returns with an error on unknown flags.
In the worst case the function does silently something different from what the caller expects it to do.
Quoted 5 lines
I forgot that the API is provided by libc here so mimic'ing the define infact could
cause pain. I think its better to nullify it in this case where it is being used in these
files.
Just looking at the usage in src/elfcompress.c, my first impression is that this tool is mostly useless without a properly working FNM_EXTMATCH.
Are the eu-* utils actually important in the cases where space is so limited that people are forced to use musl instead of glibc?
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon SeedRe: [PATCH 3/3] elfutils: Fix eu-* utils builds for musl
Quoted 29 lines · Adrian Bunk
Quoted 8 lines · Khem Raj
Quoted 7 lines · Adrian Bunk
Quoted 5 lines · Khem Raj
...
PN and PN-binutils is not empty anymore on musl
...
++#if !defined(FNM_EXTMATCH)
++# defineFNM_EXTMATCH(1 << 5) /* Use ksh-like extended matching.*/
Quoted 13 lines
Quoted 12 lines
Quoted 2 lines
++#endif
...This might fix the compilation, but it is horribly wrong.
It passes a flag to a function that this function does not understand.
In the best case the function returns with an error on unknown flags.
In the worst case the function does silently something different from what the caller expects it to do.
Quoted 5 lines
I forgot that the API is provided by libc here so mimic'ing the define infact could
cause pain. I think its better to nullify it in this case where it is being used in these
files.
Quoted 7 lines
Just looking at the usage in
src/elfcompress.c, my first impression is that this tool is mostly useless without a properly workingFNM_EXTMATCH.Are the eu-* utils actually important in the cases where space is so limited that people are forced to use musl instead of glibc?
They are primarily needed for testing and now we have good auto testing infra it would be good to build them
cu
Quoted 10 lines
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
Re: [PATCH 3/3] elfutils: Fix eu-* utils builds for musl
Quoted 34 lines · Khem Raj
Quoted 32 lines · Adrian Bunk
Quoted 8 lines · Khem Raj
Quoted 7 lines · Adrian Bunk
Quoted 5 lines · Khem Raj
...
PN and PN-binutils is not empty anymore on musl
...
++#if !defined(FNM_EXTMATCH)
++# defineFNM_EXTMATCH(1 << 5) /* Use ksh-like extended matching.*/
Quoted 13 lines
Quoted 12 lines
Quoted 2 lines
++#endif
...This might fix the compilation, but it is horribly wrong.
It passes a flag to a function that this function does not understand.
In the best case the function returns with an error on unknown flags.
In the worst case the function does silently something different from what the caller expects it to do.
Quoted 5 lines
I forgot that the API is provided by libc here so mimic'ing the define infact could
cause pain. I think its better to nullify it in this case where it is being used in these
files.Just looking at the usage in
src/elfcompress.c, my first impression is that this tool is mostly useless without a properly workingFNM_EXTMATCH.
Quoted 6 lines
Quoted 4 lines
Are the eu-* utils actually important in the cases where space is so limited that people are forced to use musl instead of glibc?
They are primarily needed for testing and now we have good auto testing infra it would be good to build them
Known-broken code is not a good basis for testing.
When I build elfutils locally on my x86_64 desktop and run "make check" all tests pass (with 3 skipped tests).
Adding
#undef FNM_EXTMATCH
#define FNM_EXTMATCH 0
to the defines in src/elfcompress.c gives me one test failure.
That could have easily been a day wasted by someone debugging why this test failed with musl.
If these tests are really important the fnmatch replacement from gnulib might help, similar to the other cases where missing functionality is added from gnulib to add functionality for musl builds (e.g. argp, fts).
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon SeedQuoted 10 lines · Khem Raj
obstacks from GNUlib is used in some OE-Core packages e.g. elfutils and other packages outside OE-Core, this recipe helps provide this functionality standalone on musl systems, and helps in getting full versions of dependent packages
Signed-off-by Khem Raj <[email protected]>--- meta/recipes-core/musl/musl-obstack.bb | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 meta/recipes-core/musl/musl-obstack.bb
https://autobuilder.yoctoproject.org/typhoon/#/builders/64/builds/623
Cheers,
Richard
Quoted 7 lines · Richard Purdie
Quoted 5 lines · Khem Raj
obstacks from GNUlib is used in some OE-Core packages e.g. elfutils and other packages outside OE-Core, this recipe helps provide this functionality standalone on musl systems, and helps in getting full versions of dependent packages
Quoted 8 lines
Quoted 5 lines
Signed-off-by Khem Raj <[email protected]>--- meta/recipes-core/musl/musl-obstack.bb | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 meta/recipes-core/musl/musl-obstack.bbhttps://autobuilder.yoctoproject.org/typhoon/#/builders/64/builds/623
this was due to missing pkgconfig inherit I believe. I have sent a v2 now see
https://patchwork.openembedded.org/patch/161515/
Quoted 4 lines
Cheers,
Richard