Skip to contentSkip to conversation

musl: Update to latest

PATCH In review Khem Raj 2 participants 7 messages Sep 22, 2023 – Sep 25, 2023

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH v3 1/5 musl: Update to latest

Brings following bug fixes

* 79bdacff glob: fix wrong return code when aborting before any matches
* 7291c6c6 statvfs: allocate spare for f_type
* 39e43f08 math: fix ld80 powl(x,huge) and powl(LDBL_MAX,small)
* 6d101027 math: fix ld80 acoshl(x) for x < 0

Drop MIRRORS and switch to etalabs.net for git fetch URI original repo is not working correcting with git Fetcher

---
v3: Update SRC_URI to fetchable location

 meta/recipes-core/musl/musl_git.bb | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
meta/recipes-core/musl/musl_git.bb +2 -6
index 4a4fe978f93..7dd949ffafd 100644
@@ -4,21 +4,17 @@
 require musl.inc
 inherit linuxloader
 
-SRCREV = "83b858f83b658bd34eca5d8ad4d145f673ae7e5e"
+SRCREV = "79bdacff83a6bd5b70ff5ae5eb8b6de82c2f7c30"
 
 BASEVER = "1.2.4"
 
 PV = "${BASEVER}+git"
 
-# mirror is at git://github.com/kraj/musl.git
-
-SRC_URI = "git://git.musl-libc.org/git/musl.git;branch=master;protocol=https \
+SRC_URI = "git://git.etalabs.net/git/musl;branch=master;protocol=https \
            file://0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch \
            file://0002-ldso-Use-syslibdir-and-libdir-as-default-pathes-to-l.patch \
           "
 
-MIRRORS += "git://git.musl-libc.org/git/musl.git git://github.com/kraj/musl.git"
-
 S = "${WORKDIR}/git"
 
 PROVIDES += "virtual/libc virtual/libiconv virtual/libintl virtual/crypt"
Signature · 1 line
2.42.0
author
#1 lore raw

PATCH v3 2/5 bsd-headers: Define __CONCAT and __STRING

Sync with other musl distros

---
v3: Rebased

 meta/recipes-core/musl/bsd-headers/sys-cdefs.h | 8 ++++++++
 1 file changed, 8 insertions(+)
meta/recipes-core/musl/bsd-headers/sys-cdefs.h +8 -0
index 209a623c0f0..841a5da8ba4 100644
@@ -1,3 +1,6 @@
+#ifndef _SYS_CDEFS_H_
+#define _SYS_CDEFS_H_
+
 #warning usage of non-standard #include <sys/cdefs.h> is deprecated
 
 #undef __P
@@ -24,3 +27,8 @@
 # define __THROW
 # define __NTH(fct)     fct
 #endif
+
+#define __CONCAT(x,y)   x ## y
+#define __STRING(x)     #x
+
+#endif /* _SYS_CDEFS_H_ */
Signature · 1 line
2.42.0
author
#2 lore raw

PATCH v3 3/5 musl-legacy-error: Add recipe

In reply to Khem Raj

This adds glibc error() API implementation which is needed by few packages still.

---
v3: Added new

 meta/conf/distro/include/maintainers.inc      |  1 +
 meta/recipes-core/musl/musl-legacy-error.bb   | 26 ++++++++
 .../musl/musl-legacy-error/error.h            | 60 +++++++++++++++++++
 3 files changed, 87 insertions(+)
 create mode 100644 meta/recipes-core/musl/musl-legacy-error.bb
 create mode 100644 meta/recipes-core/musl/musl-legacy-error/error.h
meta/conf/distro/include/maintainers.inc +1 -0
index e977c84fc82..f69f229fc85 100644
@@ -531,6 +531,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-legacy-error = "Khem Raj <[email protected]>"
 RECIPE_MAINTAINER:pn-musl-locales = "Khem Raj <[email protected]>"
 RECIPE_MAINTAINER:pn-musl-obstack = "Khem Raj <[email protected]>"
 RECIPE_MAINTAINER:pn-musl-utils = "Khem Raj <[email protected]>"
meta/recipes-core/musl/musl-legacy-error.bb new file +26 -0
new file mode 100644
index 00000000000..5ce5a233ab1
@@ -0,0 +1,26 @@
+# Copyright (C) 2023 Khem Raj <[email protected]>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+SUMMARY = "error API GNU extention implementation"
+LICENSE = "BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://error.h;beginline=1;md5=2ee396b23e8507fbf8f98af0471a77c6"
+SECTION = "devel"
+
+SRC_URI = "file://error.h"
+
+do_configure[noexec] = "1"
+do_compile[noexec] = "1"
+
+INHIBIT_DEFAULT_DEPS = "1"
+
+S = "${WORKDIR}"
+
+do_install() {
+	install -Dm 0644 ${S}/error.h -t ${D}${includedir}
+}
+#
+# We will skip parsing for non-musl systems
+#
+COMPATIBLE_HOST = ".*-musl.*"
+DEV_PKG_DEPENDENCY = ""
+RRECOMMENDS:${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})"
meta/recipes-core/musl/musl-legacy-error/error.h new file +60 -0

60 lines not on this page · raw message

Signature · 1 line
2.42.0
author
#3 lore raw

PATCH 4/5 elfutils: Depend on musl-legacy-error for musl targets

In reply to Khem Raj

this ensures a gnu compatible error APIs are made available, the patch to workaround this is no longer needed.

---
v3: Added

 .../elfutils/elfutils_0.189.bb                |  3 +-
 .../0015-config-eu.am-do-not-use-Werror.patch | 37 -------------------
 2 files changed, 1 insertion(+), 39 deletions(-)
 delete mode 100644 meta/recipes-devtools/elfutils/files/0015-config-eu.am-do-not-use-Werror.patch
meta/recipes-devtools/elfutils/elfutils_0.189.bb +1 -2
index d6352de5cf5..d8bf82b0229 100644
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
                     file://debuginfod/debuginfod-client.c;endline=28;md5=f0a7c3170776866ee94e8f9225a6ad79 \
                     "
 DEPENDS = "zlib virtual/libintl"
-DEPENDS:append:libc-musl = " argp-standalone fts musl-obstack "
+DEPENDS:append:libc-musl = " argp-standalone fts musl-legacy-error musl-obstack"
 # The Debian patches below are from:
 # http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.176-1.debian.tar.xz
 SRC_URI = "https://sourceware.org/elfutils/ftp/${PV}/${BP}.tar.bz2 \
@@ -24,7 +24,6 @@ SRC_URI = "https://sourceware.org/elfutils/ftp/${PV}/${BP}.tar.bz2 \
            "
 SRC_URI:append:libc-musl = " \
            file://0003-musl-utils.patch \
-           file://0015-config-eu.am-do-not-use-Werror.patch \
            "
 SRC_URI[sha256sum] = "39bd8f1a338e2b7cd4abc3ff11a0eddc6e690f69578a57478d8179b4148708c8"
 
meta/recipes-devtools/elfutils/files/0015-config-eu.am-do-not-use-Werror.patch deleted +0 -37
deleted file mode 100644
index 9ee5801c561..00000000000
@@ -1,37 +0,0 @@
-From c209233857a73970d7a7dd8da664903570efc7ea Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <[email protected]>
-Date: Mon, 22 Jun 2020 21:35:16 +0000
-Subject: [PATCH] config/eu.am: do not use -Werror
-
-Due to re-definition of error() on musl, gcc starts throwing
-errors where none happen with glibc. Since upstream is not
-likely to be interested in musl builds, lets just disable
-Werror.
-
-Upstream-Status: Inappropriate [oe core specific]
-Signed-off-by: Alexander Kanavin <[email protected]>
-
----
- config/eu.am | 2 --
- 1 file changed, 2 deletions(-)
-diff --git a/config/eu.am b/config/eu.am
-index e6c241f..4136e7c 100644
---- a/config/eu.am
-+++ b/config/eu.am
-@@ -99,7 +99,6 @@ AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \
- 	    $(LOGICAL_OP_WARNING) $(DUPLICATED_COND_WARNING) \
- 	    $(NULL_DEREFERENCE_WARNING) $(IMPLICIT_FALLTHROUGH_WARNING) \
- 	    $(USE_AFTER_FREE3_WARNING) \
--	    $(if $($(*F)_no_Werror),,-Werror) \
- 	    $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
- 	    $(if $($(*F)_no_Wstack_usage),,$(STACK_USAGE_WARNING)) \
- 	    $(if $($(*F)_no_Wpacked_not_aligned),$(NO_PACKED_NOT_ALIGNED_WARNING),) \
-@@ -109,7 +108,6 @@ AM_CXXFLAGS = -std=c++11 -Wall -Wshadow \
- 	   $(TRAMPOLINES_WARNING) \
- 	   $(LOGICAL_OP_WARNING) $(DUPLICATED_COND_WARNING) \
- 	   $(NULL_DEREFERENCE_WARNING) $(IMPLICIT_FALLTHROUGH_WARNING) \
--	   $(if $($(*F)_no_Werror),,-Werror) \
- 	   $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
- 	   $(if $($(*F)_no_Wstack_usage),,$(STACK_USAGE_WARNING)) \
- 	   $(if $($(*F)_no_Wpacked_not_aligned),$(NO_PACKED_NOT_ALIGNED_WARNING),) \
--- 
Signature · 1 line
2.42.0
author
#4 lore raw

PATCH 5/5 debugedit: Use musl-legacy-error

In reply to Khem Raj

Use error.h to provide GNU extentions for error API Drop the patch trying to do something about it

---
v3: Added

 .../debugedit/debugedit_5.0.bb                |   4 +-
 ...tools-Add-error.h-for-non-glibc-case.patch | 102 ------------------
 2 files changed, 2 insertions(+), 104 deletions(-)
 delete mode 100644 meta/recipes-devtools/debugedit/files/0001-tools-Add-error.h-for-non-glibc-case.patch
meta/recipes-devtools/debugedit/debugedit_5.0.bb +2 -2
index 257238fa245..63ad7babd9a 100644
@@ -11,8 +11,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
 
 SRC_URI = "https://sourceware.org/ftp/debugedit/${PV}/debugedit-${PV}.tar.xz"
 
-SRC_URI:append:libc-musl = " \
-           file://0001-tools-Add-error.h-for-non-glibc-case.patch \
+SRC_URI:append:libc-musl = "\
            file://0002-sepdebugcrcfix.c-do-not-use-64bit-variants.patch \
            file://0003-Makefile.am-do-not-update-manual.patch \
            "
@@ -20,6 +19,7 @@ SRC_URI:append:libc-musl = " \
 SRC_URI[sha256sum] = "e9ecd7d350bebae1f178ce6776ca19a648b6fe8fa22f5b3044b38d7899aa553e"
 
 DEPENDS = "elfutils"
+DEPENDS:append:libc-musl = " musl-legacy-error"
 
 inherit pkgconfig autotools
 
meta/recipes-devtools/debugedit/files/0001-tools-Add-error.h-for-non-glibc-case.patch deleted +0 -102

102 lines not on this page · raw message

Signature · 1 line
2.42.0
#5 lore raw
In reply to Khem Raj

Hello,

I had this with the series:

https://autobuilder.yoctoproject.org/typhoon/#/builders/64/builds/7848/steps/12/logs/stdio
https://autobuilder.yoctoproject.org/typhoon/#/builders/45/builds/7876/steps/12/logs/stdio

make[2]: Entering directory '/home/root/buildtest/cpio-2.13/rmt'
CC rmt.o
CCLD rmt
/usr/lib/gcc/i686-poky-linux-musl/13.2.0/../../../../i686-poky-linux-musl/bin/ld: rmt.o: in function `parse_opt':
/home/root/buildtest/cpio-2.13/rmt/rmt.c:715:(.text+0x190): undefined reference to error' /usr/lib/gcc/i686-poky-linux-musl/13.2.0/../../../../i686-poky-linux-musl/bin/ld: rmt.o: in function main':
/home/root/buildtest/cpio-2.13/rmt/rmt.c:780:(.text.startup+0x170): undefined reference to error' /usr/lib/gcc/i686-poky-linux-musl/13.2.0/../../../../i686-poky-linux-musl/bin/ld: /home/root/buildtest/cpio-2.13/rmt/rmt.c:783:(.text.startup+0x7af): undefined reference to error'
collect2: error: ld returned 1 exit status
make[2]: Leaving directory '/home/root/buildtest/cpio-2.13/rmt'
make[2]: *** [Makefile:1221: rmt] Error 1
make[1]: *** [Makefile:1282: all-recursive] Error 1
make[1]: Leaving directory '/home/root/buildtest/cpio-2.13'
make: *** [Makefile:1222: all] Error 2

Quoted 58 lines · Khem Raj

Brings following bug fixes

* 79bdacff glob: fix wrong return code when aborting before any matches
* 7291c6c6 statvfs: allocate spare for f_type
* 39e43f08 math: fix ld80 powl(x,huge) and powl(LDBL_MAX,small)
* 6d101027 math: fix ld80 acoshl(x) for x < 0

Drop MIRRORS and switch to etalabs.net for git fetch URI original repo is not working correcting with git Fetcher

---
v3: Update SRC_URI to fetchable location

 meta/recipes-core/musl/musl_git.bb | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
meta/recipes-core/musl/musl_git.bb +2 -6
index 4a4fe978f93..7dd949ffafd 100644
@@ -4,21 +4,17 @@
 require musl.inc
 inherit linuxloader
 
-SRCREV = "83b858f83b658bd34eca5d8ad4d145f673ae7e5e"
+SRCREV = "79bdacff83a6bd5b70ff5ae5eb8b6de82c2f7c30"
 
 BASEVER = "1.2.4"
 
 PV = "${BASEVER}+git"
 
-# mirror is at git://github.com/kraj/musl.git
-
-SRC_URI = "git://git.musl-libc.org/git/musl.git;branch=master;protocol=https \
+SRC_URI = "git://git.etalabs.net/git/musl;branch=master;protocol=https \
            file://0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch \
            file://0002-ldso-Use-syslibdir-and-libdir-as-default-pathes-to-l.patch \
           "
 
-MIRRORS += "git://git.musl-libc.org/git/musl.git git://github.com/kraj/musl.git"
-
 S = "${WORKDIR}/git"
 
 PROVIDES += "virtual/libc virtual/libiconv virtual/libintl virtual/crypt"
Signature · 11 lines
2.42.0



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#188133): https://lists.openembedded.org/g/openembedded-core/message/188133
Mute This Topic: https://lists.openembedded.org/mt/101529915/3617179
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Signature · 3 lines
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
author
#6 lore raw
Quoted 8 lines · Alexandre Belloni

Hello,

I had this with the series:

https://autobuilder.yoctoproject.org/typhoon/#/builders/64/builds/7848/steps/12/logs/stdio
https://autobuilder.yoctoproject.org/typhoon/#/builders/45/builds/7876/steps/12/logs/stdio

Quoted 16 lines

make[2]: Entering directory '/home/root/buildtest/cpio-2.13/rmt'
CC rmt.o
CCLD rmt
/usr/lib/gcc/i686-poky-linux-musl/13.2.0/../../../../i686-poky-linux-musl/bin/ld: rmt.o: in function `parse_opt':
/home/root/buildtest/cpio-2.13/rmt/rmt.c:715:(.text+0x190): undefined reference to error' /usr/lib/gcc/i686-poky-linux-musl/13.2.0/../../../../i686-poky-linux-musl/bin/ld: rmt.o: in function main':
/home/root/buildtest/cpio-2.13/rmt/rmt.c:780:(.text.startup+0x170): undefined reference to error' /usr/lib/gcc/i686-poky-linux-musl/13.2.0/../../../../i686-poky-linux-musl/bin/ld: /home/root/buildtest/cpio-2.13/rmt/rmt.c:783:(.text.startup+0x7af): undefined reference to error'
collect2: error: ld returned 1 exit status
make[2]: Leaving directory '/home/root/buildtest/cpio-2.13/rmt'
make[2]: *** [Makefile:1221: rmt] Error 1
make[1]: *** [Makefile:1282: all-recursive] Error 1
make[1]: Leaving directory '/home/root/buildtest/cpio-2.13'
make: *** [Makefile:1222: all] Error 2

Please cherry-pick -
https://patchwork.yoctoproject.org/project/oe-core/patch/[email protected]/
on top

Quoted 66 lines · Khem Raj
Quoted 50 lines

Brings following bug fixes

* 79bdacff glob: fix wrong return code when aborting before any matches
* 7291c6c6 statvfs: allocate spare for f_type
* 39e43f08 math: fix ld80 powl(x,huge) and powl(LDBL_MAX,small)
* 6d101027 math: fix ld80 acoshl(x) for x < 0

Drop MIRRORS and switch to etalabs.net for git fetch URI original repo is not working correcting with git Fetcher

---
v3: Update SRC_URI to fetchable location

 meta/recipes-core/musl/musl_git.bb | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
meta/recipes-core/musl/musl_git.bb +2 -7
index 4a4fe978f93..7dd949ffafd 100644
@@ -4,21 +4,17 @@
 require musl.inc
 inherit linuxloader
 
-SRCREV = "83b858f83b658bd34eca5d8ad4d145f673ae7e5e"
+SRCREV = "79bdacff83a6bd5b70ff5ae5eb8b6de82c2f7c30"
 
 BASEVER = "1.2.4"
 
 PV = "${BASEVER}+git"
 
-# mirror is at git://github.com/kraj/musl.git
-
-SRC_URI = "git://git.musl-libc.org/git/musl.git;branch=master;protocol=https \
+SRC_URI = "git://git.etalabs.net/git/musl;branch=master;protocol=https \
            file://0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch \
            file://0002-ldso-Use-syslibdir-and-libdir-as-default-pathes-to-l.patch \
           "
 
-MIRRORS += "git://git.musl-libc.org/git/musl.git git://github.com/kraj/musl.git"
-
 S = "${WORKDIR}/git"
 
 PROVIDES += "virtual/libc virtual/libiconv virtual/libintl virtual/crypt"
--

2.42.0

Quoted 8 lines

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#188133): https://lists.openembedded.org/g/openembedded-core/message/188133
Mute This Topic: https://lists.openembedded.org/mt/101529915/3617179
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com