- enable dwarf2 exceptions (w/major bump for libestdc++)
- add gcj support for i386, amd64 and sparc64 - add MODGCC4_LANGS=java support to gcc4.port.mk okay robert@
This commit is contained in:
parent
76712f6de0
commit
1094d158a8
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.32 2009/05/16 23:50:31 sthen Exp $
|
||||
# $OpenBSD: Makefile,v 1.33 2009/06/04 18:24:20 kurt Exp $
|
||||
|
||||
ONLY_FOR_ARCHS = alpha i386 m68k sparc sparc64 powerpc vax amd64
|
||||
#BROKEN=adjust for types changes
|
||||
@ -11,17 +11,20 @@ ADASTRAP = adastrap-i386-$V-${BOOTSTRAP_GEN}.tgz
|
||||
|
||||
PKGNAME-main = gcc-${FULL_PKGVERSION}p1
|
||||
PKGNAME-c++ = g++-${FULL_PKGVERSION}p2
|
||||
PKGNAME-estdc = libstdc++-${FULL_PKGVERSION}p1
|
||||
PKGNAME-estdc = libstdc++-${FULL_PKGVERSION}p2
|
||||
PKGNAME-g77 = g77-${FULL_PKGVERSION}p0
|
||||
PKGNAME-f95 = g95-${FULL_PKGVERSION}p1
|
||||
PKGNAME-java = gcj-${FULL_PKGVERSION}p0
|
||||
PKGNAME-objc = gobjc-${FULL_PKGVERSION}p1
|
||||
PKGNAME-ada = gnat-${FULL_PKGVERSION}p0
|
||||
SHARED_LIBS = estdc++ 10.0 \
|
||||
SHARED_LIBS = estdc++ 11.0 \
|
||||
gfortran 2.0 \
|
||||
-org-w3c-dom 1.0 \
|
||||
-org-xml-sax 1.0 \
|
||||
gcj 5.0 \
|
||||
gcj 0.0 \
|
||||
ffi 0.0 \
|
||||
gcj-tools 0.0 \
|
||||
gij 0.0 \
|
||||
objc 2.0 \
|
||||
objc_gc 2.0 \
|
||||
ssp 0.0 \
|
||||
@ -31,7 +34,10 @@ MAINTAINER = Marc Espie <espie@openbsd.org>
|
||||
|
||||
PSEUDO_FLAVORS = c++ fortran objc java ada
|
||||
.if ${MACHINE_ARCH} == "i386"
|
||||
FLAVOR ?= c++ fortran objc ada
|
||||
FLAVOR ?= c++ fortran objc ada java
|
||||
.endif
|
||||
.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "sparc64"
|
||||
FLAVOR ?= c++ fortran objc java
|
||||
.else
|
||||
FLAVOR ?= c++ fortran objc
|
||||
.endif
|
||||
@ -82,7 +88,7 @@ MULTI_PACKAGES += -objc
|
||||
.if ${FLAVOR:L:Mjava}
|
||||
LANGS := ${LANGS},java
|
||||
MULTI_PACKAGES += -java
|
||||
CONFIGURE_ARGS += --enable-java-gc=system-boehm
|
||||
BUILD_DEPENDS += :zip->=2.3p0:archivers/zip
|
||||
CONFIGURE_ARGS += --enable-libgcj
|
||||
.endif
|
||||
.if ${FLAVOR:L:Mada}
|
||||
@ -135,7 +141,6 @@ CONFIGURE_ARGS += \
|
||||
--with-gnu-ld \
|
||||
--with-gnu-as \
|
||||
--enable-threads=posix \
|
||||
--enable-sjlj-exceptions \
|
||||
--enable-languages=${LANGS}
|
||||
|
||||
# This is needed, as internal cpp is no longer compatible with the
|
||||
@ -182,15 +187,15 @@ WANTLIB = c
|
||||
|
||||
RUN_DEPENDS-main =
|
||||
RUN_DEPENDS-estdc =
|
||||
RUN_DEPENDS-java =
|
||||
|
||||
RUN_DEPENDS-c++ = ${RUN_DEPENDS} ::${PKGPATH},-estdc
|
||||
WANTLIB-estdc = c m
|
||||
WANTLIB-java = c m pthread z
|
||||
|
||||
LIB_DEPENDS-f95 = gmp:gmp->=4.2:devel/gmp \
|
||||
mpfr::devel/mpfr
|
||||
|
||||
LIB_DEPENDS-java = gc::devel/boehm-gc
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
||||
ADA_PACKAGE = ${PACKAGE_REPOSITORY}/i386/all/${PKGNAME-ada}${PKG_SUFX}
|
||||
|
@ -1,19 +1,25 @@
|
||||
# $OpenBSD: gcc4.port.mk,v 1.2 2009/05/17 09:39:58 sthen Exp $
|
||||
# $OpenBSD: gcc4.port.mk,v 1.3 2009/06/04 18:24:20 kurt Exp $
|
||||
|
||||
MODGCC4_ARCHES?=
|
||||
MODGCC4_LANGS?=
|
||||
# Supported languages for now
|
||||
_MODGCC4CC= cc
|
||||
_MODGCC4CXX= c++
|
||||
_MODGCC4G77= g77
|
||||
_MODGCC4JAVA= java
|
||||
|
||||
.if ${MODGCC4_LANGS:L} != ${_MODGCC4JAVA}
|
||||
# Always include support for this
|
||||
# unless only java is needed
|
||||
MODGCC4_LANGS+= ${_MODGCC4CC}
|
||||
.endif
|
||||
|
||||
.if ${MODGCC4_ARCHES:L} != ""
|
||||
. for _i in ${MODGCC4_ARCHES}
|
||||
. if !empty(MACHINE_ARCH:M${_i})
|
||||
BUILD_DEPENDS+= ::lang/gcc/4.2
|
||||
. for _j in ${MODGCC4_LANGS:L}
|
||||
. if !empty(_MODGCC4CC:L:M${_j})
|
||||
BUILD_DEPENDS+= ::lang/gcc/4.2
|
||||
MODGCC4_post-patch+= ln -s ${LOCALBASE}/bin/eg${_MODGCC4CC} ${WRKDIR}/bin/g${_MODGCC4CC};
|
||||
MODGCC4_post-patch+= ln -s ${LOCALBASE}/bin/eg${_MODGCC4CC} ${WRKDIR}/bin/${_MODGCC4CC};
|
||||
. endif
|
||||
@ -28,6 +34,13 @@ BUILD_DEPENDS+= ::lang/gcc/4.2,-g77
|
||||
MODGCC4_post-patch+= ln -s ${LOCALBASE}/bin/e${_MODGCC4G77} ${WRKDIR}/bin/f77;
|
||||
MODGCC4_post-patch+= ln -s ${LOCALBASE}/bin/e${_MODGCC4G77} ${WRKDIR}/bin/${_MODGCC4G77};
|
||||
. endif
|
||||
. if !empty(_MODGCC4JAVA:L:M${_j})
|
||||
BUILD_DEPENDS+= ::lang/gcc/4.2,-java
|
||||
MODGCC4_post-patch+= ln -s ${LOCALBASE}/bin/egcj ${WRKDIR}/bin/gcj;
|
||||
MODGCC4_post-patch+= ln -s ${LOCALBASE}/bin/egcjh ${WRKDIR}/bin/gcjh;
|
||||
MODGCC4_post-patch+= ln -s ${LOCALBASE}/bin/ejar ${WRKDIR}/bin/gjar;
|
||||
MODGCC4_post-patch+= ln -s ${LOCALBASE}/bin/egij ${WRKDIR}/bin/gij;
|
||||
. endif
|
||||
. endfor
|
||||
. endif
|
||||
. endfor
|
||||
|
30
lang/gcc/4.2/patches/patch-boehm-gc_Makefile_in
Normal file
30
lang/gcc/4.2/patches/patch-boehm-gc_Makefile_in
Normal file
@ -0,0 +1,30 @@
|
||||
$OpenBSD: patch-boehm-gc_Makefile_in,v 1.1 2009/06/04 18:24:20 kurt Exp $
|
||||
--- boehm-gc/Makefile.in.orig Mon May 19 10:28:07 2008
|
||||
+++ boehm-gc/Makefile.in Tue Apr 21 17:22:04 2009
|
||||
@@ -82,6 +82,7 @@ CONFIG_CLEAN_FILES =
|
||||
LTLIBRARIES = $(noinst_LTLIBRARIES)
|
||||
am__DEPENDENCIES_1 =
|
||||
@POWERPC_DARWIN_TRUE@am__objects_1 = powerpc_darwin_mach_dep.lo
|
||||
+@OPENBSD_THREADS_TRUE@am__objects_1 = openbsd_stop_world.lo
|
||||
am_libgcjgc_la_OBJECTS = allchblk.lo alloc.lo blacklst.lo checksums.lo \
|
||||
dbg_mlc.lo dyn_load.lo finalize.lo gc_dlopen.lo gcj_mlc.lo \
|
||||
headers.lo malloc.lo mallocx.lo mark.lo mark_rts.lo misc.lo \
|
||||
@@ -189,6 +190,8 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
POWERPC_DARWIN_FALSE = @POWERPC_DARWIN_FALSE@
|
||||
POWERPC_DARWIN_TRUE = @POWERPC_DARWIN_TRUE@
|
||||
+OPENBSD_THREADS_FALSE = @OPENBSD_THREADS_FALSE@
|
||||
+OPENBSD_THREADS_TRUE = @OPENBSD_THREADS_TRUE@
|
||||
RANLIB = @RANLIB@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
@@ -257,8 +260,8 @@ AUTOMAKE_OPTIONS = cygnus subdir-objects
|
||||
ACLOCAL_AMFLAGS = -I .. -I ../config
|
||||
SUBDIRS = include
|
||||
noinst_LTLIBRARIES = libgcjgc.la libgcjgc_convenience.la
|
||||
-@POWERPC_DARWIN_FALSE@asm_libgcjgc_sources =
|
||||
@POWERPC_DARWIN_TRUE@asm_libgcjgc_sources = powerpc_darwin_mach_dep.s
|
||||
+@OPENBSD_THREADS_TRUE@asm_libgcjgc_sources = openbsd_stop_world.c.s
|
||||
libgcjgc_la_SOURCES = allchblk.c alloc.c blacklst.c checksums.c dbg_mlc.c \
|
||||
dyn_load.c finalize.c gc_dlopen.c gcj_mlc.c headers.c \
|
||||
malloc.c mallocx.c mark.c mark_rts.c misc.c new_hblk.c \
|
63
lang/gcc/4.2/patches/patch-boehm-gc_configure
Normal file
63
lang/gcc/4.2/patches/patch-boehm-gc_configure
Normal file
@ -0,0 +1,63 @@
|
||||
$OpenBSD: patch-boehm-gc_configure,v 1.1 2009/06/04 18:24:20 kurt Exp $
|
||||
--- boehm-gc/configure.orig Mon May 19 10:28:07 2008
|
||||
+++ boehm-gc/configure Tue Apr 21 17:28:23 2009
|
||||
@@ -309,7 +309,7 @@ ac_includes_default="\
|
||||
# include <unistd.h>
|
||||
#endif"
|
||||
|
||||
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS multi_basedir build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical mkinstalldirs INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXX ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CFLAGS CXXFLAGS CCAS CCASFLAGS AS ac_ct_AS AR ac_ct_AR RANLIB ac_ct_RANLIB MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT GC_CFLAGS LN_S LIBTOOL CXXCPP CPPFLAGS THREADLIBS POWERPC_DARWIN_TRUE POWERPC_DARWIN_FALSE extra_ldflags_libgc EXTRA_TEST_LIBS target_all CPLUSPLUS_TRUE CPLUSPLUS_FALSE AM_CPPFLAGS addobjs addincludes addlibs addtests CPP EGREP MY_CFLAGS toolexecdir toolexeclibdir LIBOBJS LTLIBOBJS'
|
||||
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS multi_basedir build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical mkinstalldirs INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXX ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CFLAGS CXXFLAGS CCAS CCASFLAGS AS ac_ct_AS AR ac_ct_AR RANLIB ac_ct_RANLIB MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT GC_CFLAGS LN_S LIBTOOL CXXCPP CPPFLAGS THREADLIBS POWERPC_DARWIN_TRUE POWERPC_DARWIN_FALSE OPENBSD_THREADS_TRUE OPENBSD_THREADS_FALSE extra_ldflags_libgc EXTRA_TEST_LIBS target_all CPLUSPLUS_TRUE CPLUSPLUS_FALSE AM_CPPFLAGS addobjs addincludes addlibs addtests CPP EGREP MY_CFLAGS toolexecdir toolexeclibdir LIBOBJS LTLIBOBJS'
|
||||
ac_subst_files=''
|
||||
|
||||
# Initialize some variables set by options.
|
||||
@@ -5451,6 +5451,15 @@ _ACEOF
|
||||
{ echo "$as_me:$LINENO: WARNING: \"Only HP-UX 11 POSIX threads are supported.\"" >&5
|
||||
echo "$as_me: WARNING: \"Only HP-UX 11 POSIX threads are supported.\"" >&2;}
|
||||
;;
|
||||
+ *-*-openbsd*)
|
||||
+ cat >>confdefs.h <<\_ACEOF
|
||||
+#define GC_OPENBSD_THREADS 1
|
||||
+_ACEOF
|
||||
+
|
||||
+ THREADDLLIBS=-pthread
|
||||
+ INCLUDES="$INCLUDES -pthread"
|
||||
+ openbsd_threads=true
|
||||
+ ;;
|
||||
*-*-kfreebsd*-gnu)
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define GC_FREEBSD_THREADS 1
|
||||
@@ -5630,7 +5639,15 @@ else
|
||||
POWERPC_DARWIN_FALSE=
|
||||
fi
|
||||
|
||||
+if test x$openbsd_threads = xtrue; then
|
||||
+ OPENBSD_THREADS_TRUE=
|
||||
+ OPENBSD_THREADS_FALSE='#'
|
||||
+else
|
||||
+ OPENBSD_THREADS_TRUE='#'
|
||||
+ OPENBSD_THREADS_FALSE=
|
||||
+fi
|
||||
|
||||
+
|
||||
# Darwin needs a few extra special tests to deal with variation in the
|
||||
# system headers.
|
||||
case "$host" in
|
||||
@@ -6887,6 +6904,9 @@ _ACEOF
|
||||
sparc-*-netbsd*)
|
||||
machdep="sparc_netbsd_mach_dep.lo"
|
||||
;;
|
||||
+ sparc*-*-openbsd*)
|
||||
+ machdep="sparc_mach_dep.lo"
|
||||
+ ;;
|
||||
sparc-sun-solaris2.3)
|
||||
machdep="sparc_mach_dep.lo"
|
||||
|
||||
@@ -8482,6 +8502,8 @@ s,@CPPFLAGS@,$CPPFLAGS,;t t
|
||||
s,@THREADLIBS@,$THREADLIBS,;t t
|
||||
s,@POWERPC_DARWIN_TRUE@,$POWERPC_DARWIN_TRUE,;t t
|
||||
s,@POWERPC_DARWIN_FALSE@,$POWERPC_DARWIN_FALSE,;t t
|
||||
+s,@OPENBSD_THREADS_TRUE@,$OPENBSD_THREADS_TRUE,;t t
|
||||
+s,@OPENBSD_THREADS_FALSE@,$OPENBSD_THREADS_FALSE,;t t
|
||||
s,@extra_ldflags_libgc@,$extra_ldflags_libgc,;t t
|
||||
s,@EXTRA_TEST_LIBS@,$EXTRA_TEST_LIBS,;t t
|
||||
s,@target_all@,$target_all,;t t
|
48
lang/gcc/4.2/patches/patch-boehm-gc_dyn_load_c
Normal file
48
lang/gcc/4.2/patches/patch-boehm-gc_dyn_load_c
Normal file
@ -0,0 +1,48 @@
|
||||
$OpenBSD: patch-boehm-gc_dyn_load_c,v 1.1 2009/06/04 18:24:20 kurt Exp $
|
||||
--- boehm-gc/dyn_load.c.orig Mon Sep 18 14:45:08 2006
|
||||
+++ boehm-gc/dyn_load.c Thu Jan 29 17:20:51 2009
|
||||
@@ -57,6 +57,7 @@
|
||||
!defined(HPUX) && !(defined(LINUX) && defined(__ELF__)) && \
|
||||
!defined(RS6000) && !defined(SCO_ELF) && !defined(DGUX) && \
|
||||
!(defined(FREEBSD) && defined(__ELF__)) && \
|
||||
+ !(defined(OPENBSD) && (defined(__ELF__) || defined(M68K))) && \
|
||||
!(defined(NETBSD) && defined(__ELF__)) && !defined(HURD) && \
|
||||
!defined(DARWIN)
|
||||
--> We only know how to find data segments of dynamic libraries for the
|
||||
@@ -87,9 +88,9 @@
|
||||
|
||||
#if defined(LINUX) && defined(__ELF__) || defined(SCO_ELF) || \
|
||||
(defined(FREEBSD) && defined(__ELF__)) || defined(DGUX) || \
|
||||
+ (defined(OPENBSD) && defined(__ELF__)) || \
|
||||
(defined(NETBSD) && defined(__ELF__)) || defined(HURD)
|
||||
# include <stddef.h>
|
||||
-# include <elf.h>
|
||||
# include <link.h>
|
||||
#endif
|
||||
|
||||
@@ -103,7 +104,7 @@
|
||||
# define ElfW(type) Elf64_##type
|
||||
# endif
|
||||
# else
|
||||
-# ifdef NETBSD
|
||||
+# if defined(NETBSD) || defined(OPENBSD)
|
||||
# if ELFSIZE == 32
|
||||
# define ElfW(type) Elf32_##type
|
||||
# else
|
||||
@@ -298,6 +299,7 @@ void GC_register_dynamic_libraries()
|
||||
|
||||
#if defined(LINUX) && defined(__ELF__) || defined(SCO_ELF) || \
|
||||
(defined(FREEBSD) && defined(__ELF__)) || defined(DGUX) || \
|
||||
+ (defined(OPENBSD) && defined(__ELF__)) || \
|
||||
(defined(NETBSD) && defined(__ELF__)) || defined(HURD)
|
||||
|
||||
|
||||
@@ -481,7 +483,7 @@ GC_bool GC_register_main_static_data()
|
||||
/* This doesn't necessarily work in all cases, e.g. with preloaded
|
||||
* dynamic libraries. */
|
||||
|
||||
-#if defined(NETBSD)
|
||||
+#if defined(NETBSD) || defined(OPENBSD)
|
||||
# include <sys/exec_elf.h>
|
||||
/* for compatibility with 1.4.x */
|
||||
# ifndef DT_DEBUG
|
13
lang/gcc/4.2/patches/patch-boehm-gc_include_gc_config_h_in
Normal file
13
lang/gcc/4.2/patches/patch-boehm-gc_include_gc_config_h_in
Normal file
@ -0,0 +1,13 @@
|
||||
$OpenBSD: patch-boehm-gc_include_gc_config_h_in,v 1.1 2009/06/04 18:24:20 kurt Exp $
|
||||
--- boehm-gc/include/gc_config.h.in.orig Thu Mar 12 12:32:48 2009
|
||||
+++ boehm-gc/include/gc_config.h.in Thu Mar 12 12:33:31 2009
|
||||
@@ -30,6 +30,9 @@
|
||||
/* support FreeBSD threads */
|
||||
#undef GC_FREEBSD_THREADS
|
||||
|
||||
+/* support OpenBSD threads */
|
||||
+#undef GC_OPENBSD_THREADS
|
||||
+
|
||||
/* include support for gcj */
|
||||
#undef GC_GCJ_SUPPORT
|
||||
|
@ -0,0 +1,24 @@
|
||||
$OpenBSD: patch-boehm-gc_include_gc_config_macros_h,v 1.1 2009/06/04 18:24:20 kurt Exp $
|
||||
--- boehm-gc/include/gc_config_macros.h.orig Thu Mar 5 17:41:35 2009
|
||||
+++ boehm-gc/include/gc_config_macros.h Thu Mar 5 17:42:12 2009
|
||||
@@ -21,7 +21,8 @@
|
||||
defined(GC_HPUX_THREADS) || defined(GC_OSF1_THREADS) || \
|
||||
defined(GC_DGUX386_THREADS) || defined(GC_DARWIN_THREADS) || \
|
||||
defined(GC_AIX_THREADS) || \
|
||||
- (defined(GC_WIN32_THREADS) && defined(__CYGWIN32__))
|
||||
+ (defined(GC_WIN32_THREADS) && defined(__CYGWIN32__)) || \
|
||||
+ defined(GC_OPENBSD_THREADS)
|
||||
# define GC_PTHREADS
|
||||
# endif
|
||||
|
||||
@@ -49,6 +50,10 @@
|
||||
# endif
|
||||
# if defined(__APPLE__) && defined(__MACH__) && defined(__ppc__)
|
||||
# define GC_DARWIN_THREADS
|
||||
+# define GC_PTHREADS
|
||||
+# endif
|
||||
+# if !defined(GC_PTHREADS) && defined(__OpenBSD__)
|
||||
+# define GC_OPENBSD_THREADS
|
||||
# define GC_PTHREADS
|
||||
# endif
|
||||
# if !defined(GC_PTHREADS) && defined(__FreeBSD__)
|
@ -0,0 +1,25 @@
|
||||
$OpenBSD: patch-boehm-gc_include_gc_pthread_redirects_h,v 1.1 2009/06/04 18:24:20 kurt Exp $
|
||||
--- boehm-gc/include/gc_pthread_redirects.h.orig Thu Mar 12 17:49:44 2009
|
||||
+++ boehm-gc/include/gc_pthread_redirects.h Thu Mar 12 17:56:49 2009
|
||||
@@ -52,7 +52,7 @@
|
||||
int GC_pthread_create(pthread_t *new_thread,
|
||||
const pthread_attr_t *attr,
|
||||
void *(*start_routine)(void *), void *arg);
|
||||
-#ifndef GC_DARWIN_THREADS
|
||||
+#if !defined(GC_DARWIN_THREADS) && !defined(GC_OPENBSD_THREADS)
|
||||
int GC_pthread_sigmask(int how, const sigset_t *set, sigset_t *oset);
|
||||
#endif
|
||||
int GC_pthread_join(pthread_t thread, void **retval);
|
||||
@@ -72,8 +72,11 @@
|
||||
# define pthread_join GC_pthread_join
|
||||
# define pthread_detach GC_pthread_detach
|
||||
|
||||
-#ifndef GC_DARWIN_THREADS
|
||||
+#if !defined(GC_DARWIN_THREADS) && !defined(GC_OPENBSD_THREADS)
|
||||
# define pthread_sigmask GC_pthread_sigmask
|
||||
+#endif
|
||||
+
|
||||
+#ifndef GC_DARWIN_THREADS
|
||||
# define dlopen GC_dlopen
|
||||
#endif
|
||||
|
356
lang/gcc/4.2/patches/patch-boehm-gc_include_private_gcconfig_h
Normal file
356
lang/gcc/4.2/patches/patch-boehm-gc_include_private_gcconfig_h
Normal file
@ -0,0 +1,356 @@
|
||||
$OpenBSD: patch-boehm-gc_include_private_gcconfig_h,v 1.1 2009/06/04 18:24:20 kurt Exp $
|
||||
--- boehm-gc/include/private/gcconfig.h.orig Mon Jul 2 10:59:47 2007
|
||||
+++ boehm-gc/include/private/gcconfig.h Tue Apr 21 17:22:04 2009
|
||||
@@ -62,7 +62,7 @@
|
||||
/* Determine the machine type: */
|
||||
# if defined(__arm__) || defined(__thumb__)
|
||||
# define ARM32
|
||||
-# if !defined(LINUX) && !defined(NETBSD)
|
||||
+# if !defined(LINUX) && !defined(NETBSD) && !defined(OPENBSD)
|
||||
# define NOSYS
|
||||
# define mach_type_known
|
||||
# endif
|
||||
@@ -77,14 +77,18 @@
|
||||
# define HP
|
||||
# define mach_type_known
|
||||
# endif
|
||||
-# if defined(OPENBSD) && defined(m68k)
|
||||
-# define M68K
|
||||
-# define mach_type_known
|
||||
-# endif
|
||||
# if defined(OPENBSD) && defined(__sparc__)
|
||||
# define SPARC
|
||||
# define mach_type_known
|
||||
# endif
|
||||
+# if defined(OPENBSD) && defined(__arm__)
|
||||
+# define ARM32
|
||||
+# define mach_type_known
|
||||
+# endif
|
||||
+# if defined(OPENBSD) && defined(__sh__)
|
||||
+# define SH
|
||||
+# define mach_type_known
|
||||
+# endif
|
||||
# if defined(NETBSD) && (defined(m68k) || defined(__m68k__))
|
||||
# define M68K
|
||||
# define mach_type_known
|
||||
@@ -101,7 +105,7 @@
|
||||
# define SH
|
||||
# define mach_type_known
|
||||
# endif
|
||||
-# if defined(vax)
|
||||
+# if defined(vax) || defined(__vax__)
|
||||
# define VAX
|
||||
# ifdef ultrix
|
||||
# define ULTRIX
|
||||
@@ -119,7 +123,7 @@
|
||||
# if defined(nec_ews) || defined(_nec_ews)
|
||||
# define EWS4800
|
||||
# endif
|
||||
-# if !defined(LINUX) && !defined(EWS4800) && !defined(NETBSD)
|
||||
+# if !defined(LINUX) && !defined(EWS4800) && !defined(NETBSD) && !defined(OPENBSD)
|
||||
# if defined(ultrix) || defined(__ultrix)
|
||||
# define ULTRIX
|
||||
# else
|
||||
@@ -210,7 +214,7 @@
|
||||
# if defined(_PA_RISC1_0) || defined(_PA_RISC1_1) || defined(_PA_RISC2_0) \
|
||||
|| defined(hppa) || defined(__hppa__)
|
||||
# define HP_PA
|
||||
-# if !defined(LINUX) && !defined(HPUX)
|
||||
+# if !defined(LINUX) && !defined(HPUX) && !defined(OPENBSD)
|
||||
# define HPUX
|
||||
# endif
|
||||
# define mach_type_known
|
||||
@@ -231,6 +235,10 @@
|
||||
# define I386
|
||||
# define mach_type_known
|
||||
# endif
|
||||
+# if defined(OPENBSD) && defined(__amd64__)
|
||||
+# define X86_64
|
||||
+# define mach_type_known
|
||||
+# endif
|
||||
# if defined(LINUX) && defined(__x86_64__)
|
||||
# define X86_64
|
||||
# define mach_type_known
|
||||
@@ -302,6 +310,11 @@
|
||||
# define MACOS
|
||||
# define mach_type_known
|
||||
# endif
|
||||
+# if defined(__OpenBSD__) && (defined(__powerpc__))
|
||||
+# define POWERPC
|
||||
+# define OPENBSD
|
||||
+# define mach_type_known
|
||||
+# endif
|
||||
# if defined(macosx) || (defined(__APPLE__) && defined(__MACH__))
|
||||
# define DARWIN
|
||||
# if defined(__ppc__) || defined(__ppc64__)
|
||||
@@ -651,18 +664,6 @@
|
||||
# ifdef M68K
|
||||
# define MACH_TYPE "M68K"
|
||||
# define ALIGNMENT 2
|
||||
-# ifdef OPENBSD
|
||||
-# define OS_TYPE "OPENBSD"
|
||||
-# define HEURISTIC2
|
||||
-# ifdef __ELF__
|
||||
-# define DATASTART GC_data_start
|
||||
-# define DYNAMIC_LOADING
|
||||
-# else
|
||||
- extern char etext[];
|
||||
-# define DATASTART ((ptr_t)(etext))
|
||||
-# endif
|
||||
-# define USE_GENERIC_PUSH_REGS
|
||||
-# endif
|
||||
# ifdef NETBSD
|
||||
# define OS_TYPE "NETBSD"
|
||||
# define HEURISTIC2
|
||||
@@ -836,6 +837,24 @@
|
||||
should be looked into some more */
|
||||
# define NO_PTHREAD_TRYLOCK
|
||||
# endif
|
||||
+# ifdef OPENBSD
|
||||
+# define OS_TYPE "OPENBSD"
|
||||
+# define ALIGNMENT 4
|
||||
+# ifdef GC_OPENBSD_THREADS
|
||||
+# define UTHREAD_SP_OFFSET 268
|
||||
+# else
|
||||
+# include <sys/param.h>
|
||||
+# include <uvm/uvm_extern.h>
|
||||
+# define STACKBOTTOM USRSTACK
|
||||
+# endif
|
||||
+ extern int __data_start[];
|
||||
+# define DATASTART ((ptr_t)(__data_start))
|
||||
+ extern char _end[];
|
||||
+# define DATAEND ((ptr_t)(&_end))
|
||||
+# define DYNAMIC_LOADING
|
||||
+# define USE_MMAP
|
||||
+# define USE_MMAP_ANON
|
||||
+# endif
|
||||
# ifdef FREEBSD
|
||||
# define ALIGNMENT 4
|
||||
# define OS_TYPE "FREEBSD"
|
||||
@@ -994,9 +1013,20 @@
|
||||
# endif
|
||||
# ifdef OPENBSD
|
||||
# define OS_TYPE "OPENBSD"
|
||||
-# define STACKBOTTOM ((ptr_t) 0xf8000000)
|
||||
- extern int etext[];
|
||||
-# define DATASTART ((ptr_t)(etext))
|
||||
+# ifdef GC_OPENBSD_THREADS
|
||||
+# define UTHREAD_SP_OFFSET 232
|
||||
+# else
|
||||
+# include <sys/param.h>
|
||||
+# include <uvm/uvm_extern.h>
|
||||
+# define STACKBOTTOM USRSTACK
|
||||
+# endif
|
||||
+ extern int __data_start[];
|
||||
+# define DATASTART ((ptr_t)(__data_start))
|
||||
+ extern char _end[];
|
||||
+# define DATAEND ((ptr_t)(&_end))
|
||||
+# define DYNAMIC_LOADING
|
||||
+# define USE_MMAP
|
||||
+# define USE_MMAP_ANON
|
||||
# endif
|
||||
# ifdef NETBSD
|
||||
# define OS_TYPE "NETBSD"
|
||||
@@ -1250,6 +1280,20 @@
|
||||
# endif
|
||||
# ifdef OPENBSD
|
||||
# define OS_TYPE "OPENBSD"
|
||||
+# ifdef GC_OPENBSD_THREADS
|
||||
+# define UTHREAD_SP_OFFSET 176
|
||||
+# else
|
||||
+# include <sys/param.h>
|
||||
+# include <uvm/uvm_extern.h>
|
||||
+# define STACKBOTTOM USRSTACK
|
||||
+# endif
|
||||
+ extern int __data_start[];
|
||||
+# define DATASTART ((ptr_t)(__data_start))
|
||||
+ extern char _end[];
|
||||
+# define DATAEND ((ptr_t)(&_end))
|
||||
+# define DYNAMIC_LOADING
|
||||
+# define USE_MMAP
|
||||
+# define USE_MMAP_ANON
|
||||
# endif
|
||||
# ifdef FREEBSD
|
||||
# define OS_TYPE "FREEBSD"
|
||||
@@ -1285,7 +1329,7 @@
|
||||
# ifdef BSDI
|
||||
# define OS_TYPE "BSDI"
|
||||
# endif
|
||||
-# if defined(OPENBSD) || defined(NETBSD) \
|
||||
+# if defined(NETBSD) \
|
||||
|| defined(THREE86BSD) || defined(BSDI)
|
||||
# define HEURISTIC2
|
||||
extern char etext[];
|
||||
@@ -1463,8 +1507,25 @@
|
||||
# define STACKBOTTOM ((ptr_t) 0x7ffff000)
|
||||
# endif /* _ELF_ */
|
||||
# endif
|
||||
+# ifdef OPENBSD
|
||||
+# define OS_TYPE "OPENBSD"
|
||||
+# define ALIGNMENT 4
|
||||
+# ifdef GC_OPENBSD_THREADS
|
||||
+# define UTHREAD_SP_OFFSET 808
|
||||
+# else
|
||||
+# include <sys/param.h>
|
||||
+# include <uvm/uvm_extern.h>
|
||||
+# define STACKBOTTOM USRSTACK
|
||||
+# endif
|
||||
+ extern int _fdata[];
|
||||
+# define DATASTART ((ptr_t)(_fdata))
|
||||
+ extern char _end[];
|
||||
+# define DATAEND ((ptr_t)(&_end))
|
||||
+# define DYNAMIC_LOADING
|
||||
+# define USE_MMAP
|
||||
+# define USE_MMAP_ANON
|
||||
+# endif
|
||||
# endif
|
||||
-
|
||||
# ifdef RS6000
|
||||
# define MACH_TYPE "RS6000"
|
||||
# ifdef ALIGNMENT
|
||||
@@ -1510,7 +1571,7 @@
|
||||
# define ALIGNMENT 4
|
||||
# define ALIGN_DOUBLE
|
||||
# endif
|
||||
-# if !defined(GC_HPUX_THREADS) && !defined(GC_LINUX_THREADS)
|
||||
+# if !defined(GC_HPUX_THREADS) && !defined(GC_LINUX_THREADS) && !defined(OPENBSD)
|
||||
# ifndef LINUX /* For now. */
|
||||
# define MPROTECT_VDB
|
||||
# endif
|
||||
@@ -1562,6 +1623,23 @@
|
||||
extern int _end[];
|
||||
# define DATAEND (&_end)
|
||||
# endif /* LINUX */
|
||||
+# ifdef OPENBSD
|
||||
+# define OS_TYPE "OPENBSD"
|
||||
+# ifdef GC_OPENBSD_THREADS
|
||||
+# define UTHREAD_SP_OFFSET 520
|
||||
+# else
|
||||
+# include <sys/param.h>
|
||||
+# include <uvm/uvm_extern.h>
|
||||
+# define STACKBOTTOM USRSTACK
|
||||
+# endif
|
||||
+ extern int __data_start[];
|
||||
+# define DATASTART ((ptr_t)(__data_start))
|
||||
+ extern char _end[];
|
||||
+# define DATAEND ((ptr_t)(&_end))
|
||||
+# define DYNAMIC_LOADING
|
||||
+# define USE_MMAP
|
||||
+# define USE_MMAP_ANON
|
||||
+# endif
|
||||
# endif /* HP_PA */
|
||||
|
||||
# ifdef ALPHA
|
||||
@@ -1586,15 +1664,21 @@
|
||||
# endif
|
||||
# ifdef OPENBSD
|
||||
# define OS_TYPE "OPENBSD"
|
||||
-# define HEURISTIC2
|
||||
-# ifdef __ELF__ /* since OpenBSD/Alpha 2.9 */
|
||||
-# define DATASTART GC_data_start
|
||||
-# define ELFCLASS32 32
|
||||
-# define ELFCLASS64 64
|
||||
-# define ELF_CLASS ELFCLASS64
|
||||
-# else /* ECOFF, until OpenBSD/Alpha 2.7 */
|
||||
-# define DATASTART ((ptr_t) 0x140000000)
|
||||
-# endif
|
||||
+# define ELF_CLASS ELFCLASS64
|
||||
+# ifdef GC_OPENBSD_THREADS
|
||||
+# define UTHREAD_SP_OFFSET 816
|
||||
+# else
|
||||
+# include <sys/param.h>
|
||||
+# include <uvm/uvm_extern.h>
|
||||
+# define STACKBOTTOM USRSTACK
|
||||
+# endif
|
||||
+ extern int __data_start[];
|
||||
+# define DATASTART ((ptr_t)(__data_start))
|
||||
+ extern char _end[];
|
||||
+# define DATAEND ((ptr_t)(&_end))
|
||||
+# define DYNAMIC_LOADING
|
||||
+# define USE_MMAP
|
||||
+# define USE_MMAP_ANON
|
||||
# endif
|
||||
# ifdef FREEBSD
|
||||
# define OS_TYPE "FREEBSD"
|
||||
@@ -1774,6 +1858,7 @@
|
||||
# ifdef CX_UX
|
||||
# define OS_TYPE "CX_UX"
|
||||
# define DATASTART ((((word)etext + 0x3fffff) & ~0x3fffff) + 0x10000)
|
||||
+# define STACKBOTTOM ((char*)0xf0000000) /* determined empirically */
|
||||
# endif
|
||||
# ifdef DGUX
|
||||
# define OS_TYPE "DGUX"
|
||||
@@ -1884,6 +1969,24 @@
|
||||
# define OS_TYPE "MSWINCE"
|
||||
# define DATAEND /* not needed */
|
||||
# endif
|
||||
+# ifdef OPENBSD
|
||||
+# define ALIGNMENT 4
|
||||
+# define OS_TYPE "OPENBSD"
|
||||
+# ifdef GC_OPENBSD_THREADS
|
||||
+# define UTHREAD_SP_OFFSET 176
|
||||
+# else
|
||||
+# include <sys/param.h>
|
||||
+# include <uvm/uvm_extern.h>
|
||||
+# define STACKBOTTOM USRSTACK
|
||||
+# endif
|
||||
+ extern int __data_start[];
|
||||
+# define DATASTART ((ptr_t)(__data_start))
|
||||
+ extern char _end[];
|
||||
+# define DATAEND ((ptr_t)(&_end))
|
||||
+# define DYNAMIC_LOADING
|
||||
+# define USE_MMAP
|
||||
+# define USE_MMAP_ANON
|
||||
+# endif
|
||||
# ifdef NOSYS
|
||||
/* __data_start is usually defined in the target linker script. */
|
||||
extern int __data_start[];
|
||||
@@ -1931,6 +2034,23 @@
|
||||
# define USE_GENERIC_PUSH_REGS
|
||||
# define DYNAMIC_LOADING
|
||||
# endif
|
||||
+# ifdef OPENBSD
|
||||
+# define OS_TYPE "OPENBSD"
|
||||
+# ifdef GC_OPENBSD_THREADS
|
||||
+# define UTHREAD_SP_OFFSET 332
|
||||
+# else
|
||||
+# include <sys/param.h>
|
||||
+# include <uvm/uvm_extern.h>
|
||||
+# define STACKBOTTOM USRSTACK
|
||||
+# endif
|
||||
+ extern int __data_start[];
|
||||
+# define DATASTART ((ptr_t)(__data_start))
|
||||
+ extern char _end[];
|
||||
+# define DATAEND ((ptr_t)(&_end))
|
||||
+# define DYNAMIC_LOADING
|
||||
+# define USE_MMAP
|
||||
+# define USE_MMAP_ANON
|
||||
+# endif
|
||||
# endif
|
||||
|
||||
# ifdef SH4
|
||||
@@ -1963,6 +2083,24 @@
|
||||
# define CPP_WORDSZ 64
|
||||
# ifndef HBLKSIZE
|
||||
# define HBLKSIZE 4096
|
||||
+# endif
|
||||
+# ifdef OPENBSD
|
||||
+# define OS_TYPE "OPENBSD"
|
||||
+# define ELF_CLASS ELFCLASS64
|
||||
+# ifdef GC_OPENBSD_THREADS
|
||||
+# define UTHREAD_SP_OFFSET 400
|
||||
+# else
|
||||
+# include <sys/param.h>
|
||||
+# include <uvm/uvm_extern.h>
|
||||
+# define STACKBOTTOM USRSTACK
|
||||
+# endif
|
||||
+ extern int __data_start[];
|
||||
+# define DATASTART ((ptr_t)(__data_start))
|
||||
+ extern char _end[];
|
||||
+# define DATAEND ((ptr_t)(&_end))
|
||||
+# define DYNAMIC_LOADING
|
||||
+# define USE_MMAP
|
||||
+# define USE_MMAP_ANON
|
||||
# endif
|
||||
# define CACHE_LINE_SIZE 64
|
||||
# define USE_GENERIC_PUSH_REGS
|
@ -0,0 +1,16 @@
|
||||
$OpenBSD: patch-boehm-gc_include_private_openbsd_stop_world_h,v 1.1 2009/06/04 18:24:20 kurt Exp $
|
||||
--- boehm-gc/include/private/openbsd_stop_world.h.orig Thu Mar 5 17:44:00 2009
|
||||
+++ boehm-gc/include/private/openbsd_stop_world.h Thu Mar 5 17:44:00 2009
|
||||
@@ -0,0 +1,12 @@
|
||||
+#ifndef GC_OPENBSD_STOP_WORLD_H
|
||||
+#define GC_OPENBSD_STOP_WORLD_H
|
||||
+
|
||||
+#if !defined(GC_OPENBSD_THREADS)
|
||||
+#error openbsd_stop_world.h included without GC_OPENBSD_THREADS defined
|
||||
+#endif
|
||||
+
|
||||
+struct thread_stop_info {
|
||||
+ ptr_t stack_ptr; /* Valid only when stopped. */
|
||||
+};
|
||||
+
|
||||
+#endif
|
21
lang/gcc/4.2/patches/patch-boehm-gc_mach_dep_c
Normal file
21
lang/gcc/4.2/patches/patch-boehm-gc_mach_dep_c
Normal file
@ -0,0 +1,21 @@
|
||||
$OpenBSD: patch-boehm-gc_mach_dep_c,v 1.1 2009/06/04 18:24:20 kurt Exp $
|
||||
--- boehm-gc/mach_dep.c.orig Mon Mar 16 17:49:33 2009
|
||||
+++ boehm-gc/mach_dep.c Mon Mar 16 17:51:42 2009
|
||||
@@ -27,7 +27,7 @@
|
||||
# endif
|
||||
# endif
|
||||
|
||||
-#if defined(RS6000) || defined(POWERPC)
|
||||
+#if (defined(RS6000) || defined(POWERPC)) && !defined(OPENBSD)
|
||||
# include <ucontext.h>
|
||||
#endif
|
||||
|
||||
@@ -417,7 +417,7 @@ ptr_t arg;
|
||||
/* the stack. */
|
||||
__builtin_unwind_init();
|
||||
# else /* !HAVE_BUILTIN_UNWIND_INIT */
|
||||
-# if defined(RS6000) || defined(POWERPC)
|
||||
+# if (defined(RS6000) || defined(POWERPC)) && !defined(OPENBSD)
|
||||
/* FIXME: RS6000 means AIX. */
|
||||
/* This should probably be used in all Posix/non-gcc */
|
||||
/* settings. We defer that change to minimize risk. */
|
12
lang/gcc/4.2/patches/patch-boehm-gc_misc_c
Normal file
12
lang/gcc/4.2/patches/patch-boehm-gc_misc_c
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-boehm-gc_misc_c,v 1.1 2009/06/04 18:24:20 kurt Exp $
|
||||
--- boehm-gc/misc.c.orig Thu Jan 29 17:29:56 2009
|
||||
+++ boehm-gc/misc.c Thu Jan 29 17:30:08 2009
|
||||
@@ -660,7 +660,7 @@ void GC_init_inner()
|
||||
# if defined(SEARCH_FOR_DATA_START)
|
||||
GC_init_linux_data_start();
|
||||
# endif
|
||||
-# if (defined(NETBSD) || defined(OPENBSD)) && defined(__ELF__)
|
||||
+# if defined(NETBSD) && defined(__ELF__)
|
||||
GC_init_netbsd_elf();
|
||||
# endif
|
||||
# if defined(GC_PTHREADS) || defined(GC_SOLARIS_THREADS) \
|
188
lang/gcc/4.2/patches/patch-boehm-gc_openbsd_stop_world_c
Normal file
188
lang/gcc/4.2/patches/patch-boehm-gc_openbsd_stop_world_c
Normal file
@ -0,0 +1,188 @@
|
||||
$OpenBSD: patch-boehm-gc_openbsd_stop_world_c,v 1.1 2009/06/04 18:24:20 kurt Exp $
|
||||
--- boehm-gc/openbsd_stop_world.c.orig Thu Mar 12 15:07:24 2009
|
||||
+++ boehm-gc/openbsd_stop_world.c Thu Mar 12 18:07:50 2009
|
||||
@@ -0,0 +1,184 @@
|
||||
+#include "private/pthread_support.h"
|
||||
+
|
||||
+/* derived from pthread_stop_world.c */
|
||||
+
|
||||
+# if defined(GC_OPENBSD_THREADS)
|
||||
+
|
||||
+/* We hold allocation lock. Should do exactly the right thing if the */
|
||||
+/* world is stopped. Should not fail if it isn't. */
|
||||
+void GC_push_all_stacks()
|
||||
+{
|
||||
+ GC_bool found_me = FALSE;
|
||||
+ size_t nthreads = 0;
|
||||
+ int i;
|
||||
+ GC_thread p;
|
||||
+ ptr_t lo, hi;
|
||||
+ pthread_t me = pthread_self();
|
||||
+
|
||||
+ if (!GC_thr_initialized) GC_thr_init();
|
||||
+# if DEBUG_THREADS
|
||||
+ GC_printf1("Pushing stacks from thread 0x%x\n", (unsigned) me);
|
||||
+# endif
|
||||
+ for (i = 0; i < THREAD_TABLE_SZ; i++) {
|
||||
+ for (p = GC_threads[i]; p != 0; p = p -> next) {
|
||||
+ if (p -> flags & FINISHED) continue;
|
||||
+ ++nthreads;
|
||||
+ if (pthread_equal(p -> id, me)) {
|
||||
+# ifdef SPARC
|
||||
+ lo = (ptr_t)GC_save_regs_in_stack();
|
||||
+# else
|
||||
+ lo = GC_approx_sp();
|
||||
+# endif
|
||||
+ found_me = TRUE;
|
||||
+ } else {
|
||||
+ lo = p -> stop_info.stack_ptr;
|
||||
+ }
|
||||
+ if ((p -> flags & MAIN_THREAD) == 0) {
|
||||
+ hi = p -> stack_end;
|
||||
+ } else {
|
||||
+ /* The original stack. */
|
||||
+ hi = GC_stackbottom;
|
||||
+ }
|
||||
+# if DEBUG_THREADS
|
||||
+ GC_printf3("Stack for thread 0x%x = [%p,%p)\n",
|
||||
+ (unsigned)(p -> id), lo, hi);
|
||||
+# endif
|
||||
+ if (0 == lo) ABORT("GC_push_all_stacks: sp not set!\n");
|
||||
+# ifdef STACK_GROWS_UP
|
||||
+ /* We got them backwards! */
|
||||
+ GC_push_all_stack(hi, lo);
|
||||
+# else
|
||||
+ GC_push_all_stack(lo, hi);
|
||||
+# endif
|
||||
+ }
|
||||
+ }
|
||||
+ if (GC_print_stats) {
|
||||
+ GC_printf1("Pushed %d thread stacks\n", nthreads);
|
||||
+ }
|
||||
+ if (!found_me && !GC_in_thread_creation)
|
||||
+ ABORT("Collecting from unknown thread.");
|
||||
+}
|
||||
+
|
||||
+/* We hold the allocation lock. Suspend all threads that might */
|
||||
+/* still be running. */
|
||||
+void GC_suspend_all()
|
||||
+{
|
||||
+ int i;
|
||||
+ GC_thread p;
|
||||
+ int result;
|
||||
+ pthread_t my_thread = pthread_self();
|
||||
+
|
||||
+ for (i = 0; i < THREAD_TABLE_SZ; i++) {
|
||||
+ for (p = GC_threads[i]; p != 0; p = p -> next) {
|
||||
+ if (!pthread_equal(p -> id, my_thread)) {
|
||||
+ if (p -> flags & FINISHED) continue;
|
||||
+ if (p -> thread_blocked) /* Will wait */ continue;
|
||||
+# if DEBUG_THREADS
|
||||
+ GC_printf1("Suspending thread 0x%x\n",
|
||||
+ (unsigned)(p -> id));
|
||||
+# endif
|
||||
+
|
||||
+ if (pthread_suspend_np(p -> id) != 0)
|
||||
+ ABORT("pthread_suspend_np failed");
|
||||
+
|
||||
+ /*
|
||||
+ * This will only work for userland pthreads. It will
|
||||
+ * fail badly on rthreads. Perhaps we should consider
|
||||
+ * a pthread_sp_np() function that returns the stack
|
||||
+ * pointer for a suspended thread and implement in
|
||||
+ * both pthreads and rthreads.
|
||||
+ */
|
||||
+ p -> stop_info.stack_ptr = *(ptr_t*)((char *)p -> id + UTHREAD_SP_OFFSET);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+void GC_stop_world()
|
||||
+{
|
||||
+ int i;
|
||||
+
|
||||
+ GC_ASSERT(I_HOLD_LOCK());
|
||||
+# if DEBUG_THREADS
|
||||
+ GC_printf1("Stopping the world from 0x%x\n", (unsigned)pthread_self());
|
||||
+# endif
|
||||
+
|
||||
+ /* Make sure all free list construction has stopped before we start. */
|
||||
+ /* No new construction can start, since free list construction is */
|
||||
+ /* required to acquire and release the GC lock before it starts, */
|
||||
+ /* and we have the lock. */
|
||||
+# ifdef PARALLEL_MARK
|
||||
+ GC_acquire_mark_lock();
|
||||
+ GC_ASSERT(GC_fl_builder_count == 0);
|
||||
+ /* We should have previously waited for it to become zero. */
|
||||
+# endif /* PARALLEL_MARK */
|
||||
+
|
||||
+ GC_suspend_all();
|
||||
+
|
||||
+# ifdef PARALLEL_MARK
|
||||
+ GC_release_mark_lock();
|
||||
+# endif
|
||||
+ #if DEBUG_THREADS
|
||||
+ GC_printf1("World stopped from 0x%x\n", (unsigned)pthread_self());
|
||||
+ #endif
|
||||
+}
|
||||
+
|
||||
+/* Caller holds allocation lock, and has held it continuously since */
|
||||
+/* the world stopped. */
|
||||
+void GC_start_world()
|
||||
+{
|
||||
+ pthread_t my_thread = pthread_self();
|
||||
+ register int i;
|
||||
+ register GC_thread p;
|
||||
+ register int result;
|
||||
+
|
||||
+# if DEBUG_THREADS
|
||||
+ GC_printf0("World starting\n");
|
||||
+# endif
|
||||
+
|
||||
+ for (i = 0; i < THREAD_TABLE_SZ; i++) {
|
||||
+ for (p = GC_threads[i]; p != 0; p = p -> next) {
|
||||
+ if (!pthread_equal(p -> id, my_thread)) {
|
||||
+ if (p -> flags & FINISHED) continue;
|
||||
+ if (p -> thread_blocked) continue;
|
||||
+ #if DEBUG_THREADS
|
||||
+ GC_printf1("Resuming thread 0x%x\n",
|
||||
+ (unsigned)(p -> id));
|
||||
+ #endif
|
||||
+
|
||||
+ if (pthread_resume_np(p -> id) != 0)
|
||||
+ ABORT("pthread_kill failed");
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+# if DEBUG_THREADS
|
||||
+ GC_printf0("World started\n");
|
||||
+# endif
|
||||
+}
|
||||
+
|
||||
+void GC_stop_init() {
|
||||
+}
|
||||
+
|
||||
+void GC_suspend_thread(pthread_t thread) {
|
||||
+ if (thread == pthread_self()) {
|
||||
+ ABORT("attempting to suspend self");
|
||||
+ } else {
|
||||
+ GC_thread t = GC_lookup_thread(thread);
|
||||
+ if (t == NULL)
|
||||
+ ABORT("attempting to suspend unknown thread");
|
||||
+
|
||||
+ if (pthread_suspend_np(t -> id) != 0)
|
||||
+ ABORT("pthread_suspend_np failed");
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+void GC_resume_thread(pthread_t thread) {
|
||||
+ GC_thread t = GC_lookup_thread(thread);
|
||||
+ if (t == NULL)
|
||||
+ ABORT("attempting to resume unknown thread");
|
||||
+
|
||||
+ if (pthread_resume_np(t -> id) != 0)
|
||||
+ ABORT("pthread_resume_np failed");
|
||||
+}
|
||||
+
|
||||
+#endif
|
190
lang/gcc/4.2/patches/patch-boehm-gc_os_dep_c
Normal file
190
lang/gcc/4.2/patches/patch-boehm-gc_os_dep_c
Normal file
@ -0,0 +1,190 @@
|
||||
$OpenBSD: patch-boehm-gc_os_dep_c,v 1.1 2009/06/04 18:24:20 kurt Exp $
|
||||
--- boehm-gc/os_dep.c.orig Tue Jan 16 14:44:17 2007
|
||||
+++ boehm-gc/os_dep.c Thu Mar 5 17:11:21 2009
|
||||
@@ -380,7 +380,7 @@ static void *tiny_sbrk(ptrdiff_t increment)
|
||||
#define sbrk tiny_sbrk
|
||||
# endif /* ECOS */
|
||||
|
||||
-#if (defined(NETBSD) || defined(OPENBSD)) && defined(__ELF__)
|
||||
+#if defined(NETBSD) && defined(__ELF__)
|
||||
ptr_t GC_data_start;
|
||||
|
||||
void GC_init_netbsd_elf()
|
||||
@@ -393,6 +393,103 @@ static void *tiny_sbrk(ptrdiff_t increment)
|
||||
}
|
||||
#endif
|
||||
|
||||
+#if defined(OPENBSD)
|
||||
+ static struct sigaction old_segv_act;
|
||||
+ sigjmp_buf GC_jmp_buf_openbsd;
|
||||
+
|
||||
+# if defined(GC_OPENBSD_THREADS)
|
||||
+# include <sys/syscall.h>
|
||||
+ sigset_t __syscall(quad_t, ...);
|
||||
+# endif
|
||||
+
|
||||
+ /*
|
||||
+ * Dont use GC_find_limit() because siglongjmp out of the
|
||||
+ * signal handler by-passes our userland pthreads lib, leaving
|
||||
+ * SIGSEGV and SIGPROF masked. Instead use this custom one
|
||||
+ * that works-around the issues.
|
||||
+ */
|
||||
+
|
||||
+ /*ARGSUSED*/
|
||||
+ void GC_fault_handler_openbsd(int sig)
|
||||
+ {
|
||||
+ siglongjmp(GC_jmp_buf_openbsd, 1);
|
||||
+ }
|
||||
+
|
||||
+ /* Return the first nonaddressible location > p or bound */
|
||||
+ /* Requires allocation lock. */
|
||||
+ ptr_t GC_find_limit_openbsd(ptr_t p, ptr_t bound)
|
||||
+ {
|
||||
+ static volatile ptr_t result;
|
||||
+ /* Safer if static, since otherwise it may not be */
|
||||
+ /* preserved across the longjmp. Can safely be */
|
||||
+ /* static since it's only called with the */
|
||||
+ /* allocation lock held. */
|
||||
+ struct sigaction act;
|
||||
+ size_t pgsz = (size_t)sysconf(_SC_PAGESIZE);
|
||||
+
|
||||
+ GC_ASSERT(I_HOLD_LOCK());
|
||||
+
|
||||
+ act.sa_handler = GC_fault_handler_openbsd;
|
||||
+ sigemptyset(&act.sa_mask);
|
||||
+ act.sa_flags = SA_NODEFER | SA_RESTART;
|
||||
+ sigaction(SIGSEGV, &act, &old_segv_act);
|
||||
+
|
||||
+ if (sigsetjmp(GC_jmp_buf_openbsd, 1) == 0) {
|
||||
+ result = (ptr_t)(((word)(p)) & ~(pgsz-1));
|
||||
+ for (;;) {
|
||||
+ result += pgsz;
|
||||
+ if (result >= bound) {
|
||||
+ result = bound;
|
||||
+ break;
|
||||
+ }
|
||||
+ GC_noop1((word)(*result));
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+# if defined(GC_OPENBSD_THREADS)
|
||||
+ /* due to the siglongjump we need to manually unmask SIGPROF */
|
||||
+ __syscall(SYS_sigprocmask, SIG_UNBLOCK, sigmask(SIGPROF));
|
||||
+# endif
|
||||
+
|
||||
+ sigaction(SIGSEGV, &old_segv_act, 0);
|
||||
+
|
||||
+ return(result);
|
||||
+ }
|
||||
+
|
||||
+ /* Return first addressable location > p or bound */
|
||||
+ /* Requires allocation lock. */
|
||||
+ ptr_t GC_skip_hole_openbsd(ptr_t p, ptr_t bound)
|
||||
+ {
|
||||
+ static volatile ptr_t result;
|
||||
+ struct sigaction act;
|
||||
+ size_t pgsz = (size_t)sysconf(_SC_PAGESIZE);
|
||||
+ static volatile int firstpass;
|
||||
+
|
||||
+ GC_ASSERT(I_HOLD_LOCK());
|
||||
+
|
||||
+ act.sa_handler = GC_fault_handler_openbsd;
|
||||
+ sigemptyset(&act.sa_mask);
|
||||
+ act.sa_flags = SA_NODEFER | SA_RESTART;
|
||||
+ sigaction(SIGSEGV, &act, &old_segv_act);
|
||||
+
|
||||
+ firstpass = 1;
|
||||
+ result = (ptr_t)(((word)(p)) & ~(pgsz-1));
|
||||
+ if (sigsetjmp(GC_jmp_buf_openbsd, 1) != 0 || firstpass) {
|
||||
+ firstpass = 0;
|
||||
+ result += pgsz;
|
||||
+ if (result >= bound) {
|
||||
+ result = bound;
|
||||
+ } else
|
||||
+ GC_noop1((word)(*result));
|
||||
+ }
|
||||
+
|
||||
+ sigaction(SIGSEGV, &old_segv_act, 0);
|
||||
+
|
||||
+ return(result);
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
+
|
||||
# ifdef OS2
|
||||
|
||||
# include <stddef.h>
|
||||
@@ -1007,7 +1104,8 @@ ptr_t GC_get_stack_base()
|
||||
#endif /* FREEBSD_STACKBOTTOM */
|
||||
|
||||
#if !defined(BEOS) && !defined(AMIGA) && !defined(MSWIN32) \
|
||||
- && !defined(MSWINCE) && !defined(OS2) && !defined(NOSYS) && !defined(ECOS)
|
||||
+ && !defined(MSWINCE) && !defined(OS2) && !defined(NOSYS) && !defined(ECOS) \
|
||||
+ && !defined(GC_OPENBSD_THREADS)
|
||||
|
||||
ptr_t GC_get_stack_base()
|
||||
{
|
||||
@@ -1067,6 +1165,23 @@ ptr_t GC_get_stack_base()
|
||||
|
||||
# endif /* ! AMIGA, !OS 2, ! MS Windows, !BEOS, !NOSYS, !ECOS */
|
||||
|
||||
+#if defined(GC_OPENBSD_THREADS)
|
||||
+
|
||||
+/* Find the stack using pthread_stackseg_np() */
|
||||
+
|
||||
+# include <sys/signal.h>
|
||||
+# include <pthread.h>
|
||||
+# include <pthread_np.h>
|
||||
+
|
||||
+#define HAVE_GET_STACK_BASE
|
||||
+
|
||||
+ptr_t GC_get_stack_base()
|
||||
+{
|
||||
+ stack_t stack;
|
||||
+ pthread_stackseg_np(pthread_self(), &stack);
|
||||
+ return stack.ss_sp;
|
||||
+}
|
||||
+#endif /* GC_OPENBSD_THREADS */
|
||||
/*
|
||||
* Register static data segment(s) as roots.
|
||||
* If more data segments are added later then they need to be registered
|
||||
@@ -1434,6 +1549,31 @@ int * etext_addr;
|
||||
|
||||
#else /* !OS2 && !Windows && !AMIGA */
|
||||
|
||||
+#if defined(OPENBSD)
|
||||
+
|
||||
+/*
|
||||
+ * Depending on arch alignment there can be multiple holes
|
||||
+ * between DATASTART & DATAEND. Scan from DATASTART - DATAEND
|
||||
+ * and register each region.
|
||||
+ */
|
||||
+void GC_register_data_segments(void)
|
||||
+{
|
||||
+ ptr_t region_start, region_end;
|
||||
+
|
||||
+ region_start = DATASTART;
|
||||
+
|
||||
+ for(;;) {
|
||||
+ region_end = GC_find_limit_openbsd(region_start, DATAEND);
|
||||
+ GC_add_roots_inner(region_start, region_end, FALSE);
|
||||
+ if (region_end < DATAEND)
|
||||
+ region_start = GC_skip_hole_openbsd(region_end, DATAEND);
|
||||
+ else
|
||||
+ break;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+# else /* !OS2 && !Windows && !AMIGA && !OPENBSD */
|
||||
+
|
||||
void GC_register_data_segments()
|
||||
{
|
||||
# if !defined(PCR) && !defined(SRC_M3) && !defined(MACOS)
|
||||
@@ -1491,6 +1631,7 @@ void GC_register_data_segments()
|
||||
/* change. */
|
||||
}
|
||||
|
||||
+# endif /* ! OPENBSD */
|
||||
# endif /* ! AMIGA */
|
||||
# endif /* ! MSWIN32 && ! MSWINCE*/
|
||||
# endif /* ! OS2 */
|
13
lang/gcc/4.2/patches/patch-boehm-gc_pthread_stop_world_c
Normal file
13
lang/gcc/4.2/patches/patch-boehm-gc_pthread_stop_world_c
Normal file
@ -0,0 +1,13 @@
|
||||
$OpenBSD: patch-boehm-gc_pthread_stop_world_c,v 1.1 2009/06/04 18:24:20 kurt Exp $
|
||||
--- boehm-gc/pthread_stop_world.c.orig Thu Mar 5 17:50:41 2009
|
||||
+++ boehm-gc/pthread_stop_world.c Thu Mar 5 17:51:12 2009
|
||||
@@ -1,7 +1,8 @@
|
||||
#include "private/pthread_support.h"
|
||||
|
||||
#if defined(GC_PTHREADS) && !defined(GC_SOLARIS_THREADS) \
|
||||
- && !defined(GC_WIN32_THREADS) && !defined(GC_DARWIN_THREADS)
|
||||
+ && !defined(GC_WIN32_THREADS) && !defined(GC_DARWIN_THREADS) \
|
||||
+ && !defined(GC_OPENBSD_THREADS)
|
||||
|
||||
#include <signal.h>
|
||||
#include <semaphore.h>
|
22
lang/gcc/4.2/patches/patch-boehm-gc_pthread_support_c
Normal file
22
lang/gcc/4.2/patches/patch-boehm-gc_pthread_support_c
Normal file
@ -0,0 +1,22 @@
|
||||
$OpenBSD: patch-boehm-gc_pthread_support_c,v 1.1 2009/06/04 18:24:20 kurt Exp $
|
||||
--- boehm-gc/pthread_support.c.orig Sat Oct 13 11:01:29 2007
|
||||
+++ boehm-gc/pthread_support.c Tue Apr 21 17:22:05 2009
|
||||
@@ -892,6 +892,9 @@ void GC_thr_init()
|
||||
GC_nprocs = sysconf(_SC_NPROC_ONLN);
|
||||
if (GC_nprocs <= 0) GC_nprocs = 1;
|
||||
# endif
|
||||
+# if defined(GC_OPENBSD_THREADS)
|
||||
+ GC_nprocs = 1;
|
||||
+# endif
|
||||
# if defined(GC_DARWIN_THREADS) || defined(GC_FREEBSD_THREADS)
|
||||
int ncpus = 1;
|
||||
size_t len = sizeof(ncpus);
|
||||
@@ -966,7 +969,7 @@ void GC_init_parallel()
|
||||
}
|
||||
|
||||
|
||||
-#if !defined(GC_DARWIN_THREADS)
|
||||
+#if !defined(GC_DARWIN_THREADS) && !defined(GC_OPENBSD_THREADS)
|
||||
int WRAP_FUNC(pthread_sigmask)(int how, const sigset_t *set, sigset_t *oset)
|
||||
{
|
||||
sigset_t fudged_set;
|
13
lang/gcc/4.2/patches/patch-boehm-gc_tests_test_c
Normal file
13
lang/gcc/4.2/patches/patch-boehm-gc_tests_test_c
Normal file
@ -0,0 +1,13 @@
|
||||
$OpenBSD: patch-boehm-gc_tests_test_c,v 1.1 2009/06/04 18:24:20 kurt Exp $
|
||||
--- boehm-gc/tests/test.c.orig Thu Mar 5 17:57:38 2009
|
||||
+++ boehm-gc/tests/test.c Thu Mar 5 17:58:02 2009
|
||||
@@ -1799,7 +1799,8 @@ main()
|
||||
|
||||
pthread_attr_init(&attr);
|
||||
# if defined(GC_IRIX_THREADS) || defined(GC_FREEBSD_THREADS) \
|
||||
- || defined(GC_DARWIN_THREADS) || defined(GC_AIX_THREADS)
|
||||
+ || defined(GC_DARWIN_THREADS) || defined(GC_AIX_THREADS) \
|
||||
+ || defined(GC_OPENBSD_THREADS)
|
||||
pthread_attr_setstacksize(&attr, 1000000);
|
||||
# endif
|
||||
n_tests = 0;
|
13
lang/gcc/4.2/patches/patch-boehm-gc_threadlibs_c
Normal file
13
lang/gcc/4.2/patches/patch-boehm-gc_threadlibs_c
Normal file
@ -0,0 +1,13 @@
|
||||
$OpenBSD: patch-boehm-gc_threadlibs_c,v 1.1 2009/06/04 18:24:20 kurt Exp $
|
||||
--- boehm-gc/threadlibs.c.orig Thu Mar 5 17:58:11 2009
|
||||
+++ boehm-gc/threadlibs.c Thu Mar 5 17:58:54 2009
|
||||
@@ -15,6 +15,9 @@ int main()
|
||||
|| defined(GC_DARWIN_THREADS) || defined(GC_AIX_THREADS)
|
||||
printf("-lpthread\n");
|
||||
# endif
|
||||
+# if defined(GC_OPENBSD_THREADS)
|
||||
+ printf("-pthread\n");
|
||||
+# endif
|
||||
# if defined(GC_FREEBSD_THREADS)
|
||||
# if (__FREEBSD_version >= 500000)
|
||||
printf("-lpthread\n");
|
12
lang/gcc/4.2/patches/patch-configure
Normal file
12
lang/gcc/4.2/patches/patch-configure
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-configure,v 1.1 2009/06/04 18:24:20 kurt Exp $
|
||||
--- configure.orig Tue Mar 3 10:14:47 2009
|
||||
+++ configure Tue Mar 3 10:21:11 2009
|
||||
@@ -1243,6 +1243,8 @@ case "${target}" in
|
||||
skipdirs="$skipdirs zlib fastjar target-libjava target-boehm-gc target-zlib"
|
||||
noconfigdirs="$noconfigdirs target-libgloss"
|
||||
;;
|
||||
+ *-*-openbsd*)
|
||||
+ ;;
|
||||
*-*-netbsd*)
|
||||
# Skip some stuff on all NetBSD configurations.
|
||||
noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss"
|
13
lang/gcc/4.2/patches/patch-libffi_Makefile_in
Normal file
13
lang/gcc/4.2/patches/patch-libffi_Makefile_in
Normal file
@ -0,0 +1,13 @@
|
||||
$OpenBSD: patch-libffi_Makefile_in,v 1.1 2009/06/04 18:24:20 kurt Exp $
|
||||
--- libffi/Makefile.in.orig Tue Apr 21 17:37:05 2009
|
||||
+++ libffi/Makefile.in Tue Apr 21 17:40:07 2009
|
||||
@@ -428,7 +428,8 @@ nodist_libffi_la_SOURCES = $(am__append_1) $(am__appen
|
||||
libffi_convenience_la_SOURCES = $(libffi_la_SOURCES)
|
||||
nodist_libffi_convenience_la_SOURCES = $(nodist_libffi_la_SOURCES)
|
||||
AM_CFLAGS = -Wall -g -fexceptions
|
||||
-libffi_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version`
|
||||
+include $(top_srcdir)/../libversions
|
||||
+libffi_la_LDFLAGS = $(LIBffi_LTVERSION)
|
||||
AM_CPPFLAGS = -I. -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src
|
||||
AM_CCASFLAGS = $(AM_CPPFLAGS)
|
||||
all: fficonfig.h
|
@ -1,7 +1,22 @@
|
||||
$OpenBSD: patch-libffi_configure,v 1.1 2009/04/16 18:36:48 espie Exp $
|
||||
--- libffi/configure.orig Sun Apr 12 20:02:53 2009
|
||||
+++ libffi/configure Sun Apr 12 20:03:27 2009
|
||||
@@ -5390,6 +5390,7 @@ i*86-*-solaris*) TARGET=X86; TARGETDIR=x86;;
|
||||
$OpenBSD: patch-libffi_configure,v 1.2 2009/06/04 18:24:20 kurt Exp $
|
||||
--- libffi/configure.orig Mon May 19 10:28:07 2008
|
||||
+++ libffi/configure Tue Apr 21 17:29:31 2009
|
||||
@@ -3464,6 +3464,14 @@ linux-gnu*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
+openbsd*)
|
||||
+ if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
|
||||
+ lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
|
||||
+ else
|
||||
+ lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
|
||||
+ fi
|
||||
+ ;;
|
||||
+
|
||||
netbsd* | knetbsd*-gnu)
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
|
||||
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
|
||||
@@ -5390,6 +5398,7 @@ i*86-*-solaris*) TARGET=X86; TARGETDIR=x86;;
|
||||
i*86-*-beos*) TARGET=X86; TARGETDIR=x86;;
|
||||
i*86-*-darwin*) TARGET=X86_DARWIN; TARGETDIR=x86;;
|
||||
i*86-*-freebsd* | i*86-*-kfreebsd*-gnu) TARGET=X86; TARGETDIR=x86;;
|
||||
@ -9,3 +24,27 @@ $OpenBSD: patch-libffi_configure,v 1.1 2009/04/16 18:36:48 espie Exp $
|
||||
i*86-*-netbsdelf* | i*86-*-knetbsd*-gnu) TARGET=X86; TARGETDIR=x86;;
|
||||
i*86-*-rtems*) TARGET=X86; TARGETDIR=x86;;
|
||||
i*86-*-win32*) TARGET=X86_WIN32; TARGETDIR=x86;;
|
||||
@@ -5401,6 +5410,7 @@ sparc*-sun-*) TARGET=SPARC; TARGETDIR=sparc;;
|
||||
sparc-*-linux* | sparc-*-netbsdelf* | sparc-*-knetbsd*-gnu) TARGET=SPARC; TARGETDIR=sparc;;
|
||||
sparc*-*-rtems*) TARGET=SPARC; TARGETDIR=sparc;;
|
||||
sparc64-*-linux* | sparc64-*-freebsd* | sparc64-*-netbsd* | sparc64-*-knetbsd*-gnu) TARGET=SPARC; TARGETDIR=sparc;;
|
||||
+sparc64-*-openbsd*) TARGET=SPARC; TARGETDIR=sparc;;
|
||||
alpha*-*-linux* | alpha*-*-osf* | alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu | alpha*-*-netbsd* | alpha*-*-knetbsd*-gnu)
|
||||
TARGET=ALPHA; TARGETDIR=alpha
|
||||
# Support 128-bit long double, changable via command-line switch.
|
||||
@@ -5417,6 +5427,7 @@ powerpc-*-beos*) TARGET=POWERPC; TARGETDIR=powerpc;;
|
||||
powerpc-*-darwin*) TARGET=POWERPC_DARWIN; TARGETDIR=powerpc;;
|
||||
powerpc-*-aix*) TARGET=POWERPC_AIX; TARGETDIR=powerpc;;
|
||||
powerpc-*-freebsd*) TARGET=POWERPC_FREEBSD; TARGETDIR=powerpc;;
|
||||
+powerpc-*-openbsd*) TARGET=POWERPC_FREEBSD; TARGETDIR=powerpc;;
|
||||
powerpc*-*-rtems*) TARGET=POWERPC; TARGETDIR=powerpc;;
|
||||
rs6000-*-aix*) TARGET=POWERPC_AIX; TARGETDIR=powerpc;;
|
||||
arm*-*-linux-*) TARGET=ARM; TARGETDIR=arm;;
|
||||
@@ -5426,6 +5437,7 @@ 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-*-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;;
|
||||
|
11
lang/gcc/4.2/patches/patch-libffi_src_powerpc_ffitarget_h
Normal file
11
lang/gcc/4.2/patches/patch-libffi_src_powerpc_ffitarget_h
Normal file
@ -0,0 +1,11 @@
|
||||
$OpenBSD: patch-libffi_src_powerpc_ffitarget_h,v 1.1 2009/06/04 18:24:20 kurt Exp $
|
||||
--- libffi/src/powerpc/ffitarget.h.orig Mon Mar 16 21:39:23 2009
|
||||
+++ libffi/src/powerpc/ffitarget.h Mon Mar 16 21:43:52 2009
|
||||
@@ -71,6 +71,7 @@ typedef enum ffi_abi {
|
||||
FFI_SYSV,
|
||||
FFI_GCC_SYSV,
|
||||
FFI_LINUX64,
|
||||
+ FFI_LINUX,
|
||||
FFI_DEFAULT_ABI = FFI_SYSV,
|
||||
#endif
|
||||
|
36
lang/gcc/4.2/patches/patch-libjava_Makefile_in
Normal file
36
lang/gcc/4.2/patches/patch-libjava_Makefile_in
Normal file
@ -0,0 +1,36 @@
|
||||
$OpenBSD: patch-libjava_Makefile_in,v 1.1 2009/06/04 18:24:20 kurt Exp $
|
||||
--- libjava/Makefile.in.orig Tue Apr 21 17:41:26 2009
|
||||
+++ libjava/Makefile.in Tue Apr 21 17:50:13 2009
|
||||
@@ -772,12 +772,13 @@ AM_CPPFLAGS = -I$(top_srcdir) \
|
||||
$(GCINCS) $(THREADINCS) $(INCLTDL) \
|
||||
$(GCC_UNWIND_INCLUDE) $(ZINCS) $(LIBFFIINCS)
|
||||
|
||||
+include $(top_srcdir)/../libversions
|
||||
BOOTCLASSPATH = $(here)/classpath/lib
|
||||
libgij_la_SOURCES = gij.cc
|
||||
libgij_la_DEPENDENCIES = libgcj.la libgcj.spec
|
||||
libgij_la_LIBADD = -L$(here)/.libs libgcj.la
|
||||
libgij_la_LDFLAGS = -rpath $(toolexeclibdir) \
|
||||
- -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LIBGCJ_LD_SYMBOLIC)
|
||||
+ $(LIBgij_LTVERSION) $(LIBGCJ_LD_SYMBOLIC)
|
||||
|
||||
libgcj_la_SOURCES = prims.cc jni.cc jvmti.cc exception.cc \
|
||||
stacktrace.cc link.cc defineclass.cc interpret.cc verify.cc \
|
||||
@@ -792,7 +793,7 @@ xlib_nat_files = $(xlib_nat_source_files:.cc=.lo)
|
||||
# certain linuxthread functions get linked:
|
||||
libgcj_la_LDFLAGS = -rpath $(toolexeclibdir) $(THREADLDFLAGS) $(THREADLIBS) \
|
||||
$(LIBLTDL) $(SYS_ZLIBS) \
|
||||
- -version-info `grep -v '^\#' $(srcdir)/libtool-version`
|
||||
+ $(LIBgcj_LTVERSION)
|
||||
|
||||
libgcj_la_LIBADD = \
|
||||
classpath/native/fdlibm/libfdlibm.la \
|
||||
@@ -809,7 +810,7 @@ libgcj_la_LINK = $(LIBLINK)
|
||||
libgcj_tools_la_SOURCES = classpath/tools/tools.jar
|
||||
libgcj_tools_la_GCJFLAGS = $(AM_GCJFLAGS) -findirect-dispatch -fno-indirect-classes
|
||||
libgcj_tools_la_LDFLAGS = -rpath $(toolexeclibdir) \
|
||||
- -version-info `grep -v '^\#' $(srcdir)/libtool-version`
|
||||
+ $(LIBgcj_tools_LTVERSION)
|
||||
|
||||
libgcj_tools_la_DEPENDENCIES = libgcj.la libgcj.spec
|
||||
libgcj_tools_la_LINK = $(LIBLINK)
|
14
lang/gcc/4.2/patches/patch-libjava_configure
Normal file
14
lang/gcc/4.2/patches/patch-libjava_configure
Normal file
@ -0,0 +1,14 @@
|
||||
$OpenBSD: patch-libjava_configure,v 1.1 2009/06/04 18:24:20 kurt Exp $
|
||||
--- libjava/configure.orig Wed Jan 17 13:10:26 2007
|
||||
+++ libjava/configure Tue Mar 3 14:45:15 2009
|
||||
@@ -9168,6 +9168,10 @@ case "$THREADS" in
|
||||
THREADLDFLAGS=-pthread
|
||||
THREADSPEC=-lpthread
|
||||
;;
|
||||
+ *-*-openbsd*)
|
||||
+ THREADLDFLAGS=-pthread
|
||||
+ THREADSPEC=-lpthread
|
||||
+ ;;
|
||||
alpha*-dec-osf* | hppa*-hp-hpux*)
|
||||
THREADCXXFLAGS=-pthread
|
||||
# boehm-gc needs some functions from librt, so link that too.
|
16
lang/gcc/4.2/patches/patch-libjava_configure_host
Normal file
16
lang/gcc/4.2/patches/patch-libjava_configure_host
Normal file
@ -0,0 +1,16 @@
|
||||
$OpenBSD: patch-libjava_configure_host,v 1.1 2009/06/04 18:24:20 kurt Exp $
|
||||
--- libjava/configure.host.orig Tue Jul 10 13:02:57 2007
|
||||
+++ libjava/configure.host Tue Apr 21 17:22:08 2009
|
||||
@@ -275,6 +275,12 @@ EOF
|
||||
slow_pthread_self=
|
||||
can_unwind_signal=no
|
||||
;;
|
||||
+ *-*-openbsd*)
|
||||
+ enable_hash_synchronization_default=no
|
||||
+ libgcj_flags="${libgcj_flags} -fno-omit-frame-pointer"
|
||||
+ can_unwind_signal=no
|
||||
+ slow_pthread_self=no
|
||||
+ ;;
|
||||
*-*-freebsd*)
|
||||
slow_pthread_self=
|
||||
;;
|
13
lang/gcc/4.2/patches/patch-libjava_libltdl_configure
Normal file
13
lang/gcc/4.2/patches/patch-libjava_libltdl_configure
Normal file
@ -0,0 +1,13 @@
|
||||
$OpenBSD: patch-libjava_libltdl_configure,v 1.1 2009/06/04 18:24:20 kurt Exp $
|
||||
--- libjava/libltdl/configure.orig Mon Mar 16 09:26:51 2009
|
||||
+++ libjava/libltdl/configure Mon Mar 16 09:27:07 2009
|
||||
@@ -7294,9 +7294,6 @@ cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e
|
||||
with_gnu_ld=no
|
||||
fi
|
||||
;;
|
||||
- openbsd*)
|
||||
- with_gnu_ld=no
|
||||
- ;;
|
||||
esac
|
||||
|
||||
ld_shlibs=yes
|
22
lang/gcc/4.2/pkg/PFRAG.PIC-java
Normal file
22
lang/gcc/4.2/pkg/PFRAG.PIC-java
Normal file
@ -0,0 +1,22 @@
|
||||
@comment $OpenBSD: PFRAG.PIC-java,v 1.1 2009/06/04 18:24:20 kurt Exp $
|
||||
lib/fpic/
|
||||
lib/fpic/gcj-${V}/
|
||||
@comment lib/fpic/gcj-${V}/classmap.db
|
||||
lib/fpic/gcj-${V}/libjvm.a
|
||||
lib/fpic/gcj-${V}/libjvm.la
|
||||
@comment lib/fpic/gcj-${V}/libjvm.so
|
||||
lib/fpic/libffi.a
|
||||
lib/fpic/libffi.la
|
||||
@comment @lib lib/fpic/libffi.so.${LIBffi_VERSION}
|
||||
lib/fpic/libgcj-tools.a
|
||||
lib/fpic/libgcj-tools.la
|
||||
@comment @lib lib/fpic/libgcj-tools.so.${LIBgcj-tools_VERSION}
|
||||
lib/fpic/libgcj.a
|
||||
lib/fpic/libgcj.la
|
||||
@comment @lib lib/fpic/libgcj.so.${LIBgcj_VERSION}
|
||||
lib/fpic/libgij.a
|
||||
lib/fpic/libgij.la
|
||||
@comment @lib lib/fpic/libgij.so.${LIBgij_VERSION}
|
||||
@comment lib/fpic/logging.properties
|
||||
@comment lib/fpic/security/
|
||||
@comment lib/fpic/security/classpath.security
|
6
lang/gcc/4.2/pkg/PFRAG.shared-java
Normal file
6
lang/gcc/4.2/pkg/PFRAG.shared-java
Normal file
@ -0,0 +1,6 @@
|
||||
@comment $OpenBSD: PFRAG.shared-java,v 1.1 2009/06/04 18:24:20 kurt Exp $
|
||||
lib/gcj-${V}/libjvm.so
|
||||
@lib lib/libffi.so.${LIBffi_VERSION}
|
||||
@lib lib/libgcj-tools.so.${LIBgcj-tools_VERSION}
|
||||
@lib lib/libgcj.so.${LIBgcj_VERSION}
|
||||
@lib lib/libgij.so.${LIBgij_VERSION}
|
3823
lang/gcc/4.2/pkg/PLIST-java
Normal file
3823
lang/gcc/4.2/pkg/PLIST-java
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user