[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Updating libgc port
From: |
Michael Banck |
Subject: |
Updating libgc port |
Date: |
Tue, 18 Oct 2005 21:31:12 +0200 |
User-agent: |
Mutt/1.5.9i |
Hi,
Boehm's garbage collector (libgc) has been ported to GNU/Hurd a while
ago. However, the port suffered some bitrot and now builds no more:
checking for thread model used by GCC... posix
configure: error: "Pthreads not supported by the GC on this platform."
The following patch updates the threading stuff by following what gets
defined for Linux and doing some wild guesses, could somebody with more
experience in this field than me look over it before I submit it
upstream?
diff -Naur libgc-6.5/configure.in libgc-6.5.new/configure.in
--- libgc-6.5/configure.in 2005-02-09 20:35:23.000000000 +0100
+++ libgc-6.5.new/configure.in 2005-10-18 21:04:29.238312160 +0200
@@ -90,6 +90,10 @@
AC_DEFINE(GC_LINUX_THREADS)
AC_DEFINE(_REENTRANT)
;;
+ *-*-gnu*)
+ AC_DEFINE(GC_GNU_THREADS)
+ AC_DEFINE(_REENTRANT)
+ ;;
*-*-aix*)
AC_DEFINE(GC_AIX_THREADS)
AC_DEFINE(_REENTRANT)
diff -Naur libgc-6.5/include/gc_config_macros.h
libgc-6.5.new/include/gc_config_macros.h
--- libgc-6.5/include/gc_config_macros.h 2005-04-22 02:57:34.000000000
+0200
+++ libgc-6.5.new/include/gc_config_macros.h 2005-10-18 18:42:58.000000000
+0200
@@ -42,7 +42,8 @@
|| defined(GC_SOLARIS_PTHREADS) \
|| defined(GC_HPUX_THREADS) \
|| defined(GC_AIX_THREADS) \
- || defined(GC_LINUX_THREADS))
+ || defined(GC_LINUX_THREADS)) \
+ || defined(GC_GNU_THREADS)
# define _REENTRANT
/* Better late than never. This fails if system headers that */
/* depend on this were previously included. */
@@ -56,7 +57,7 @@
defined(GC_IRIX_THREADS) || defined(GC_LINUX_THREADS) || \
defined(GC_HPUX_THREADS) || defined(GC_OSF1_THREADS) || \
defined(GC_DGUX386_THREADS) || defined(GC_DARWIN_THREADS) || \
- defined(GC_AIX_THREADS) || \
+ defined(GC_AIX_THREADS) || defined (GC_GNU_THREADS) || \
(defined(GC_WIN32_THREADS) && defined(__CYGWIN32__))
# define GC_PTHREADS
# endif
diff -Naur libgc-6.5/pthread_support.c libgc-6.5.new/pthread_support.c
--- libgc-6.5/pthread_support.c 2005-05-21 02:02:07.000000000 +0200
+++ libgc-6.5.new/pthread_support.c 2005-10-18 18:33:32.000000000 +0200
@@ -877,7 +877,8 @@
GC_nprocs = sysconf(_SC_NPROCESSORS_ONLN);
if (GC_nprocs <= 0) GC_nprocs = 1;
# endif
-# if defined(GC_FREEBSD_THREADS) || defined(GC_IRIX_THREADS)
+# if defined(GC_FREEBSD_THREADS) || defined(GC_IRIX_THREADS) \
+ || defined(GC_GNU_THREADS)
/* FIXME: For Irix, that's a ridiculous assumption. */
GC_nprocs = 1;
# endif
diff -Naur libgc-6.5/threadlibs.c libgc-6.5.new/threadlibs.c
--- libgc-6.5/threadlibs.c 2004-12-17 02:47:42.000000000 +0100
+++ libgc-6.5.new/threadlibs.c 2005-10-18 18:22:25.000000000 +0200
@@ -12,7 +12,8 @@
# endif
# if defined(GC_LINUX_THREADS) || defined(GC_IRIX_THREADS) \
|| defined(GC_SOLARIS_PTHREADS) \
- || defined(GC_DARWIN_THREADS) || defined(GC_AIX_THREADS)
+ || defined(GC_DARWIN_THREADS) || defined(GC_AIX_THREADS) \
+ || defined(GC_GNU_THREADS)
printf("-lpthread\n");
# endif
# if defined(GC_FREEBSD_THREADS)
thanks,
Michael
--
<macavity> bash: ls: Computer bought the farm
<macavity> THAT frightens ppl! :P
<macavity> id rather see: "bash: ls: Initialization of googol(AWAX)
disengaged in HYPER32/64 mode due to faulty page request at
AX:12A34F84B"
<macavity> at least that would give me the feeling that the
*programmers* knows what is going on :P
- Updating libgc port,
Michael Banck <=