From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/4587 Path: news.gmane.org!not-for-mail From: Rob Landley Newsgroups: gmane.linux.lib.musl.general Subject: Re: sh4 arch just got orphaned on linux-kernel. Date: Mon, 17 Feb 2014 14:19:04 -0600 Message-ID: References: <20140217185819.GM184@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1392668349 30051 80.91.229.3 (17 Feb 2014 20:19:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 17 Feb 2014 20:19:09 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-4591-gllmg-musl=m.gmane.org@lists.openwall.com Mon Feb 17 21:19:18 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 1WFUes-0006rC-G8 for gllmg-musl@plane.gmane.org; Mon, 17 Feb 2014 21:19:18 +0100 Original-Received: (qmail 17906 invoked by uid 550); 17 Feb 2014 20:19:17 -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 17898 invoked from network); 17 Feb 2014 20:19:16 -0000 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=omKdAMBizYSuvMY2CuU044ZLUvdVY2r2Pf8w28gcosk=; b=lzKAg4NdZMOPWPTGdzSV+1TdhlXfZuOmA6IpuLDCcfD4Z5qRc+1w0fEIth59kr7m7O xhZuzzbv1btk7WRgZt1yrbrlZDBKWAq7JmzCASOskPrV608PbnaEFfpLwPD5BlC9RI0D PXLZPW+6XgyPAfnZoUhdB2FnuJFCB2AjCmZiBYlDQHUv9TT3VcYXRNwOm1KvKJNLvinq +pF3+iCtbneh1IHgYSjdHAeavMwN8PyRzFge0k441HzwqzDmN8bDljMvPNcUDWS2t81f TBRiFczfnTP6sNMseYWPegVxabnfK8ELG4oP2QJUt/ENN1/6AHWkwwH9UmpBBC6Q5LbM 68Mg== X-Gm-Message-State: ALoCoQm9vJ86BGLyYAn8ABmtHoefnmRqxDa7xQ3VOOTJ2b4canvuVyrJCxlqU3svaMKpH25muJj+ X-Received: by 10.67.1.202 with SMTP id bi10mr28922351pad.68.1392668344467; Mon, 17 Feb 2014 12:19:04 -0800 (PST) X-Originating-IP: [12.227.248.2] In-Reply-To: <20140217185819.GM184@brightrain.aerifal.cx> Xref: news.gmane.org gmane.linux.lib.musl.general:4587 Archived-At: (Wow gmail's web interface is unfriendly...) There was a bug in sh4's binutils (didn't do sign extension right at certain word sizes), but it only triggered for code the compiler never generated (the compiler did the sign extension, it didn't ask the assembler to do it), so nobody noticed for over 5 years. You had to hand-code assembly to trigger the bug. The sh4 start code did _not_ trigger the bug, but a "cleanup" patch did start triggering the bug right after the bug was fixed upstream. When I noticed and pointed out "hey, this has worked for years and now you just broke it for what claims to be a cosmetic patch, why did you do that?", the binutils release containing the bugfix was less than 3 months old but was apparently the only thing that had _ever_ been able to build an sh4 kernel in the history of sh4. (What?) The maintainer's response (in another thread I think) was basically "you're not a Renesas customer, how can you possibly be interested in our product which we are the only supplier of if you haven't given us money and used our BSP? Buy a support contract and we'll talk. Until then stop pretending this company Hitachi spun off ever had anything to do with Hitachi." My quick and dirty fix was to revert the "cleanup" patch to the kernel startup code, which had no functional impact other than to break older toolchains. (Otherwise the generated code was identical.) 4 years later, the cleanup patch still cleanly reverts, so I never got around to messing with my sh4 assembler to make it do 32 bit sign extension on 64 bit targets. (It's a trivial fix, it's extending the sign to host word size instead of target word size, so we get 64 bit numbers it then can't output through the code generator, so the build breaks. It needs a typecast somewhere, never bothered to track down where.) The thread's old news, it's just an example of why it took anybody in the open source community a while to notice the guy had gone missing. On Mon, Feb 17, 2014 at 12:58 PM, Rich Felker wrote: > On Mon, Feb 17, 2014 at 12:11:54PM -0600, Rob Landley wrote: >> http://www.spinics.net/lists/linux-sh/msg28653.html >> >> If you want to know _why_ getting rid of Mundt is progress, read this >> 4 message thread from 2010: >> >> http://markmail.org/message/ary6pnb2xj64mzco >> >> That said, there are guys out there (I keep bumping into 'em at CELF) >> that use and maintain this stuff, outside of Renesas... > > I'm not sure what to make of that. It's clearly a bug in the version > of gas you were using, and it's not application or kernel developers' > responsibility to avoid changing their code in ways that expose > toolchain bugs. I suspect in this case it's easy to backport the fix. > > Rich