* more machine support NetBSD - including x86-64
@ 2004-11-16 1:34 Greg Troxel
2004-11-27 19:51 ` Kevin Ryde
0 siblings, 1 reply; 5+ messages in thread
From: Greg Troxel @ 2004-11-16 1:34 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: more machine support NetBSD - including x86-64
2004-11-16 1:34 more machine support NetBSD - including x86-64 Greg Troxel
@ 2004-11-27 19:51 ` Kevin Ryde
2004-11-29 18:33 ` Greg Troxel
0 siblings, 1 reply; 5+ messages in thread
From: Kevin Ryde @ 2004-11-27 19:51 UTC (permalink / raw)
Cc: Greg Troxel
Greg Troxel <gdt@ir.bbn.com> writes:
>
> -# if defined(__NetBSD__) && defined(m68k)
> +# if defined(__NetBSD__) && (defined(m68k) || defined(__m68k__))
>
> -# if defined(__NetBSD__) && defined(arm32)
> +# if defined(__NetBSD__) && (defined(arm32) || defined(__arm__))
These are for new gcc or something are they?
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: more machine support NetBSD - including x86-64
2004-11-27 19:51 ` Kevin Ryde
@ 2004-11-29 18:33 ` Greg Troxel
2004-11-29 21:11 ` Kevin Ryde
0 siblings, 1 reply; 5+ messages in thread
From: Greg Troxel @ 2004-11-29 18:33 UTC (permalink / raw)
> -# if defined(__NetBSD__) && defined(m68k)
> +# if defined(__NetBSD__) && (defined(m68k) || defined(__m68k__))
>
> -# if defined(__NetBSD__) && defined(arm32)
> +# if defined(__NetBSD__) && (defined(arm32) || defined(__arm__))
These are for new gcc or something are they?
These are for NetBSD 2.0 with:
Using built-in specs.
Configured with: /home/nick/work/netbsd/src/tools/gcc/../../gnu/dist/gcc/configure --enable-long-long --disable-multilib --enable-threads --disable-symvers --build=i386-unknown-netbsdelf --host=i386--netbsdelf --target=i386--netbsdelf
Thread model: posix
gcc version 3.3.3 (NetBSD nb3 20040520)
I believe POSIX requires that nonstandard names other than __foo__ not
be defined in the user's namespace, or something like that.
Perhaps only the __ versions should be tested.
--
Greg Troxel <gdt@ir.bbn.com>
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: more machine support NetBSD - including x86-64
2004-11-29 18:33 ` Greg Troxel
@ 2004-11-29 21:11 ` Kevin Ryde
2004-11-30 13:57 ` Greg Troxel
0 siblings, 1 reply; 5+ messages in thread
From: Kevin Ryde @ 2004-11-29 21:11 UTC (permalink / raw)
Cc: guile-devel
Greg Troxel <gdt@ir.bbn.com> writes:
>
> Perhaps only the __ versions should be tested.
Maybe, but the plain ones do no harm and might be wanted for older
systems. I added the __'s. (Someone else will need to review the
rest of what you posted.)
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: more machine support NetBSD - including x86-64
2004-11-29 21:11 ` Kevin Ryde
@ 2004-11-30 13:57 ` Greg Troxel
0 siblings, 0 replies; 5+ messages in thread
From: Greg Troxel @ 2004-11-30 13:57 UTC (permalink / raw)
> Perhaps only the __ versions should be tested.
Maybe, but the plain ones do no harm and might be wanted for older
systems. I added the __'s.
Sure, that's fine to leave the un__ versions - if there is an issue
its with namespace pollution and defining them, not checking them
anyway. Thanks for applying this part of the patch.
(Someone else will need to review the rest of what you posted.)
OK. I don't fully grasp the details myself (no x86_64 hw).
--
Greg Troxel <gdt@ir.bbn.com>
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-11-30 13:57 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-16 1:34 more machine support NetBSD - including x86-64 Greg Troxel
2004-11-27 19:51 ` Kevin Ryde
2004-11-29 18:33 ` Greg Troxel
2004-11-29 21:11 ` Kevin Ryde
2004-11-30 13:57 ` Greg Troxel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).