head 1.25; access; symbols pkgsrc-2013Q2:1.25.0.18 pkgsrc-2013Q2-base:1.25 pkgsrc-2012Q4:1.25.0.16 pkgsrc-2012Q4-base:1.25 pkgsrc-2011Q4:1.25.0.14 pkgsrc-2011Q4-base:1.25 pkgsrc-2011Q2:1.25.0.12 pkgsrc-2011Q2-base:1.25 pkgsrc-2009Q4:1.25.0.10 pkgsrc-2009Q4-base:1.25 pkgsrc-2008Q4:1.25.0.8 pkgsrc-2008Q4-base:1.25 pkgsrc-2008Q3:1.25.0.6 pkgsrc-2008Q3-base:1.25 cube-native-xorg:1.25.0.4 cube-native-xorg-base:1.25 pkgsrc-2008Q2:1.25.0.2 pkgsrc-2008Q2-base:1.25 pkgsrc-2008Q1:1.24.0.6 pkgsrc-2008Q1-base:1.24 pkgsrc-2007Q4:1.24.0.4 pkgsrc-2007Q4-base:1.24 pkgsrc-2007Q3:1.24.0.2 pkgsrc-2007Q3-base:1.24 pkgsrc-2007Q2:1.23.0.4 pkgsrc-2007Q2-base:1.23 pkgsrc-2007Q1:1.23.0.2 pkgsrc-2007Q1-base:1.23 pkgsrc-2006Q4:1.22.0.4 pkgsrc-2006Q4-base:1.22 pkgsrc-2006Q3:1.22.0.2 pkgsrc-2006Q3-base:1.22 pkgsrc-2006Q2:1.21.0.8 pkgsrc-2006Q2-base:1.21 pkgsrc-2006Q1:1.21.0.6 pkgsrc-2006Q1-base:1.21 pkgsrc-2005Q4:1.21.0.4 pkgsrc-2005Q4-base:1.21 pkgsrc-2005Q3:1.21.0.2 pkgsrc-2005Q3-base:1.21 pkgsrc-2005Q2:1.20.0.4 pkgsrc-2005Q2-base:1.20 pkgsrc-2005Q1:1.20.0.2 pkgsrc-2005Q1-base:1.20 pkgsrc-2004Q4:1.19.0.4 pkgsrc-2004Q4-base:1.19 pkgsrc-2004Q3:1.19.0.2 pkgsrc-2004Q3-base:1.19 pkgsrc-2004Q2:1.16.0.2 pkgsrc-2004Q2-base:1.16 pkgsrc-2004Q1:1.14.0.4 pkgsrc-2004Q1-base:1.14 pkgsrc-2003Q4:1.14.0.2 pkgsrc-2003Q4-base:1.14 netbsd-1-6-1:1.11.0.2 netbsd-1-6-1-base:1.11 netbsd-1-6:1.8.0.8 netbsd-1-6-RELEASE-base:1.8 pkgviews:1.8.0.4 pkgviews-base:1.8 buildlink2:1.8.0.2 buildlink2-base:1.8 netbsd-1-5-PATCH003:1.8 netbsd-1-5-PATCH001:1.7 netbsd-1-5-RELEASE:1.3 netbsd-1-4-PATCH003:1.3 netbsd-1-4-PATCH002:1.1 comdex-fall-1999:1.1; locks; strict; comment @# @; 1.25 date 2008.05.22.11.45.25; author wiz; state dead; branches; next 1.24; 1.24 date 2007.07.07.15.21.08; author wiz; state Exp; branches; next 1.23; 1.23 date 2007.01.25.03.13.59; author dmcmahill; state Exp; branches; next 1.22; 1.22 date 2006.07.17.17.08.16; author wiz; state dead; branches; next 1.21; 1.21 date 2005.09.08.15.22.53; author reed; state Exp; branches; next 1.20; 1.20 date 2005.02.19.21.19.50; author wiz; state dead; branches; next 1.19; 1.19 date 2004.07.13.14.22.27; author recht; state Exp; branches; next 1.18; 1.18 date 2004.07.09.00.18.54; author recht; state dead; branches; next 1.17; 1.17 date 2004.06.28.15.45.18; author toshii; state Exp; branches; next 1.16; 1.16 date 2004.05.07.12.06.47; author cjep; state Exp; branches; next 1.15; 1.15 date 2004.04.03.10.26.14; author hubertf; state Exp; branches; next 1.14; 1.14 date 2003.05.22.16.46.50; author jmmv; state Exp; branches; next 1.13; 1.13 date 2003.02.17.12.32.05; author kei; state Exp; branches; next 1.12; 1.12 date 2003.02.14.18.50.51; author wiz; state Exp; branches; next 1.11; 1.11 date 2003.02.10.14.08.21; author kei; state Exp; branches; next 1.10; 1.10 date 2002.12.27.10.11.53; author uebayasi; state Exp; branches; next 1.9; 1.9 date 2002.09.25.18.18.52; author wiz; state Exp; branches; next 1.8; 1.8 date 2001.09.08.00.36.10; author kei; state Exp; branches; next 1.7; 1.7 date 2001.05.04.01.28.16; author jlam; state Exp; branches; next 1.6; 1.6 date 2001.02.25.13.36.17; author kei; state Exp; branches; next 1.5; 1.5 date 2000.12.06.08.12.38; author jlam; state Exp; branches; next 1.4; 1.4 date 2000.11.16.10.42.24; author abs; state Exp; branches; next 1.3; 1.3 date 2000.06.20.21.50.20; author jlam; state Exp; branches; next 1.2; 1.2 date 2000.06.20.21.47.22; author jlam; state Exp; branches; next 1.1; 1.1 date 99.09.24.16.42.06; author jlam; state Exp; branches; next ; desc @@ 1.25 log @Remove patch-ad, which breaks self tests on NetBSD-4.99.63/amd64. Replace first hunk of patch-af with CONFIGURE_ARGS. Remove next two hunks of patch-af installing some private headers. This shouldn't be necessary in the 7.x versions. If it is, the author is willing to help fix the underlying problems. patch-aa and -ab will be included in the next upstream release. Bump PKGREVISION. @ text @$NetBSD: patch-ad,v 1.24 2007/07/07 15:21:08 wiz Exp $ Needed to build with the sun studio compilers --- include/gc_cpp.h.orig 2007-05-09 00:53:31.000000000 +0000 +++ include/gc_cpp.h @@@@ -219,8 +219,8 @@@@ extern "C" {typedef void (*GCCleanUpFunc inline void* operator new( size_t size, GCPlacement gcp, - GCCleanUpFunc cleanup = 0, - void* clientData = 0 ); + GCCleanUpFunc cleanup, + void* clientData); /* Allocates a collectable or uncollected object, according to the value of "gcp". @@@@ -264,8 +264,8 @@@@ inline void* operator new( inline void* operator new[]( size_t size, GCPlacement gcp, - GCCleanUpFunc cleanup = 0, - void* clientData = 0 ); + GCCleanUpFunc cleanup, + void* clientData); /* The operator new for arrays, identical to the above. */ @ 1.24 log @Update to 7.0: Changes relative to 6.8 include, in no particular order: - Change C code to require at least C89. Clean up code in various other respects. - Win64 port. - Always count how much live data there is in the heap. Add more robust heap expansion heuristic which relies on this. - Remove old-style Solaris threads support and some other obsolete platform support. - Restructure mark code, hopefully resulting in some performance improvements. - Change the GC code to traffic mostly in either bytes or allocation granules, not words, internally. - Provide for fast inline allocation that requires less frequent client recompilations. (Needs more testing.) - Removed SILENT configuration macro and PRINTSTATS and GATHERSTATS macros. Control is now via GC_PRINT_STATS and GC_PRINT_VERBOSE_STATS encironment variables. - Thread local allocation is now performed without needing to call special allocation functions. The configuration macro THREAD_LOCAL_ALLOC continues to determine whether this is supported. - Thread local allocation is supported on more platforms. - Win32 threads code was rewritten and is hopefully more sane. - Allocation routines now decide whether to lock dynamically, based on whether a second thread has been created. - Mostly untested support for a compiler write barrier. - Use libatomic_ops for atomic operations. - Limited support for malloc redirection with Linux threads (& NPTL ). - Various bug fixes and some new platform support. @ text @d1 1 a1 1 $NetBSD: patch-ad,v 1.23 2007/01/25 03:13:59 dmcmahill Exp $ @ 1.23 log @one more patch to get this going with sunpro compilers @ text @d1 1 a1 1 $NetBSD$ d5 1 a5 1 --- include/gc_cpp.h.orig 2005-12-05 19:35:14.000000000 -0500 d7 1 a7 1 @@@@ -212,8 +212,8 @@@@ extern "C" {typedef void (*GCCleanUpFunc d18 1 a18 1 @@@@ -257,8 +257,8 @@@@ inline void* operator new( @ 1.22 log @Update to 6.8. Changes since 6.7: - Added some support for Dragonfly BSD. (Thanks to Joerg Sonnenberger and Thomas Klausner.) - Improvements to the HP/UX section of configure.in. (Thanks to Andreas Tobler.) - GC_unix_get_mem could neglect to release the malloc lock on Irix, under extremely unlikely circumstances. Thanks to Jean-Baptiste Nivois for some careful code reading. - Added support for kFreeBSD + glibc (Thanks to Petr Salinger) - Fix more MacOS threads memory leaks (Thanks to Allan Hsu) - Added initial Solaris/X86-64 support (Thanks to Rainer Orth) - Applied a long-lost MINGW patch from Gerard Allan for malloc redirection with threads. This one probably makes no sense for 7.0, and was not applied there. - The Solaris/SPARC definition of GC_INIT() in gc.h wasn't C++-compilable. @ text @d1 1 a1 1 $NetBSD: patch-ad,v 1.21 2005/09/08 15:22:53 reed Exp $ d3 25 a27 29 --- include/private/gcconfig.h.orig 2005-05-20 20:48:29.000000000 +0000 +++ include/private/gcconfig.h @@@@ -55,7 +55,7 @@@@ # endif /* And one for FreeBSD: */ -# if defined(__FreeBSD__) && !defined(FREEBSD) +# if (defined(__FreeBSD__) || defined(__DragonFly__)) && !defined(FREEBSD) # define FREEBSD # endif @@@@ -174,7 +174,8 @@@@ # define mach_type_known # endif # if defined(sparc) && defined(unix) && !defined(sun) && !defined(linux) \ - && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__FreeBSD__) + && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__FreeBSD__) \ + && !defined(__DragonFly__) # define SPARC # define DRSNX # define mach_type_known @@@@ -1998,7 +1999,7 @@@@ # define SUNOS5SIGS # endif -# if defined(FREEBSD) && (__FreeBSD__ >= 4) +# if defined(FREEBSD) && (defined(__DragonFly__) || __FreeBSD__ >= 4) # define SUNOS5SIGS # endif @ 1.21 log @Add support for DragonFly. It adds if defined(__DragonFly__). It is from Joerg Sonnenberger. Okayed by maintainer, recht. @ text @d1 1 a1 1 $NetBSD$ @ 1.20 log @Update to 6.4: - Merge gcconfig.h changes from gcc tree. - Unconditionally include gc_priv.h in solaris_pthreads.c, win32_threads.h, aix_irix_threads.c, and solaris_threads.c to get thread definitions. - Start marker threads in GC_thr_init, so that they get started even if no other threads are ever started. (Oddly enough, the parallel collector worked correctly, though not well, with no helper threads.) - Go ahead and split large blocks in GC_allochblk_nth if GC_dont_gc is set. (Thanks to Alexander Petrossian.) - GC_PRINT_BACK_HEIGHT would deadlock with thread support. - Let in_progress_space in backgraph.s grow dynamically. - Fix README.solaris2. The GC_thr_init() hack doesn't work anymore. - Convert GC_finalizer_mem_freed to bytes in allchblk.c. - Add missing declaration for GC_generic_malloc_words_small_inner. Without it, s390x breaks. (Thanks to Ulrich Weigand.) - Applied several MacOSX patches to support older tool chains. (Thanks to Stefan Ring.) - Bug fix for NetBSD/amd64. (Thanks to Marc Recht.) Add NetBSD/sh3 support. (Thanks to Uchiyama Yasushi.) - Fixed an uninitialized variable in cordprnt.c. (Thanks to gcc for providing the warning.) - Eliminated some, but not all, gcc -Wall warnings. - Changed some old style casts to reinterpret_cast in new_gc_alloc.h. (Thanks to Dan Grayson.) - GC_extend_size_map shouldn't adjust for GC_all_interior_pointers if GC_DONT_ADD_BYTE_AT_END is set. - Changed some (long) casts to (word) in preparation for win64. (Thanks to Peter Colson.) - Changed "int stack_size" declaration in pthread_support.c to use size_t. (Only mattered with GC_ASSERTIONS enabled.) - Added CRIS (etrax) support. (Thanks to Simon Posnjak and Hans-Peter Nilsson.) - Removed GC_IGNORE_FB frame buffer recognition, and replaced it with a check that the mapping type is MEM_IMAGE. In theory, this should work much better, but it is a high risk change for win32. (Thanks to Ashley Bone for the crucial experimental data behind this, and to Rutger Ovidus for some further experiments.) - Fixed print_block_list to print the correct kind number for STUBBORN. (Thanks to Rutger Ovidus.) - GC_allochblk_nth incremented GC_words_wasted by bytes rather than words. - Consider GC_words_wasted in GC_adj_words_allocd only if it is within reason. (A hack to avoid some extremely unlikely scenarios in which we manage to allocate only "wasted" space. 7.0 has a better fix.) - Changed PowerPC GC_clear implementation to use lwsync instead of eieio, since the documentation recommends against eieio, and it seems to be incorrect if the preceding memory op is a load. - Fixed print_block_list to print the correct kind number for STUBBORN. (Thanks to Rutger Ovidus.) - GC_allochblk_nth incremented GC_words_wasted by bytes rather than words. - Have configure.in generate an error if it is asked to support pthreads, but doesn't know how to. - Added Kazuhiro Inaoka's patch for Renesas M32R support. - Have the GNU build mechanism link with -ldl. Rename THREADLIBS to THREADDLLIBS to reflect this. (Thanks to Sven Verdoolaege.) - Added Hannes Mehnert's patch for FreeBSD/SPARC support. - Merged some FreeBSD specific patches to threadlibs.c and dyn_load.c. (Thanks tp John Merryweather Cooper.) - Define MPROTECT_VDB on MACOSX only if threads are being used, since the dirty page tracking mechanism uses threads. (This avoids an undefined reference to _GC_darwin_register_mach_handler_thread.) - By popular demand, use __libc symbols only if we are built with USE_LIBC_PRIVATES, which is off by default, and not otherwise documented. - Ignore GC_enable_incremental() requests when KEEP_BACK_PTRS is set. The GC itself will dirty lots of pages in this cases, probably making it counterproductive on all platforms. And the DARWIN port crashes. @ text @d1 1 a1 1 $NetBSD: patch-ad,v 1.19 2004/07/13 14:22:27 recht Exp $ d3 3 a5 5 --- include/private/gcconfig.h.orig 2004-05-06 01:10:54.000000000 +0200 +++ include/private/gcconfig.h 2004-07-13 10:19:42.000000000 +0200 @@@@ -97,6 +97,10 @@@@ # define ARM32 # define mach_type_known d7 5 a11 18 +# if defined(NETBSD) && defined(__sh__) +# define SH +# define mach_type_known +# endif # if defined(vax) # define VAX # ifdef ultrix @@@@ -1811,6 +1815,13 @@@@ extern int _end[]; # define DATAEND (_end) # endif +# ifdef NETBSD +# define OS_TYPE "NETBSD" +# define HEURISTIC2 +# define DATASTART GC_data_start +# define USE_GENERIC_PUSH_REGS +# define DYNAMIC_LOADING +# endif d13 20 a32 2 # ifdef SH4 @ 1.19 log @update boehm-gc to 6.3b1 changes: - Add a patch provided by UCHIYAMA Yasushi in PR 26180 to support NetBSD/sh3. - Correctly define ELFSIZE for NetBSD. Fixes PR 26252 by Kouichirou Hiratsuka. Bump BUILDLINK_DEPNDS to 6.3nb1 for the ELFSIZE fix. @ text @d1 1 a1 1 $NetBSD$ @ 1.18 log @update to 6.3 This is mostly a bug fix release. Selection of changes: - most pkgsrc patches have been integrated - amd64 support for NetBSD/OpenBSD (thanks to drochner@@) - enhanced Darwin support For a complete list see: http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/recent_changes @ text @d1 1 a1 1 $NetBSD: patch-ad,v 1.17 2004/06/28 15:45:18 toshii Exp $ d3 3 a5 17 --- include/private/gcconfig.h.orig 2003-06-17 11:01:23.000000000 +0900 +++ include/private/gcconfig.h @@@@ -85,7 +85,7 @@@@ # define SPARC # define mach_type_known # endif -# if defined(NETBSD) && defined(m68k) +# if defined(NETBSD) && (defined(m68k) || defined(__m68k__)) # define M68K # define mach_type_known # endif @@@@ -93,7 +93,7 @@@@ # define POWERPC # define mach_type_known # endif -# if defined(NETBSD) && defined(__arm32__) +# if defined(NETBSD) && (defined(__arm32__) || defined(__arm__)) d9 2 a10 6 @@@@ -106,6 +106,10 @@@@ # endif # define mach_type_known # endif +# if defined(__NetBSD__) && defined(__vax__) +# define VAX d13 6 a18 34 # if defined(mips) || defined(__mips) || defined(_mips) # define MIPS # if defined(nec_ews) || defined(_nec_ews) @@@@ -220,6 +224,10 @@@@ # define X86_64 # define mach_type_known # endif +# if defined(__NetBSD__) && defined(__x86_64__) +# define X86_64 +# define mach_type_known +# endif # if defined(LINUX) && (defined(__ia64__) || defined(__ia64)) # define IA64 # define mach_type_known @@@@ -601,8 +609,14 @@@@ # ifdef NETBSD # define OS_TYPE "NETBSD" # define HEURISTIC2 - extern char etext[]; -# define DATASTART ((ptr_t)(etext)) +# 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 LINUX # define OS_TYPE "LINUX" @@@@ -1794,6 +1808,15 @@@@ # define PREFETCH_FOR_WRITE(x) \ __asm__ __volatile__ (" prefetchw %0": : "m"(*(char *)(x))) d21 5 a25 7 +# define OS_TYPE "NETBSD" +# define HEURISTIC2 +# define DATASTART GC_data_start +# define ELFCLASS32 32 +# define ELFCLASS64 64 +# define ELF_CLASS ELFCLASS64 +# define DYNAMIC_LOADING d28 2 a29 2 #if defined(LINUX) && defined(REDIRECT_MALLOC) @ 1.17 log @Make this buildable on NetBSD/amd64. Changes are quite mechanical, but "gctest" appears to work... @ text @d1 1 a1 1 $NetBSD$ @ 1.16 log @Add RCS tags @ text @d2 3 a4 2 --- include/private/gcconfig.h.orig Tue Jun 17 04:01:23 2003 +++ include/private/gcconfig.h Fri Apr 2 23:43:18 2004 d34 12 a45 1 @@@@ -601,8 +605,14 @@@@ d62 16 @ 1.15 log @Fix building on m68k (tested: amiga), OK'd by Hans Boehm (hans.boehm hp com) Bump to 6.2nb3 @ text @d1 1 @ 1.14 log @Update to 6.2alpha5: - GC_invoke_finalizers could, under rare conditions, set GC_finalizer_mem_freed to an essentially random value. This could possibly cause unbounded heap growth for long-running applications under some conditions. (The bug was introduced in 6.1alpha5, and is not in gcc3.3. Thanks to Ben Hutchings for finding it.) - Attempted to sanitize the various DLL macros. GC_USE_DLL disappeared. GC_DLL is used instead. All internal tests are now on GC_DLL. README.macros is now more precise about the intended meaning. - Include DllMain in the multithreaded win32 version only if the collector is actually built as a dll. (Thanks to Mohan Embar for a version of the patch.) - Hide the cygwin threadAttach/Detach functions. They were violating our namespace rules. - Fixed an assertion in GC_check_heap_proc. Added GC_STATIC_ASSERT. (Thanks again to Ben Hutchings.) - Removed some obsolete definitions for Linux/PowerPC in gcconfig.h. - CORD_cat was not rebalancing unbalanced trees in some cases, violating a CORD invariant. Also tweaked the rebalancing rule for CORD_cat_char_star. (Thanks to Alexandr Petrosian for the bug report and patch.) - Added hand-coded structured exception handling support to mark.c. This should enable support of dynamic libraries under win32 with gcc-compiled code. (Thanks to Ranjit Mathew for the patch.) Turned on dynamic library scanning for win32/gcc. - Removed some remnants of read wrapping. (Thanks to Kenneth Schalk.) GC_USE_LD_WRAP ws probably broken in recent versions. - The build could fail on some platforms since gcconfig.h could include declarations mentioning ptr_t, which was not defined, e.g. when if_mach was built. (Thanks to Yann Dirson for pointing this out.) Also cleaned up tests for GC_PRIVATE_H in gcconfig.h a bit. - The GC_LOOP_ON_ABORT environment variable interfered with incremental collection, since the write fault handler was erroneously overridden. Handlers are now set up in the correct order. - It used to be possible to call GC_mark_thread_local_free_lists() while the world was not stopped during an incremental GC. This was not safe. Fortunately, it was also unnecessary. Added GC_world_stopped flag to avoid it. (This caused occasional crashes in GC_set_fl_marks with thread local allocation and incremental GC. This probably happened primarily on old, slow multiprocessors.) - Allowed overriding of MAX_THREADS in win32_threads.c from the build command line. (Patch from Yannis Bres.) - Taught the IA64/linux code to determine the register backing store base from /proc/self/maps after checking the __libc symbol, but before guessing. (__libc symbols are on the endangered list, and the guess is likely to not always be right for 2.6 kernels.) Restructured the code to read and parse /proc/self/maps so it only exists in one place (all platforms). - The -DUSE_PROC_FOR_LIBRARIES code was broken on Linux. It claimed that it also registered the main data segment, but didn't actually do so. (I don't think anyone actually uses this configuration, but ...) - Made another attempt to get --enablecplusplus to do the right thing. Since there are unavoidable problems with C programs linking against a dynamic library that includes C++ code, I separated out the c++ code into libgccpp. Based on patch provided in PR pkg/21569 by Marc Recht. @ text @d1 3 a3 5 $NetBSD: patch-ad,v 1.13 2003/02/17 12:32:05 kei Exp $ --- include/private/gcconfig.h.orig 2003-04-30 01:44:13.000000000 +0200 +++ include/private/gcconfig.h 2003-05-14 00:28:46.000000000 +0200 @@@@ -83,7 +83,7 @@@@ d12 1 a12 1 @@@@ -91,7 +91,7 @@@@ d21 1 a21 1 @@@@ -104,6 +104,10 @@@@ d32 1 a32 1 @@@@ -596,9 +600,14 @@@@ d36 2 d42 4 a45 2 extern char etext[]; # define DATASTART ((ptr_t)(etext)) a46 1 +# endif a48 1 # define STACKBOTTOM ((ptr_t)0xf0000000) @ 1.13 log @added m68k ELF support to boehm-gc. stolen from the diff for sparc. bump PKGREVISION to 2. @ text @d1 1 a1 1 $NetBSD: patch-ad,v 1.12 2003/02/14 18:50:51 wiz Exp $ d3 3 a5 3 --- include/private/gcconfig.h.orig Wed Aug 7 03:49:22 2002 +++ include/private/gcconfig.h Sun Feb 16 06:16:01 2003 @@@@ -77,7 +77,7 @@@@ d14 1 a14 1 @@@@ -85,7 +85,7 @@@@ d23 1 a23 1 @@@@ -98,6 +98,10 @@@@ d34 1 a34 1 @@@@ -589,8 +593,13 @@@@ a37 2 - extern char etext[]; -# define DATASTART ((ptr_t)(etext)) d42 2 a43 3 + extern char etext[]; +# define DATASTART ((ptr_t)(etext)) +# endif d45 1 d48 1 @ 1.12 log @Update to 6.1nb1, from Marc Recht in PR 20008: Install shared libs. @ text @d1 1 a1 1 $NetBSD: patch-ad,v 1.11 2003/02/10 14:08:21 kei Exp $ d4 1 a4 1 +++ include/private/gcconfig.h Mon Feb 10 22:54:58 2003 d34 16 @ 1.11 log @make this compile on arm-ELF platforms. it would be a good if someone who have such platforms test this. and I heard that it is currently broken on mac68k. changes suggested by Izumi Tsutsui. @ text @d1 1 a1 1 $NetBSD: patch-ad,v 1.10 2002/12/27 10:11:53 uebayasi Exp $ a33 11 @@@@ -752,6 +756,10 @@@@ # ifdef ULTRIX # define OS_TYPE "ULTRIX" # define STACKBOTTOM ((ptr_t) 0x7fffc800) +# endif +# ifdef NETBSD +# define OS_TYPE "NETBSD" +# define HEURISTIC2 # endif # endif @ 1.10 log @Test if __m68k__ is defined on NetBSD/m68k ELF. @ text @d1 1 a1 1 $NetBSD$ d4 1 a4 1 +++ include/private/gcconfig.h d12 9 @ 1.9 log @Update to 6.1, provided by Julio Merino in PR 18240. Changes: lots of bugfixes and improvements. @ text @d1 1 a1 1 $NetBSD: patch-ad,v 1.8 2001/09/08 00:36:10 kei Exp $ d3 11 a13 2 --- include/private/gcconfig.h.orig Mon Sep 9 14:56:06 2002 +++ include/private/gcconfig.h Mon Sep 9 14:57:33 2002 @ 1.8 log @updated to boehm-gc 6.0 (gc6.0) which incorporated most of our patch. On i386 aout/ELF, saprc ELF and macppc, 'cd ${WRKSRC}; make test' got success and www/w3m package which depends on this runs. @ text @d1 1 a1 1 $NetBSD: patch-ad,v 1.7 2001/05/04 01:28:16 jlam Exp $ d3 3 a5 3 --- include/private/gcconfig.h.orig Mon Aug 28 16:56:19 2000 +++ include/private/gcconfig.h @@@@ -75,6 +75,10 @@@@ d13 1 a13 1 # if defined(mips) || defined(__mips) d15 2 a16 2 # if !defined(LINUX) @@@@ -690,6 +694,10 @@@@ d22 2 a23 2 +# define OS_TYPE "NETBSD" +# define HEURISTIC2 @ 1.7 log @Deal with "unix no longer predefined" warning. Modify Makefile so we don't need to pass in various variables through MAKE_ENV, and honor CFLAGS passed in from environment during build. @ text @d1 1 a1 1 $NetBSD$ d3 3 a5 32 --- gcconfig.h.orig Mon Aug 28 16:56:19 2000 +++ gcconfig.h @@@@ -27,6 +27,12 @@@@ # define LINUX # endif +# if defined(__NetBSD__) +# define NETBSD +# undef unix +# define unix 1 /* symbol unix is no longer defined in NetBSD */ +# endif + /* Determine the machine type: */ # if defined(sun) && defined(mc68000) # define M68K @@@@ -50,10 +56,13 @@@@ # endif # if defined(__NetBSD__) && defined(m68k) # define M68K -# define NETBSD # define mach_type_known # endif -# if defined(__NetBSD__) && defined(arm32) +# if defined(__NetBSD__) && defined(__powerpc__) +# define POWERPC +# define mach_type_known +# endif +# if defined(__NetBSD__) && defined(__arm32__) # define ARM32 # define NETBSD # define mach_type_known @@@@ -67,6 +76,10 @@@@ d16 2 a17 63 @@@@ -81,6 +94,9 @@@@ # endif # endif # endif /* !LINUX */ +# if defined(__NetBSD__) && defined(__MIPSEL__) +# undef ULTRIX +# endif # define mach_type_known # endif # if defined(sequent) && defined(i386) @@@@ -114,7 +130,7 @@@@ # define mach_type_known # endif # if defined(sparc) && defined(unix) && !defined(sun) && !defined(linux) \ - && !defined(__OpenBSD__) + && !defined(__OpenBSD__) && !(__NetBSD__) # define SPARC # define DRSNX # define mach_type_known @@@@ -123,6 +139,10 @@@@ # define RS6000 # define mach_type_known # endif +# if defined(__NetBSD__) && defined(__sparc__) +# define SPARC +# define mach_type_known +# endif # if defined(_M_XENIX) && defined(_M_SYSV) && defined(_M_I386) /* The above test may need refinement */ # define I386 @@@@ -172,7 +192,7 @@@@ # 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 @@@@ -221,7 +241,6 @@@@ # endif # if defined(__NetBSD__) && defined(i386) # define I386 -# define NETBSD # define mach_type_known # endif # if defined(bsdi) && defined(i386) @@@@ -573,6 +592,14 @@@@ # define STACKBOTTOM ((ptr_t) 0xc0000000) # define DATAEND /* not needed */ # endif +# ifdef NETBSD +# define ALIGNMENT 4 +# define OS_TYPE "NETBSD" +# define HEURISTIC2 + extern char etext; +# define DATASTART GC_data_start +# define DYNAMIC_LOADING +# endif # endif # ifdef VAX @@@@ -589,6 +616,10 @@@@ d20 1 a20 1 # endif a23 18 +# endif # endif # ifdef RT @@@@ -602,7 +633,6 @@@@ # define MACH_TYPE "SPARC" # define ALIGNMENT 4 /* Required by hardware */ # define ALIGN_DOUBLE - extern int etext; # ifdef SUNOS5 # define OS_TYPE "SUNOS5" extern int _etext; @@@@ -674,8 +704,20 @@@@ # ifdef OPENBSD # define OS_TYPE "OPENBSD" # define STACKBOTTOM ((ptr_t) 0xf8000000) + extern int etext; # define DATASTART ((ptr_t)(&etext)) a24 33 +# ifdef NETBSD +# define OS_TYPE "NETBSD" +# define HEURISTIC2 +# ifdef __ELF__ +# define DATASTART GC_data_start +# define DYNAMIC_LOADING +# else + extern char etext; +# define DATASTART ((ptr_t)(&etext)) +# endif +# endif # endif # ifdef I386 @@@@ -960,6 +1002,21 @@@@ # endif # define DYNAMIC_LOADING # endif +# if defined(NETBSD) && defined(__MIPSEL__) +# define ALIGNMENT 4 +# define OS_TYPE "NETBSD" +# define HEURISTIC2 +# define USE_GENERIC_PUSH_REGS 1 +# ifdef __ELF__ + extern int etext; +# define DATASTART GC_data_start +# define NEED_FIND_LIMIT +# define DYNAMIC_LOADING +# else +# define DATASTART ((ptr_t) 0x10000000) +# define STACKBOTTOM ((ptr_t) 0x7ffff000) +# endif /* _ELF_ */ +# endif a26 18 # ifdef RS6000 @@@@ -1019,6 +1076,16 @@@@ /* fp registers in some cases when the target is a 21264. The assembly */ /* code doesn't handle that yet, and version dependencies make that a */ /* bit tricky. Do the easy thing for now. */ +# ifdef NETBSD +# define OS_TYPE "NETBSD" +# define HEURISTIC2 +# define DATASTART GC_data_start +# define ELFCLASS32 32 +# define ELFCLASS64 64 +# define ELF_CLASS ELFCLASS64 +# define CPP_WORDSZ 64 +# define DYNAMIC_LOADING +# endif # ifdef OSF1 # define OS_TYPE "OSF1" # define DATASTART ((ptr_t) 0x140000000) @ 1.6 log @* added support for vax architechture. Patch supplied by Shinmyoh Koji in pkg/12282. Thanks! @ text @d1 1 a1 1 $NetBSD: patch-ad,v 1.5 2000/12/06 08:12:38 jlam Exp $ d3 3 a5 3 --- gcconfig.h.orig Tue Aug 29 05:56:19 2000 +++ gcconfig.h Sun Feb 25 22:32:35 2001 @@@@ -27,6 +27,13 @@@@ d11 2 a12 3 +# ifndef unix +# define unix /* symbol unix is no longer defined in NetBSD */ +# endif d18 1 a18 1 @@@@ -50,10 +57,13 @@@@ d34 1 a34 1 @@@@ -67,6 +77,10 @@@@ d45 1 a45 1 @@@@ -81,6 +95,9 @@@@ d55 1 a55 1 @@@@ -114,7 +131,7 @@@@ d64 1 a64 1 @@@@ -123,6 +140,10 @@@@ d75 1 a75 1 @@@@ -172,7 +193,7 @@@@ d84 1 a84 1 @@@@ -221,7 +242,6 @@@@ d92 1 a92 1 @@@@ -573,6 +593,14 @@@@ d107 1 a107 1 @@@@ -589,6 +617,10 @@@@ d118 1 a118 1 @@@@ -602,7 +634,6 @@@@ d126 1 a126 1 @@@@ -674,8 +705,20 @@@@ d147 1 a147 1 @@@@ -960,6 +1003,21 @@@@ d169 1 a169 1 @@@@ -1019,6 +1077,16 @@@@ @ 1.5 log @Avoid warnings about `unix' being redefined when compiling with gcc-2.95.2. @ text @d1 1 a1 1 $NetBSD$ d3 2 a4 2 --- gcconfig.h.orig Mon Aug 28 16:56:19 2000 +++ gcconfig.h d35 12 a46 1 @@@@ -81,6 +91,9 @@@@ d56 1 a56 1 @@@@ -114,7 +127,7 @@@@ d65 1 a65 1 @@@@ -123,6 +136,10 @@@@ d76 1 a76 1 @@@@ -172,7 +189,7 @@@@ d85 1 a85 1 @@@@ -221,7 +238,6 @@@@ d93 1 a93 1 @@@@ -573,6 +589,14 @@@@ d108 12 a119 1 @@@@ -602,7 +626,6 @@@@ d127 1 a127 1 @@@@ -674,8 +697,20 @@@@ d148 1 a148 1 @@@@ -960,6 +995,21 @@@@ d170 1 a170 1 @@@@ -1019,6 +1069,16 @@@@ @ 1.4 log @Fix compilation on arm32 by testing for __arm32__ not arm32 @ text @d3 1 a3 1 --- gcconfig.h.orig Tue Apr 25 17:41:01 2000 d5 1 a5 1 @@@@ -27,6 +27,11 @@@@ d11 3 a13 1 +# define unix /* symbol unix is no longer defined in NetBSD */ d19 1 a19 1 @@@@ -50,10 +55,13 @@@@ d35 1 a35 1 @@@@ -81,6 +89,9 @@@@ d45 1 a45 1 @@@@ -114,7 +125,7 @@@@ d54 1 a54 1 @@@@ -123,6 +134,10 @@@@ d65 1 a65 1 @@@@ -172,7 +187,7 @@@@ d74 1 a74 1 @@@@ -221,7 +236,6 @@@@ d82 1 a82 1 @@@@ -573,6 +587,14 @@@@ d97 1 a97 1 @@@@ -602,7 +624,6 @@@@ d105 1 a105 1 @@@@ -674,8 +695,20 @@@@ d126 1 a126 1 @@@@ -960,6 +993,21 @@@@ d148 1 a148 1 @@@@ -1019,6 +1067,16 @@@@ @ 1.3 log @Update boehm-gc to 5.0alpha7. Changes from 5.0alpha3 are mostly bugfixes but there is the addition of the NetBSD/arm32 bits. This has been tested on mac68k, macppc, sparc ELF, i386 ELF. Update provided in PR#10062 by Sunagawa Keiki . @ text @d3 5 a7 15 --- dyn_load.c.orig Wed Apr 26 09:01:16 2000 +++ dyn_load.c Sat May 6 04:48:00 2000 @@@@ -50,7 +50,8 @@@@ #if !defined(SUNOS4) && !defined(SUNOS5DL) && !defined(IRIX5) && \ !defined(MSWIN32) && !(defined(ALPHA) && defined(OSF1)) && \ !defined(HPUX) && !(defined(LINUX) && defined(__ELF__)) && \ - !defined(RS6000) && !defined(SCO_ELF) + !defined(RS6000) && !defined(SCO_ELF) && \ + !(defined(NETBSD) && defined(__ELF__)) --> We only know how to find data segments of dynamic libraries for the --> above. Additional SVR4 variants might not be too --> hard to add. @@@@ -297,14 +298,19 @@@@ # endif /* !USE_PROC ... */ # endif /* SUNOS */ d9 84 a92 3 -#if defined(LINUX) && defined(__ELF__) || defined(SCO_ELF) +#if defined(LINUX) && defined(__ELF__) || defined(SCO_ELF) || \ + (defined(NETBSD) && defined(__ELF__)) d94 28 a121 4 /* Dynamic loading code for Linux running ELF. Somewhat tested on * Linux/x86, untested but hopefully should work on Linux/Alpha. * This code was derived from the Solaris/ELF support. Thanks to * whatever kind soul wrote that. - Patrick Bridges */ d123 21 a143 6 +#if defined(NETBSD) +#include +#else #include +#endif #include d145 18 a162 1 /* Newer versions of Linux/Alpha and Linux/x86 define this macro. We @ 1.2 log @Update boehm-gc to 5.0alpha7. Changes from 5.0alpha3 are mostly bugfixes but there is the addition of the NetBSD/arm32 bits. This has been tested on mac68k, macppc, sparc ELF, i386 ELF. Update provided in PR#10062 by Sunagawa Keiki . @ text @@ 1.1 log @Update boehm-gc to 5.0alpha3. It now supports m68k, i386, sparc a.out systems and ELF ones (checked on alpha, i386, powerpc) as well. Update supplied by SUNAGAWA Keiki in PR#8482 with minor additions by me. @ text @d3 3 a5 3 --- dyn_load.c.orig 1999/06/02 19:29:13 1.1.1.2 +++ dyn_load.c 1999/06/03 12:44:49 1.2 @@@@ -48,7 +48,8 @@@@ d8 1 a8 1 !defined(HP_PA) && !(defined(LINUX) && defined(__ELF__)) && \ d15 1 a15 1 @@@@ -260,14 +261,22 @@@@ a29 3 +#define DT_DEBUG 21 +#define PT_LOAD 1 +#define PF_W 0x2 @