Skip to contentSkip to conversation

musl: doesn't support riscv32

PATCH In review [email protected] 5 participants 9 messages Jan 17, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 musl: doesn't support riscv32

From: Ross Burton <[email protected]>

musl doesn't support riscv32, so set COMPATIBLE_HOST appropriately.

---
 meta/recipes-core/musl/musl.inc | 3 +++
 1 file changed, 3 insertions(+)
meta/recipes-core/musl/musl.inc +3 -0
index 66468e92ff0..6ca52b186a5 100644
@@ -25,6 +25,9 @@ MIPS_INSTRUCTION_SET = "mips"
 ARM_INSTRUCTION_SET:armv5 = "arm"
 ARM_INSTRUCTION_SET:armv4 = "arm"
 
+# 1.2.4 doesn't support riscv32
+COMPATIBLE_HOST:riscv32 = "null"
+
 # Enable out of tree build
 B = "${WORKDIR}/build"
 
Signature · 1 line
2.34.1
#1 lore raw

PATCH 2/4 libunwind: merge .inc and .bb

From: Ross Burton <[email protected]>

There's no need to these to be split, so merge them together.

---
 meta/recipes-support/libunwind/libunwind.inc  | 23 ---------------
 .../libunwind/libunwind_1.6.2.bb              | 28 +++++++++++++++++--
 2 files changed, 25 insertions(+), 26 deletions(-)
 delete mode 100644 meta/recipes-support/libunwind/libunwind.inc
meta/recipes-support/libunwind/libunwind.inc deleted +0 -23
deleted file mode 100644
index bf74f9fa3c7..00000000000
@@ -1,23 +0,0 @@
-SUMMARY = "Library for obtaining the call-chain of a program"
-DESCRIPTION = "a portable and efficient C programming interface (API) to determine the call-chain of a program"
-HOMEPAGE = "http://www.nongnu.org/libunwind"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=2d80c8ed4062b8339b715f90fa68cc9f"
-DEPENDS += "libatomic-ops"
-DEPENDS:append:libc-musl = " libucontext"
-
-inherit autotools multilib_header
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[lzma] = "--enable-minidebuginfo,--disable-minidebuginfo,xz"
-PACKAGECONFIG[latexdocs] = "--enable-documentation, --disable-documentation, latex2man-native"
-
-EXTRA_OECONF:arm = "--enable-debug-frame"
-EXTRA_OECONF:armeb = "--enable-debug-frame"
-EXTRA_OECONF:aarch64 = "--enable-debug-frame"
-
-do_install:append () {
-	oe_multilib_header libunwind.h
-}
-
-BBCLASSEXTEND = "native"
meta/recipes-support/libunwind/libunwind_1.6.2.bb +25 -3
index d67862608c1..650e2c9ec40 100644
@@ -1,4 +1,10 @@
-require libunwind.inc
+SUMMARY = "Library for obtaining the call-chain of a program"
+DESCRIPTION = "a portable and efficient C programming interface (API) to determine the call-chain of a program"
+HOMEPAGE = "http://www.nongnu.org/libunwind"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=2d80c8ed4062b8339b715f90fa68cc9f"
+DEPENDS += "libatomic-ops"
+DEPENDS:append:libc-musl = " libucontext"
 
 SRC_URI = "http://download.savannah.nongnu.org/releases/libunwind/libunwind-${PV}.tar.gz \
            file://0003-x86-Stub-out-x86_local_resume.patch \
@@ -11,15 +17,31 @@ SRC_URI:append:libc-musl = " file://musl-header-conflict.patch"
 
 SRC_URI[sha256sum] = "4a6aec666991fb45d0889c44aede8ad6eb108071c3554fcdff671f9c94794976"
 
+inherit autotools multilib_header
+
+COMPATIBLE_HOST:riscv32 = "null"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[lzma] = "--enable-minidebuginfo,--disable-minidebuginfo,xz"
+PACKAGECONFIG[latexdocs] = "--enable-documentation, --disable-documentation, latex2man-native"
+
+EXTRA_OECONF:arm = "--enable-debug-frame"
+EXTRA_OECONF:armeb = "--enable-debug-frame"
+EXTRA_OECONF:aarch64 = "--enable-debug-frame"
+
 EXTRA_OECONF:append:libc-musl = " --disable-documentation --disable-tests --enable-static"
 
 # http://errors.yoctoproject.org/Errors/Details/20487/
 ARM_INSTRUCTION_SET:armv4 = "arm"
 ARM_INSTRUCTION_SET:armv5 = "arm"
 
-COMPATIBLE_HOST:riscv32 = "null"
-
 LDFLAGS += "-Wl,-z,relro,-z,now ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
 
 SECURITY_LDFLAGS:append:libc-musl = " -lssp_nonshared"
 CACHED_CONFIGUREVARS:append:libc-musl = " LDFLAGS='${LDFLAGS} -lucontext'"
+
+do_install:append () {
+	oe_multilib_header libunwind.h
+}
+
+BBCLASSEXTEND = "native"
Signature · 1 line
2.34.1
#2 lore raw

Patchtest results for [PATCH 2/4] libunwind: merge .inc and .bb

Thank you for your submission. Patchtest identified one or more issues with the patch. Please see the log below for more information:

---
Testing patch /home/patchtest/share/mboxes/2-4-libunwind-merge-.inc-and-.bb.patch

FAIL: test lic files chksum modified not mentioned: LIC_FILES_CHKSUM changed without "License-Update:" tag and description in commit message (test_metadata.TestMetadata.test_lic_files_chksum_modified_not_mentioned)

PASS: pretest src uri left files (test_metadata.TestMetadata.pretest_src_uri_left_files)
PASS: test CVE check ignore (test_metadata.TestMetadata.test_cve_check_ignore)
PASS: test Signed-off-by presence (test_mbox.TestMbox.test_signed_off_by_presence)
PASS: test author valid (test_mbox.TestMbox.test_author_valid)
PASS: test commit message presence (test_mbox.TestMbox.test_commit_message_presence)
PASS: test max line length (test_metadata.TestMetadata.test_max_line_length)
PASS: test mbox format (test_mbox.TestMbox.test_mbox_format)
PASS: test non-AUH upgrade (test_mbox.TestMbox.test_non_auh_upgrade)
PASS: test shortlog format (test_mbox.TestMbox.test_shortlog_format)
PASS: test shortlog length (test_mbox.TestMbox.test_shortlog_length)
PASS: test src uri left files (test_metadata.TestMetadata.test_src_uri_left_files)

SKIP: pretest pylint: No python related patches, skipping test (test_python_pylint.PyLint.pretest_pylint)
SKIP: test CVE tag format: No new CVE patches introduced (test_patch.TestPatch.test_cve_tag_format)
SKIP: test Signed-off-by presence: No new CVE patches introduced (test_patch.TestPatch.test_signed_off_by_presence)
SKIP: test Upstream-Status presence: No new CVE patches introduced (test_patch.TestPatch.test_upstream_status_presence_format)
SKIP: test bugzilla entry format: No bug ID found (test_mbox.TestMbox.test_bugzilla_entry_format)
SKIP: test lic files chksum presence: No added recipes, skipping test (test_metadata.TestMetadata.test_lic_files_chksum_presence)
SKIP: test license presence: No added recipes, skipping test (test_metadata.TestMetadata.test_license_presence)
SKIP: test pylint: No python related patches, skipping test (test_python_pylint.PyLint.test_pylint)
SKIP: test series merge on head: Merge test is disabled for now (test_mbox.TestMbox.test_series_merge_on_head)
SKIP: test summary presence: No added recipes, skipping test (test_metadata.TestMetadata.test_summary_presence)
SKIP: test target mailing list: Series merged, no reason to check other mailing lists (test_mbox.TestMbox.test_target_mailing_list)

---

Please address the issues identified and
submit a new revision of the patch, or alternatively, reply to this email with an explanation of why the patch should be accepted. If you believe these results are due to an error in patchtest, please submit a bug at https://bugzilla.yoctoproject.org/ (use the 'Patchtest' category under 'Yocto Project Subprojects'). For more information on specific failures, see: https://wiki.yoctoproject.org/wiki/Patchtest. Thank you!

#3 lore raw

Re: [OE-core] [PATCH 2/4] libunwind: merge .inc and .bb

In reply to [email protected]

Hi Ross,
I thought the main reason of having .inc files was to have a stable git history, since the bb files get constantly renamed with each update? There are many recipes using a split .inc file without a need for it, so I assumed this is the standard codestyle of poky? Is it not the case?

Etienne

Quoted 124 lines · Ross Burton

From: Ross Burton <[email protected]>

There's no need to these to be split, so merge them together.

---
 meta/recipes-support/libunwind/libunwind.inc  | 23 ---------------
 .../libunwind/libunwind_1.6.2.bb              | 28 +++++++++++++++++--
 2 files changed, 25 insertions(+), 26 deletions(-)
 delete mode 100644 meta/recipes-support/libunwind/libunwind.inc
meta/recipes-support/libunwind/libunwind.inc deleted +0 -2
deleted file mode 100644
index bf74f9fa3c7..00000000000
@@ -1,23 +0,0 @@
-SUMMARY = "Library for obtaining the call-chain of a program"
-DESCRIPTION = "a portable and efficient C programming interface (API) to

determine the call-chain of a program"
-HOMEPAGE = "
https://urldefense.proofpoint.com/v2/url?u=http-3A__www.nongnu.org_libunwind&d=DwIFAg&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=P8pttzCM0snL4m0mo5VJm8mOnj0IfhCrI_TI3FJlan6TDSqW2WJLwYJEhK9Xwt3l&s=lWmWqF8G-xAViw4gogbniL5C4TmmC_Z-U_7q3yHJJe8&e=
"

meta/recipes-support/libunwind/libunwind.inc deleted +0 -21
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=2d80c8ed4062b8339b715f90fa68cc9f"
-DEPENDS += "libatomic-ops"
-DEPENDS:append:libc-musl = " libucontext"
-
-inherit autotools multilib_header
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[lzma] = "--enable-minidebuginfo,--disable-minidebuginfo,xz"
-PACKAGECONFIG[latexdocs] = "--enable-documentation,
--disable-documentation, latex2man-native"
-
-EXTRA_OECONF:arm = "--enable-debug-frame"
-EXTRA_OECONF:armeb = "--enable-debug-frame"
-EXTRA_OECONF:aarch64 = "--enable-debug-frame"
-
-do_install:append () {
-       oe_multilib_header libunwind.h
-}
-
-BBCLASSEXTEND = "native"
meta/recipes-support/libunwind/libunwind_1.6.2.bb +2 -1
index d67862608c1..650e2c9ec40 100644
@@ -1,4 +1,10 @@
-require libunwind.inc
+SUMMARY = "Library for obtaining the call-chain of a program"
+DESCRIPTION = "a portable and efficient C programming interface (API) to

determine the call-chain of a program"
+HOMEPAGE = "
https://urldefense.proofpoint.com/v2/url?u=http-3A__www.nongnu.org_libunwind&d=DwIFAg&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=P8pttzCM0snL4m0mo5VJm8mOnj0IfhCrI_TI3FJlan6TDSqW2WJLwYJEhK9Xwt3l&s=lWmWqF8G-xAViw4gogbniL5C4TmmC_Z-U_7q3yHJJe8&e=
"

meta/recipes-support/libunwind/libunwind_1.6.2.bb +4 -0
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=2d80c8ed4062b8339b715f90fa68cc9f"
+DEPENDS += "libatomic-ops"
+DEPENDS:append:libc-musl = " libucontext"
 
 SRC_URI = "

https://urldefense.proofpoint.com/v2/url?u=http-3A__download.savannah.nongnu.org_releases_libunwind_libunwind-2D-24-257BPV-257D.tar.gz&d=DwIFAg&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=P8pttzCM0snL4m0mo5VJm8mOnj0IfhCrI_TI3FJlan6TDSqW2WJLwYJEhK9Xwt3l&s=DzppDAaiQpwcwHtq6BJCCnV8IRnwe8BOlE-V1z_AkfA&e=

\
            file://0003-x86-Stub-out-x86_local_resume.patch \
meta/recipes-support/libunwind/libunwind_1.6.2.bb +0 -0
@@ -11,15 +17,31 @@ SRC_URI:append:libc-musl = "

file://musl-header-conflict.patch"

SRC_URI[sha256sum] =
"4a6aec666991fb45d0889c44aede8ad6eb108071c3554fcdff671f9c94794976"

meta/recipes-support/libunwind/libunwind_1.6.2.bb +12 -2
+inherit autotools multilib_header
+
+COMPATIBLE_HOST:riscv32 = "null"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[lzma] = "--enable-minidebuginfo,--disable-minidebuginfo,xz"
+PACKAGECONFIG[latexdocs] = "--enable-documentation,
--disable-documentation, latex2man-native"
+
+EXTRA_OECONF:arm = "--enable-debug-frame"
+EXTRA_OECONF:armeb = "--enable-debug-frame"
+EXTRA_OECONF:aarch64 = "--enable-debug-frame"
+
 EXTRA_OECONF:append:libc-musl = " --disable-documentation --disable-tests
--enable-static"
 
 #

https://urldefense.proofpoint.com/v2/url?u=http-3A__errors.yoctoproject.org_Errors_Details_20487_&d=DwIFAg&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=P8pttzCM0snL4m0mo5VJm8mOnj0IfhCrI_TI3FJlan6TDSqW2WJLwYJEhK9Xwt3l&s=SKDMc7SnpmHxBq9SlFgKMBVybrXAwMHEjQ5vnXg4nAA&e=
ARM_INSTRUCTION_SET:armv4 = "arm"
ARM_INSTRUCTION_SET:armv5 = "arm"

meta/recipes-support/libunwind/libunwind_1.6.2.bb +0 -2
-COMPATIBLE_HOST:riscv32 = "null"
-
 LDFLAGS += "-Wl,-z,relro,-z,now ${@bb.utils.contains('DISTRO_FEATURES',

'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"

SECURITY_LDFLAGS:append:libc-musl = " -lssp_nonshared" CACHED_CONFIGUREVARS:append:libc-musl = " LDFLAGS='${LDFLAGS} -lucontext'"

meta/recipes-support/libunwind/libunwind_1.6.2.bb +6 -1
+
+do_install:append () {
+       oe_multilib_header libunwind.h
+}
+
+BBCLASSEXTEND = "native"
--

2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#193920):
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.openembedded.org_g_openembedded-2Dcore_message_193920&d=DwIFaQ&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=P8pttzCM0snL4m0mo5VJm8mOnj0IfhCrI_TI3FJlan6TDSqW2WJLwYJEhK9Xwt3l&s=rRLXP74Dh2XnyVmQM6aYtOyPF2ZlWsMFKlYfrMUmt34&e=
Mute This Topic:
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.openembedded.org_mt_103787498_7048771&d=DwIFaQ&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=P8pttzCM0snL4m0mo5VJm8mOnj0IfhCrI_TI3FJlan6TDSqW2WJLwYJEhK9Xwt3l&s=_OPUyWCjt0FVC1ckEUV57eYVcd3jh3-hCZLg-paODBw&e=
Group Owner: [email protected] Unsubscribe:
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.openembedded.org_g_openembedded-2Dcore_unsub&d=DwIFaQ&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=P8pttzCM0snL4m0mo5VJm8mOnj0IfhCrI_TI3FJlan6TDSqW2WJLwYJEhK9Xwt3l&s=zMPlfcTWwai56yU_5P41Df59-erBRGJVEKyunoV5CS4&e=
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#4 lore raw

Re: [OE-core] [PATCH 2/4] libunwind: merge .inc and .bb

Quoted 3 lines · Etienne Cordonnier

Hi Ross,
I thought the main reason of having .inc files was to have a stable git history, since the bb files get constantly renamed with each update? There are many recipes using a split .inc file without a need for it, so I assumed this is the standard codestyle of poky? Is it not the case?

It originates from when openembedded had multiple versions for each recipe, to share logic.

Some people say that it helps track history, but unless you put _only_ the checksums in the versioned file then you need to track the renamed file anyway, and git’s “—follow” option does a reasonable job. I don’t consider this a sufficient advantage considering the inconvenience of having a recipe split arbitrarily between two files.

Ross

#5 lore raw

Re: [OE-core] [PATCH 2/4] libunwind: merge .inc and .bb

OK, good to know. I mostly use gitk and it doesn't do a good job at following renames, so I thought that was the reason for this file structure.

Etienne

Quoted 19 lines · Ross Burton
Quoted 3 lines · Etienne Cordonnier

Hi Ross,
I thought the main reason of having .inc files was to have a stable git history, since the bb files get constantly renamed with each update? There are many recipes using a split .inc file without a need for it, so I assumed this is the standard codestyle of poky? Is it not the case?

It originates from when openembedded had multiple versions for each recipe, to share logic.

Some people say that it helps track history, but unless you put _only_ the checksums in the versioned file then you need to track the renamed file anyway, and git’s “—follow” option does a reasonable job. I don’t consider this a sufficient advantage considering the inconvenience of having a recipe split arbitrarily between two files.

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

#6 lore raw

PATCH 3/4 libunwind: refresh patches

In reply to [email protected]

From: Ross Burton <[email protected]>

0001-src-Gtrace-remove-unguarded-print-calls.patch has been merged, so update the Upstream-Status.

0003-x86-Stub-out-x86_local_resume.patch has been hopefully obsoleted by the use of libucontext, remove.

Split 004-Fix-build-on-mips-musl.patch into two, as there's two independent issues here.

0006-Fix-for-X32.patch appears to have been fixed with 31738a upstream, in 1.6.0.

musl-header-conflict.patch was obsoleted by recipe-specific-sysroots, remove it.

---
 ...-Gtrace-remove-unguarded-print-calls.patch |   4 +-
 .../0003-x86-Stub-out-x86_local_resume.patch  |  55 ----------
 .../0004-Fix-build-on-mips-musl.patch         |  84 ---------------
 .../libunwind/0006-Fix-for-X32.patch          |  29 -----
 .../libunwind/libunwind/mips-byte-order.patch |  35 ++++++
 .../libunwind/mips-coredump-register.patch    | 100 ++++++++++++++++++
 .../libunwind/musl-header-conflict.patch      |  44 --------
 .../libunwind/libunwind_1.6.2.bb              |   6 +-
 8 files changed, 139 insertions(+), 218 deletions(-)
 delete mode 100644 meta/recipes-support/libunwind/libunwind/0003-x86-Stub-out-x86_local_resume.patch
 delete mode 100644 meta/recipes-support/libunwind/libunwind/0004-Fix-build-on-mips-musl.patch
 delete mode 100644 meta/recipes-support/libunwind/libunwind/0006-Fix-for-X32.patch
 create mode 100644 meta/recipes-support/libunwind/libunwind/mips-byte-order.patch
 create mode 100644 meta/recipes-support/libunwind/libunwind/mips-coredump-register.patch
 delete mode 100644 meta/recipes-support/libunwind/libunwind/musl-header-conflict.patch
meta/recipes-support/libunwind/libunwind/0001-src-Gtrace-remove-unguarded-print-calls.patch +2 -2
index fdadcd3b25a..5840c2b4f62 100644
@@ -1,4 +1,4 @@
-From 87d24ee47fd0e0461fca32d17564f21d76cbcb92 Mon Sep 17 00:00:00 2001
+From 9b27fa9bcd5cadd4c841c42710f41a090377e531 Mon Sep 17 00:00:00 2001
 From: Ross Burton <[email protected]>
 Date: Fri, 24 Mar 2023 16:18:44 +0000
 Subject: [PATCH] src/Gtrace: remove unguarded print() calls
@@ -19,7 +19,7 @@ needs to be implemented.
 
 Fixes #482.
 
-Upstream-Status: Submitted [https://github.com/libunwind/libunwind/pull/483]
+Upstream-Status: Backport [9b27fa9bcd5cadd4c841c42710f41a090377e531]
 Signed-off-by: Ross Burton <[email protected]>
 ---
  src/arm/Gtrace.c | 4 ++--
meta/recipes-support/libunwind/libunwind/0003-x86-Stub-out-x86_local_resume.patch deleted +0 -55

55 lines not on this page · raw message

meta/recipes-support/libunwind/libunwind/0004-Fix-build-on-mips-musl.patch deleted +0 -84

84 lines not on this page · raw message

meta/recipes-support/libunwind/libunwind/0006-Fix-for-X32.patch deleted +0 -29
deleted file mode 100644
index 9941612387f..00000000000
@@ -1,29 +0,0 @@
-From f2eae0af620925b3686410470fc6fbc66ec1dc52 Mon Sep 17 00:00:00 2001
-From: Christopher Larson <[email protected]>
-Date: Tue, 13 Dec 2016 09:50:34 -0700
-Subject: [PATCH] Fix for X32
-
-Apply patch to fix the X32 build from https://github.com/sjnewbury/x32.
-
-Upstream-Status: Pending
-Signed-off-by: Christopher Larson <[email protected]>
-
----
- src/x86_64/Gos-linux.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/x86_64/Gos-linux.c b/src/x86_64/Gos-linux.c
-index b489329..0550005 100644
---- a/src/x86_64/Gos-linux.c
-+++ b/src/x86_64/Gos-linux.c
-@@ -146,8 +146,8 @@ x86_64_sigreturn (unw_cursor_t *cursor)
- 
-   Debug (8, "resuming at ip=%llx via sigreturn(%p)\n",
-              (unsigned long long) c->dwarf.ip, sc);
--  __asm__ __volatile__ ("mov %0, %%rsp;"
--                        "mov %1, %%rax;"
-+  __asm__ __volatile__ ("mov %q0, %%rsp;"
-+                        "mov %q1, %%rax;"
-                         "syscall"
-                         :: "r"((uint64_t)sc), "i"(SYS_rt_sigreturn)
-                         : "memory");
meta/recipes-support/libunwind/libunwind/mips-byte-order.patch new file +35 -0
new file mode 100644
index 00000000000..8848780fd1b
@@ -0,0 +1,35 @@
+From dbbf8110ed3fd2cbac20a8ec2ac769e13c67bab1 Mon Sep 17 00:00:00 2001
+From: Ross Burton <[email protected]>
+Date: Tue, 16 Jan 2024 18:22:38 +0000
+Subject: [PATCH 2/2] byte order
+
+endian.h on musl/mips can't be included in __ASSEMBLER__ mode,
+so use the __BYTE_ORDER__ symbol instead.
+
+Upstream-Status: Pending
+Signed-off-by: Ross Burton <[email protected]>
+---
+ src/mips/getcontext.S | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/src/mips/getcontext.S b/src/mips/getcontext.S
+index d1dbd579..de9b6818 100644
+--- a/src/mips/getcontext.S
++++ b/src/mips/getcontext.S
+@@ -24,12 +24,11 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.  */
+ 
+ #include "offsets.h"
+-#include <endian.h>
+ 
+ 	.text
+ 
+ #if _MIPS_SIM == _ABIO32
+-# if __BYTE_ORDER == __BIG_ENDIAN
++# if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
+ #  define OFFSET 4
+ # else
+ #  define OFFSET 0
+-- 
+2.34.1
+
meta/recipes-support/libunwind/libunwind/mips-coredump-register.patch new file +100 -0

100 lines not on this page · raw message

meta/recipes-support/libunwind/libunwind/musl-header-conflict.patch deleted +0 -44

44 lines not on this page · raw message

meta/recipes-support/libunwind/libunwind_1.6.2.bb +2 -4
index 650e2c9ec40..d40a2af26d3 100644
@@ -7,13 +7,11 @@ DEPENDS += "libatomic-ops"
 DEPENDS:append:libc-musl = " libucontext"
 
 SRC_URI = "http://download.savannah.nongnu.org/releases/libunwind/libunwind-${PV}.tar.gz \
-           file://0003-x86-Stub-out-x86_local_resume.patch \
-           file://0004-Fix-build-on-mips-musl.patch \
+           file://mips-byte-order.patch \
+           file://mips-coredump-register.patch \
            file://0005-ppc32-Consider-ucontext-mismatches-between-glibc-and.patch \
-           file://0006-Fix-for-X32.patch \
            file://0001-src-Gtrace-remove-unguarded-print-calls.patch \
            "
-SRC_URI:append:libc-musl = " file://musl-header-conflict.patch"
 
 SRC_URI[sha256sum] = "4a6aec666991fb45d0889c44aede8ad6eb108071c3554fcdff671f9c94794976"
 
Signature · 1 line
2.34.1
#7 lore raw

PATCH 4/4 libunwind: clean up configuration

In reply to [email protected]

From: Ross Burton <[email protected]>

Add a PACKAGECONFIG for the support for zlib-compressed debuginfo.

There's no need to explicitly enable reading of .debug_frame segments as this is enabled automatically for arm/aarch64.

Enable static globally, there's not much to gain by making this musl-specific.

Don't disable the tests on musl as they verify that libunwind can link, which is important with external libucontext libraries.

No need to disable documentation on musl, as it's already disabled out of the box.

---
 meta/recipes-support/libunwind/libunwind_1.6.2.bb | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
meta/recipes-support/libunwind/libunwind_1.6.2.bb +2 -5
index d40a2af26d3..3208785124a 100644
@@ -21,13 +21,10 @@ COMPATIBLE_HOST:riscv32 = "null"
 
 PACKAGECONFIG ??= ""
 PACKAGECONFIG[lzma] = "--enable-minidebuginfo,--disable-minidebuginfo,xz"
+PACKAGECONFIG[zlib] = "--enable-zlibdebuginfo,--disable-zlibdebuginfo,zlib"
 PACKAGECONFIG[latexdocs] = "--enable-documentation, --disable-documentation, latex2man-native"
 
-EXTRA_OECONF:arm = "--enable-debug-frame"
-EXTRA_OECONF:armeb = "--enable-debug-frame"
-EXTRA_OECONF:aarch64 = "--enable-debug-frame"
-
-EXTRA_OECONF:append:libc-musl = " --disable-documentation --disable-tests --enable-static"
+EXTRA_OECONF = "--enable-static"
 
 # http://errors.yoctoproject.org/Errors/Details/20487/
 ARM_INSTRUCTION_SET:armv4 = "arm"
Signature · 1 line
2.34.1
#8 lore raw
In reply to [email protected]
Quoted 15 lines · Ross Burton

From: Ross Burton <[email protected]>

musl doesn't support riscv32, so set COMPATIBLE_HOST appropriately.

---
 meta/recipes-core/musl/musl.inc | 3 +++
 1 file changed, 3 insertions(+)
meta/recipes-core/musl/musl.inc +0 -0
index 66468e92ff0..6ca52b186a5 100644

meta/recipes-core/musl/musl.inc MIPS_INSTRUCTION_SET = "mips" · line 29

Quoted 5 lines
meta/recipes-core/musl/musl.inc +2 -0
@@ -25,6 +25,9 @@ MIPS_INSTRUCTION_SET = "mips"
 ARM_INSTRUCTION_SET:armv5 = "arm"
 ARM_INSTRUCTION_SET:armv4 = "arm"
 
+# 1.2.4 doesn't support riscv32
+COMPATIBLE_HOST:riscv32 = "null"

there is a port in meta-riscv for RV32 which is WIP for upstreaming. I think it is better to direct folks to use meta-riscv until then

Quoted 16 lines
meta/recipes-core/musl/musl.inc +1 -1
+
 # Enable out of tree build
 B = "${WORKDIR}/build"
 
--

2.34.1

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