From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/4686 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: Build on linux 2.6 and run on linux 2.4? Date: Thu, 20 Mar 2014 20:51:35 -0400 Message-ID: <20140321005135.GH26358@brightrain.aerifal.cx> References: <20140320231412.GG26358@brightrain.aerifal.cx> 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 1395363099 25715 80.91.229.3 (21 Mar 2014 00:51:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 21 Mar 2014 00:51:39 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-4690-gllmg-musl=m.gmane.org@lists.openwall.com Fri Mar 21 01:51:49 2014 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1WQnga-0001jP-E1 for gllmg-musl@plane.gmane.org; Fri, 21 Mar 2014 01:51:48 +0100 Original-Received: (qmail 22424 invoked by uid 550); 21 Mar 2014 00:51:47 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 22416 invoked from network); 21 Mar 2014 00:51:47 -0000 Content-Disposition: inline In-Reply-To: <20140320231412.GG26358@brightrain.aerifal.cx> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:4686 Archived-At: On Thu, Mar 20, 2014 at 07:14:12PM -0400, Rich Felker wrote: > On Thu, Mar 20, 2014 at 04:58:49PM -0400, John Mudd wrote: > > Probably a dumb question. Is part of the value of musl that I can build an > > app using musl on linux 2.6 and then run the binary on linux 2.4? > > The version of Linux you build on has no bearing on the binary that > comes out, so that's not a problem. > > However, Linux 2.4 is not officially supported since it lacks a lot of > functionality needed to provide a modern POSIX conforming environment. > The most notable is that it can't do threads. If you're ok with that, > the other problems might be small enough that you don't mind. I > remember some people in Freenode #musl trying out 2.4 recently and > finding that a few of the busybox applets didn't work right, though, > due to missing statfs64 syscall. > > This page has details on which kernel versions added which syscalls: > > http://man7.org/linux/man-pages/man2/syscalls.2.html I looked through this list, and statfs64/fstatfs64 seem to be the only two syscalls where the 32-bit off_t version was all that's available in 2.4 and the 64-bit version was added in 2.6. So if we could provide a fallback for them, this might make 2.4 a fairly viable target for single-threaded programs built with musl. (Despite 2.4 being ancient and generally a bad idea to use, there are some devices where replacing the kernel is hard or where the patches to support the device have not been ported to 2.6, so this isn't just a useless exercise.) The big question that remains of course is how ugly the fallbacks would be, and whether we'd need a lot more arch-specific definitions _purely_ for 2.4 fallback. Rich