From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ulrich Mueller Newsgroups: gmane.emacs.devel Subject: Re: configure.in support for FreeBSD ia64/sparc64/powerpc Date: Fri, 19 Dec 2008 14:51:21 +0100 Message-ID: <18763.42713.941380.795066@a1ihome1.kph.uni-mainz.de> References: <200611032145.kA3Ljj6x078515@kobe.laptop> <87irhv28mx.fsf@stupidchicken.com> <20061106141015.GB3755@kobe.laptop> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1229694792 17014 80.91.229.12 (19 Dec 2008 13:53:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 19 Dec 2008 13:53:12 +0000 (UTC) Cc: Chong Yidong , Giorgos Keramidas To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 19 14:54:18 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LDfnr-0007OL-U6 for ged-emacs-devel@m.gmane.org; Fri, 19 Dec 2008 14:54:08 +0100 Original-Received: from localhost ([127.0.0.1]:55803 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LDfmf-000827-Jp for ged-emacs-devel@m.gmane.org; Fri, 19 Dec 2008 08:52:53 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LDflP-000730-1T for emacs-devel@gnu.org; Fri, 19 Dec 2008 08:51:35 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LDflN-000718-Aq for emacs-devel@gnu.org; Fri, 19 Dec 2008 08:51:34 -0500 Original-Received: from [199.232.76.173] (port=40902 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LDflM-00070x-Tc for emacs-devel@gnu.org; Fri, 19 Dec 2008 08:51:32 -0500 Original-Received: from a1iwww1.kph.uni-mainz.de ([134.93.134.1]:43182) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LDflM-0002fG-C7 for emacs-devel@gnu.org; Fri, 19 Dec 2008 08:51:32 -0500 Original-Received: from a1ihome1.kph.uni-mainz.de (a1ihome1.kph.uni-mainz.de [134.93.134.75]) by a1iwww1.kph.uni-mainz.de (8.14.0/8.13.4) with ESMTP id mBJDpMrh015769; Fri, 19 Dec 2008 14:51:22 +0100 Original-Received: from a1ihome1.kph.uni-mainz.de (localhost [127.0.0.1]) by a1ihome1.kph.uni-mainz.de (8.14.0/8.14.1) with ESMTP id mBJDpMYd015153; Fri, 19 Dec 2008 14:51:22 +0100 Original-Received: (from ulm@localhost) by a1ihome1.kph.uni-mainz.de (8.14.0/8.14.0/Submit) id mBJDpLJl015148; Fri, 19 Dec 2008 14:51:21 +0100 X-Mailer: VM 8.0.2-487 under Emacs 22.2.1 (i686-pc-linux-gnu) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:107063 Archived-At: >>>>> On Mon, 6 Nov 2006, Giorgos Keramidas wrote: >On 2006-11-03 22:28, Chong Yidong wrote: >>Giorgos Keramidas writes: >>> The following change makes Emacs buildable on FreeBSD running on >>> sparc64, ia64 and powerpc too. It has been tested for some time >>> as a local patch in the editors/emacs-devel port of FreeBSD, so it >>> would be nice if it became part of Emacs 22. We won't have to >>> maintain local diffs for this part then: >>> >>> --- a/src/alloc.c Fri Oct 27 15:45:51 2006 +0000 >>> +++ b/src/alloc.c Sat Oct 28 01:49:45 2006 +0300 >>> @@ -4560,7 +4560,11 @@ mark_stack () >>> needed on ia64 too. See mach_dep.c, where it also says inline >>> assembler doesn't work with relevant proprietary compilers. >>> */ >>> #ifdef sparc >>> +#ifdef __sparc64__ >>> + asm ("flushw"); >>> +#else >>> asm ("ta 3"); >>> +#endif >>> #endif >> >> Is this change correct for non-FreeBSD sparc64 systems too? >> (I don't know anything about this part of the code.) > Sorry for taking so long to follow up about this. I tried looking > at the sparc v9 specification for hints about why this change is > needed on 64-bit SPARC platforms, but I couldn't come up with > anything in a reasonable amount of time. I am not that proficient > with SPARC64 assembly, but I will ask our FreeBSD/sparc64 people for > details. > I'll follow up again when I get a reply from the people who know more > about sparc64 assembly :) Following up to this message from two years ago. ;-) Gentoo also maintains the above as local patch, both for FreeBSD and GNU/Linux. Our Sparc team says that the patch is sane, and without it Emacs cannot be built on Sparc/FreeBSD. See Gentoo Bug 159584 for further details: Below is a slightly updated patch that will apply to the currect CVS trunk. It would be nice if it could make it into Emacs 23. Ulrich --- emacs-orig/src/alloc.c +++ emacs/src/alloc.c @@ -4573,7 +4573,11 @@ needed on ia64 too. See mach_dep.c, where it also says inline assembler doesn't work with relevant proprietary compilers. */ #ifdef __sparc__ +#ifdef __sparc64__ + asm ("flushw"); +#else asm ("ta 3"); +#endif #endif /* Save registers that we need to see on the stack. We need to see