* [meta-oe][PATCH] wvstreams: Disable calls to makecontext on musl
@ 2019-10-11 17:28 Khem Raj
2019-10-11 19:05 ` Adrian Bunk
0 siblings, 1 reply; 3+ messages in thread
From: Khem Raj @ 2019-10-11 17:28 UTC (permalink / raw)
To: openembedded-devel
makecontext API is deprecated and not implemented in musl
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
...nt-use-ucontext-on-non-glibc-systems.patch | 20 +++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/meta-oe/recipes-connectivity/wvdial/wvstreams/0002-wvtask-Dont-use-ucontext-on-non-glibc-systems.patch b/meta-oe/recipes-connectivity/wvdial/wvstreams/0002-wvtask-Dont-use-ucontext-on-non-glibc-systems.patch
index 232db9e63b..ac4dd81ce8 100644
--- a/meta-oe/recipes-connectivity/wvdial/wvstreams/0002-wvtask-Dont-use-ucontext-on-non-glibc-systems.patch
+++ b/meta-oe/recipes-connectivity/wvdial/wvstreams/0002-wvtask-Dont-use-ucontext-on-non-glibc-systems.patch
@@ -8,8 +8,6 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
utils/wvtask.cc | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
-diff --git a/utils/wvtask.cc b/utils/wvtask.cc
-index cdcd544..c0bff7d 100644
--- a/utils/wvtask.cc
+++ b/utils/wvtask.cc
@@ -199,7 +199,9 @@ WvTaskMan::WvTaskMan()
@@ -22,7 +20,7 @@ index cdcd544..c0bff7d 100644
if (context_return == 0)
{
// initial setup - start the stackmaster() task (never returns!)
-@@ -265,13 +267,17 @@ int WvTaskMan::run(WvTask &task, int val)
+@@ -265,13 +267,17 @@ int WvTaskMan::run(WvTask &task, int val
state = &old_task->mystate;
context_return = 0;
@@ -68,7 +66,7 @@ index cdcd544..c0bff7d 100644
if (context_return == 0)
{
assert(magic_number == -WVTASK_MAGIC);
-@@ -371,7 +383,9 @@ void WvTaskMan::get_stack(WvTask &task, size_t size)
+@@ -371,7 +383,9 @@ void WvTaskMan::get_stack(WvTask &task,
// initial setup
stack_target = &task;
context_return = size/1024 + (size%1024 > 0);
@@ -108,7 +106,7 @@ index cdcd544..c0bff7d 100644
if (context_return == 0)
{
// done the setjmp; that means the target task now has
-@@ -510,7 +530,9 @@ void WvTaskMan::do_task()
+@@ -510,20 +530,25 @@ void WvTaskMan::do_task()
}
else
{
@@ -118,9 +116,14 @@ index cdcd544..c0bff7d 100644
task->func_call.uc_stack.ss_size = task->stacksize;
task->func_call.uc_stack.ss_sp = task->stack;
task->func_call.uc_stack.ss_flags = 0;
-@@ -521,9 +543,11 @@ void WvTaskMan::do_task()
+ task->func_call.uc_link = &task->func_return;
++#ifdef __GLIBC__
+ Dprintf("WvTaskMan: makecontext #%d (%s)\n",
+ task->tid, (const char *)task->name);
+ makecontext(&task->func_call,
(void (*)(void))call_func, 1, task);
-
+-
++#endif
context_return = 0;
+#ifdef __GLIBC__
assert(getcontext(&task->func_return) == 0);
@@ -130,6 +133,3 @@ index cdcd544..c0bff7d 100644
}
// the task's function terminated.
---
-2.13.3
-
--
2.23.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [meta-oe][PATCH] wvstreams: Disable calls to makecontext on musl
2019-10-11 17:28 [meta-oe][PATCH] wvstreams: Disable calls to makecontext on musl Khem Raj
@ 2019-10-11 19:05 ` Adrian Bunk
2019-10-11 23:52 ` Khem Raj
0 siblings, 1 reply; 3+ messages in thread
From: Adrian Bunk @ 2019-10-11 19:05 UTC (permalink / raw)
To: Khem Raj; +Cc: openembedded-devel
On Fri, Oct 11, 2019 at 10:28:18AM -0700, Khem Raj wrote:
> makecontext API is deprecated and not implemented in musl
>...
Does the resulting binary work correctly with musl?
The whole patch looks like turning a turning a build failure into
broken runtime code, and that disabling the recipe with musl would
be the only sane action.
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [meta-oe][PATCH] wvstreams: Disable calls to makecontext on musl
2019-10-11 19:05 ` Adrian Bunk
@ 2019-10-11 23:52 ` Khem Raj
0 siblings, 0 replies; 3+ messages in thread
From: Khem Raj @ 2019-10-11 23:52 UTC (permalink / raw)
To: Adrian Bunk; +Cc: openembeded-devel
On Fri, Oct 11, 2019 at 12:05 PM Adrian Bunk <bunk@stusta.de> wrote:
>
> On Fri, Oct 11, 2019 at 10:28:18AM -0700, Khem Raj wrote:
> > makecontext API is deprecated and not implemented in musl
> >...
>
> Does the resulting binary work correctly with musl?
>
> The whole patch looks like turning a turning a build failure into
> broken runtime code, and that disabling the recipe with musl would
> be the only sane action.
I realized that I was trying to fix an already broken patch resulting
in more brokenness. Perhaps using something like
https://github.com/apenwarr/wvstreams/commits/master
Which should have this fixed but for now. I guess I should just remove
the musl support.
>
> 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
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-10-11 23:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-11 17:28 [meta-oe][PATCH] wvstreams: Disable calls to makecontext on musl Khem Raj
2019-10-11 19:05 ` Adrian Bunk
2019-10-11 23:52 ` Khem Raj
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.