From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Greg Troxel Newsgroups: gmane.lisp.guile.devel Subject: more machine support NetBSD - including x86-64 Date: Mon, 15 Nov 2004 20:34:50 -0500 Message-ID: <20041116013450.49E3C2069@fnord.ir.bbn.com> NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1100568913 31691 80.91.229.6 (16 Nov 2004 01:35:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 16 Nov 2004 01:35:13 +0000 (UTC) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Nov 16 02:35:07 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CTsFO-0001cl-00 for ; Tue, 16 Nov 2004 02:35:06 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CTsO7-00087Q-Mn for guile-devel@m.gmane.org; Mon, 15 Nov 2004 20:44:07 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CTsO2-00086S-Hp for guile-devel@gnu.org; Mon, 15 Nov 2004 20:44:02 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CTsO1-00085R-QM for guile-devel@gnu.org; Mon, 15 Nov 2004 20:44:02 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CTsO1-000857-Ku for guile-devel@gnu.org; Mon, 15 Nov 2004 20:44:01 -0500 Original-Received: from [192.1.100.210] (helo=fnord.ir.bbn.com) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1CTsF9-0006PV-Ja for guile-devel@gnu.org; Mon, 15 Nov 2004 20:34:51 -0500 Original-Received: from fnord.ir.bbn.com (localhost [127.0.0.1]) by fnord.ir.bbn.com (Postfix) with ESMTP id 49E3C2069 for ; Mon, 15 Nov 2004 20:34:50 -0500 (EST) Original-To: guile-devel@gnu.org X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:4396 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:4396 I am updating the pkgsrc entry for NetBSD to 1.6.5 from 1.6.4. This patch is applied during NetBSD builds, but it belongs in the guile sources. It adds machine/arch detection for NetBSD on various arches, and x86-64 support. The detection of OSF1 as an alpha that is not linux or netbsd seems awkward, but I don't know of a third unless guile runs on VMS. $NetBSD: patch-ae,v 1.9 2004/03/16 00:46:39 dmcmahill Exp $ --- libguile/gc_os_dep.c.orig 2004-06-15 18:55:31.000000000 -0400 +++ libguile/gc_os_dep.c @@ -112,12 +112,27 @@ typedef int GC_bool; # define NETBSD # define mach_type_known # endif -# if defined(__NetBSD__) && defined(m68k) +# if defined(__NetBSD__) && defined(__powerpc__) +# define POWERPC +# define NETBSD +# define mach_type_known +# endif +# if defined(__NetBSD__) && (defined(m68k) || defined(__m68k__)) # define M68K # define NETBSD # define mach_type_known # endif -# if defined(__NetBSD__) && defined(arm32) +# if defined(__NetBSD__) && (defined(__sparc__) || defined(__sparc_v9__)) +# define SPARC +# define NETBSD +# define mach_type_known +# endif +# if defined(__NetBSD__) && defined(__alpha__) +# define ALPHA +# define NETBSD +# define mach_type_known +# endif +# if defined(__NetBSD__) && (defined(arm32) || defined(__arm__)) # define ARM32 # define NETBSD # define mach_type_known @@ -241,7 +256,7 @@ typedef int GC_bool; # endif # if defined(__alpha) || defined(__alpha__) # define ALPHA -# if !defined(LINUX) +# if !defined(LINUX) && !defined(NETBSD) # define OSF1 /* a.k.a Digital Unix */ # endif # define mach_type_known @@ -294,6 +309,11 @@ typedef int GC_bool; # define NETBSD # define mach_type_known # endif +# if defined(__NetBSD__) && defined(__x86_64__) +# define X86_64 +# define NETBSD +# define mach_type_known +# endif # if defined(bsdi) && defined(i386) # define I386 # define BSDI @@ -433,12 +453,12 @@ scm_get_stack_base () /* * For each architecture and OS, the following need to be defined: * - * CPP_WORD_SZ is a simple integer constant representing the word size. + * CPP_WORDSZ is a simple integer constant representing the word size. * in bits. We assume byte addressibility, where a byte has 8 bits. - * We also assume CPP_WORD_SZ is either 32 or 64. + * We also assume CPP_WORDSZ is either 32 or 64. * (We care about the length of pointers, not hardware * bus widths. Thus a 64 bit processor with a C compiler that uses - * 32 bit pointers should use CPP_WORD_SZ of 32, not 64. Default is 32.) + * 32 bit pointers should use CPP_WORDSZ of 32, not 64. Default is 32.) * * MACH_TYPE is a string representation of the machine type. * OS_TYPE is analogous for the OS. @@ -983,6 +1003,21 @@ scm_get_stack_base () # endif # endif +# ifdef X86_64 +# define MACH_TYPE "X86_64" +# define ALIGNMENT 8 +# define ALIGN_DOUBLE +# define CPP_WORDSZ 64 +# ifdef NETBSD +# define OS_TYPE "NETBSD" +# endif +# if defined(NETBSD) +# define HEURISTIC2 + extern char etext; +# define DATASTART ((ptr_t)(&etext)) +# endif +# endif + # ifdef NS32K # define MACH_TYPE "NS32K" # define ALIGNMENT 4 _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel