openbsd x86_64 patches

svn: r4597
This commit is contained in:
Matthew Flatt 2006-10-14 00:58:14 +00:00
parent 329a32a2a5
commit b3e86a9650
5 changed files with 35 additions and 4 deletions

View File

@ -15,3 +15,4 @@ ways:
* Added case in "configure" sparc64-*-freebsd* to existing sparc64 line
* Added case in "configure" x86_64-*-openbsd* to the existing x86_64 line

View File

@ -5417,7 +5417,7 @@ arm*-*-rtems*) TARGET=ARM; TARGETDIR=arm;;
cris-*-*) TARGET=LIBFFI_CRIS; TARGETDIR=cris;;
s390-*-linux-*) TARGET=S390; TARGETDIR=s390;;
s390x-*-linux-*) TARGET=S390; TARGETDIR=s390;;
x86_64-*-linux* | x86_64-*-freebsd* | x86_64-*-kfreebsd*-gnu) TARGET=X86_64; TARGETDIR=x86;;
x86_64-*-linux* | x86_64-*-freebsd* | x86_64-*-kfreebsd*-gnu | x86_64-*-openbsd*) TARGET=X86_64; TARGETDIR=x86;;
sh-*-linux* | sh[34]*-*-linux*) TARGET=SH; TARGETDIR=sh;;
sh-*-rtems*) TARGET=SH; TARGETDIR=sh;;
sh64-*-linux* | sh5*-*-linux*) TARGET=SH64; TARGETDIR=sh64;;

View File

@ -49,6 +49,7 @@
# undef GC_must_restore_redefined_dlopen
# endif
/* PLTSCHEME: added OPENBSD: */
#if (defined(DYNAMIC_LOADING) || defined(MSWIN32) || defined(MSWINCE)) \
&& !defined(PCR)
#if !defined(SUNOS4) && !defined(SUNOS5DL) && !defined(IRIX5) && \
@ -57,6 +58,7 @@
!defined(HPUX) && !(defined(LINUX) && defined(__ELF__)) && \
!defined(RS6000) && !defined(SCO_ELF) && !defined(DGUX) && \
!(defined(FREEBSD) && defined(__ELF__)) && \
!(defined(OPENBSD) && defined(__ELF__)) && \
!(defined(NETBSD) && defined(__ELF__)) && !defined(HURD) && \
!defined(DARWIN)
--> We only know how to find data segments of dynamic libraries for the
@ -285,8 +287,10 @@ void GC_register_dynamic_libraries()
# endif /* !USE_PROC ... */
# endif /* SUNOS */
/* PLTSCHEME: added OPENBSD: */
#if defined(LINUX) && defined(__ELF__) || defined(SCO_ELF) || \
(defined(FREEBSD) && defined(__ELF__)) || defined(DGUX) || \
(defined(OPENBSD) && defined(__ELF__)) || \
(defined(NETBSD) && defined(__ELF__)) || defined(HURD)
@ -477,6 +481,9 @@ GC_bool GC_register_main_static_data()
# ifndef PF_W
# define PF_W 2
# endif
/* PLTSCHEME: OPENBSD */
#elif defined(OPENBSD)
# include <link_elf.h>
#else
# include <elf.h>
#endif
@ -487,7 +494,11 @@ GC_bool GC_register_main_static_data()
#ifdef __GNUC__
# pragma weak _DYNAMIC
#endif
/* PLTSCHEME: ifndef OPENBSD */
#ifndef OPENBSD
extern ElfW(Dyn) _DYNAMIC[];
#endif
static struct link_map *
GC_FirstDLOpenedLinkMap()

View File

@ -331,7 +331,8 @@
# define I386
# define mach_type_known
# endif
# if defined(__NetBSD__) && defined(__x86_64__)
/* PLTSCHEME: added OpenBSD: */
# if (defined(__NetBSD__) || defined(__OpenBSD__)) && defined(__x86_64__)
# define X86_64
# define mach_type_known
# endif
@ -2010,8 +2011,14 @@
extern char etext[];
# define SEARCH_FOR_DATA_START
# endif
# ifdef NETBSD
# define OS_TYPE "NETBSD"
/* PLTSCHEME: added OPENBSD: */
# if defined(NETBSD) || defined(OPENBSD)
# ifdef NETBSD
# define OS_TYPE "NETBSD"
# endif
# ifdef OPENBSD
# define OS_TYPE "OPENBSD"
# endif
# ifdef __ELF__
# define DYNAMIC_LOADING
# endif

View File

@ -223,7 +223,15 @@
#if defined(__NetBSD__)
#if defined(i386)
# define SCHEME_PLATFORM_LIBRARY_SUBPATH "i386-netbsd"
#elif defined(powerpc)
# define SCHEME_PLATFORM_LIBRARY_SUBPATH "ppc-netbsd"
#elif defined(__x86_64__)
# define SCHEME_PLATFORM_LIBRARY_SUBPATH "x86_64-netbsd"
#else
# define SCHEME_PLATFORM_LIBRARY_SUBPATH "netbsd"
#endif
# include "uconfig.h"
@ -252,6 +260,10 @@
#if defined(powerpc)
# define MZ_USE_JIT_PPC
#endif
#if defined(__x86_64__)
# define MZ_USE_JIT_X86_64
# define MZ_JIT_USE_MPROTECT
#endif
# define FLAGS_ALREADY_SET