From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Giorgos Keramidas Newsgroups: gmane.emacs.devel Subject: RFC: Support for FreeBSD/amd64 Date: Thu, 27 Oct 2005 02:52:24 +0300 Message-ID: <20051026235224.GA55408@flame.pc> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1130370785 30157 80.91.229.2 (26 Oct 2005 23:53:05 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 26 Oct 2005 23:53:05 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 27 01:53:03 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EUv4c-0003hc-3Y for ged-emacs-devel@m.gmane.org; Thu, 27 Oct 2005 01:52:50 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EUv4b-0002Yq-8n for ged-emacs-devel@m.gmane.org; Wed, 26 Oct 2005 19:52:49 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EUv4S-0002Yl-WB for emacs-devel@gnu.org; Wed, 26 Oct 2005 19:52:41 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EUv4N-0002Xc-75 for emacs-devel@gnu.org; Wed, 26 Oct 2005 19:52:40 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EUv4N-0002XY-5l for emacs-devel@gnu.org; Wed, 26 Oct 2005 19:52:35 -0400 Original-Received: from [195.170.0.95] (helo=kane.otenet.gr) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EUv4N-00045V-6Y for emacs-devel@gnu.org; Wed, 26 Oct 2005 19:52:35 -0400 Original-Received: from flame.pc (aris.bedc.ondsl.gr [62.103.39.226]) by kane.otenet.gr (8.13.4/8.13.4/Debian-1) with SMTP id j9QNqV0P020465 for ; Thu, 27 Oct 2005 02:52:32 +0300 Original-Received: from flame.pc (flame [127.0.0.1]) by flame.pc (8.13.4/8.13.4) with ESMTP id j9QNqOu1055481 for ; Thu, 27 Oct 2005 02:52:24 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Original-Received: (from keramida@localhost) by flame.pc (8.13.4/8.13.4/Submit) id j9QNqO9q055480 for emacs-devel@gnu.org; Thu, 27 Oct 2005 02:52:24 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Original-To: emacs-devel@gnu.org Content-Disposition: inline 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:44926 Archived-At: To bootstrap Emacs on my FreeBSD/amd64 snapshot I had to use the following patch -- also available at: http://people.freebsd.org/~keramida/emacs/22/freebsd-amd64.diff Does this look like a reasonable way to add FreeBSD/amd64 support? I'm not really sure the amdx86-64.h changes are ok. %%% --- emacs.orig/configure.in Tue Oct 25 04:09:39 2005 +++ emacs/configure.in Thu Oct 27 02:49:27 2005 @@ -238,6 +238,7 @@ case "${canonical}" in alpha*-*-freebsd*) machine=alpha ;; i[3456]86-*-freebsd*) machine=intel386 ;; + x86_64-*-freebsd*) machine=amdx86-64 ;; esac ;; --- emacs.orig/src/m/amdx86-64.h Sun Aug 7 12:52:27 2005 +++ emacs/src/m/amdx86-64.h Thu Oct 27 01:29:10 2005 @@ -100,11 +100,23 @@ /* Define XPNTR to avoid or'ing with DATA_SEG_BITS */ #undef DATA_SEG_BITS +#ifdef __FreeBSD__ + +#undef START_FILES +#define START_FILES pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o + +#undef LIB_STANDARD +#define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtn.o + +#else /* !__FreeBSD__ */ + #undef START_FILES #define START_FILES pre-crt0.o /usr/lib64/crt1.o /usr/lib64/crti.o #undef LIB_STANDARD #define LIB_STANDARD -lgcc -lc -lgcc /usr/lib64/crtn.o + +#endif /* __FreeBSD__ */ /* arch-tag: 8a5e001d-e12e-4692-a3a6-0b15ba271c6e (do not change this comment) */ %%%