After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 312812 - GCC 4 build fix for cothreads.c on platform not having makecontext()
GCC 4 build fix for cothreads.c on platform not having makecontext()
Status: RESOLVED WONTFIX
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
0.8.10
Other Linux
: High major
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-08-07 16:22 UTC by Loïc Minier
Modified: 2005-11-21 19:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
cothreads.c gcc 4 build fix (untested) (948 bytes, patch)
2005-08-07 16:23 UTC, Loïc Minier
none Details | Review

Description Loïc Minier 2005-08-07 16:22:45 UTC
Hi,

I've been told cothreads.c isn't used anymore, and because of a borken toolchain
in Debian, I've build an old code path which doesn't build anymore with GCC 4.

Bye,
Comment 1 Loïc Minier 2005-08-07 16:23:11 UTC
Created attachment 50344 [details] [review]
cothreads.c gcc 4 build fix (untested)
Comment 2 Loïc Minier 2005-09-01 06:52:57 UTC
Hi,

sparc/Linux doesn't have makecontext/getcontext and friends (they always fail)
and hence this code path is currently needed; is it still supported?
Comment 3 Loïc Minier 2005-09-01 09:03:00 UTC
Hi,

I had a look at pth-2.0.4 since it seems this is where the m4 configure macro
comes from.  They have two MCSC (makecontext/setcontext) implementations, one
based on libc's makecontext/setcontext, the other based on sigsetjmp/setjmp.

AFAIUI, GStreamer has its own ASM implementation:
/***** Sun SPARC *****/
#define GST_ARCH_SET_SP(stackpointer) \
    __asm__( "ta 3\n\t" \
             "mov %0, %%sp" : : "r"(stackpointer));

#define GST_ARCH_CALL(target) \
    __asm__( "call %0,0\n\t" \
             "nop" : : "r"(target) );

#define GST_ARCH_PRESETJMP() \
    __asm__( "ta 3" );

Do you plan to support sparc in future releases?

Shouldn't GStreamer build-depend on pth?

Bye,
Comment 4 Loïc Minier 2005-09-02 12:38:10 UTC
FYI, I've talked with people in the VideoLAN/VLC team and they base their
threads implementation on setjmp/sigsetjmp too and were not surprized to see
this problem arise with setcontext/makecontext/getcontext.
Comment 5 Ronald Bultje 2005-09-02 14:26:41 UTC
Loic, this code path is in practice never used, becuse we switched from
cothreads to a no-thread scheduler implementation ('opt').

We should still apply the patch because it fixes a build issue, but in practice
it won't make any difference.
Comment 6 Loïc Minier 2005-09-02 14:42:50 UTC
Ok, so beside the makecontext-based code, there is this code, and a third code
(which you call the 'opt' scheduler implementation) and when this code is built,
it is not used, but the opt scheduler is, correct?

It seems this code is built since forever under Debian/sparc, so understanding
this issue in depth is necessary for me.
Comment 7 Ronald Bultje 2005-09-02 15:33:24 UTC
Yes, the code is built, but not used.
Comment 8 Andy Wingo 2005-11-21 19:40:27 UTC
Closing as wontfix -- any "fix" here without extensive testing might braek on
other architectures, and we don't maintain this code any more. See justification
on bug #321824.