From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/9259 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: setcontext/getcontext/makecontext missing? Date: Thu, 4 Feb 2016 10:41:38 -0500 Message-ID: <20160204154137.GN9349@brightrain.aerifal.cx> References: <87199830-7260-4E33-B3A6-BE15AF610BCE@akamai.com> <20160204145409.GB9915@port70.net> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1454600525 10568 80.91.229.3 (4 Feb 2016 15:42:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 4 Feb 2016 15:42:05 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-9272-gllmg-musl=m.gmane.org@lists.openwall.com Thu Feb 04 16:41:56 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1aRM2d-0007Ds-CA for gllmg-musl@m.gmane.org; Thu, 04 Feb 2016 16:41:55 +0100 Original-Received: (qmail 7707 invoked by uid 550); 4 Feb 2016 15:41:51 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 7682 invoked from network); 4 Feb 2016 15:41:51 -0000 Content-Disposition: inline In-Reply-To: <20160204145409.GB9915@port70.net> User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:9259 Archived-At: On Thu, Feb 04, 2016 at 03:54:09PM +0100, Szabolcs Nagy wrote: > * Short, Todd [2016-02-04 14:09:30 +0000]: > > > > It appears that setcontext/getcontext/makecontext are declared in > > ./include/ucontext.h, but there???s no definitions for them in > > musl. These three functions are part of libc/glibc.so: > > > > these are deprecated posix apis. > > > Since the functions are declared, is there any intent to put them into musl? > > > > they have unclear semantics and only possible to > implement in asm (hence it is a significant effort > to add them). There's been some interest in adding them and they were on a long-term goal list, but I'm not sure it makes sense anymore. All the major users of this API have been moving _off_ of it, because it's deprecated and impossible to use correctly - see the rationale here: http://pubs.opengroup.org/onlinepubs/009695399/functions/makecontext.html So it's rather unfortunate (but typical OpenSSL nonsense) that they've adding a new use of it. > > I ran into this when attempting to compile OpenSSL with musl. In > > the OpenSSL master branch, I???m able to do: > > > > CC=musl-gcc ./config > > make depend > > make > > > > However, ld fails because there is an undefined reference to > > setcontext, getcontext and makecontext. This is new async > > functionality in OpenSSL that uses these APIS. > > > > imho that's an openssl bug. > > if they really need the *context apis, then use adequate > (link-time) configure check for them. Agree strongly. There's at least one other major POSIX/POSIX-like system that lacks them. > but looking at > http://git.openssl.org/?p=openssl.git;a=commit;h=a3667c316ae60ef454fb804221c3ca44af30a9aa > this async lib is probably misguided, but they can > implement the api with pthreads in a portable way. Indeed. Rich