Commit Graph
103 Commits
Author SHA1 Message Date
Jo Shields 1f513847b2 Support for GNU/kFreeBSD.
GNU/kFreeBSD is an experimental OS provided by the Debian project, consisting
of a FreeBSD kernel and GNU userland/libc. For a small number of cases, this
offers advantages over a more common GNU/Linux combination, such as fast
in-kernel support for ZFS storage.

This patch changes various ifdefs, either using __FreeBSD_kernel__ where a
trait from the kernel is what matters, or __GLIBC__ where a trait from the
C library matters.

This patch set has been carried downstream, in one form or another, since
1.2.3.1-1.

https://bugzilla.novell.com/show_bug.cgi?id=321634
2014-07-31 11:44:51 +01:00
Rodrigo Kumpera 2eaf6e71b3 [boehm] Implement the finalization extension API. 2014-05-29 21:52:29 -04:00
Rodrigo Kumpera 0d368edf3f [boehm] Implement mono_gc_get_restart_signal. 2014-05-13 19:10:57 -04:00
Alex Rønne Petersen 5e2f1f3301 Fix my last commit to match our libgc's declaration style. 2014-04-18 19:51:34 +02:00
Alex Rønne Petersen fb7c7e39b5 Hopefully fix a build error in libgc on some compilers.
../../libgc/alloc.c: In function ‘GC_stopped_mark’:
../../libgc/alloc.c:501:9: error: implicit declaration of function ‘GC_cond_register_dynamic_libraries’ [-Werror=implicit-function-declaration]
         GC_cond_register_dynamic_libraries();
2014-04-18 19:34:49 +02:00
Rodrigo Kumpera ae15e93b92 [boehm] Add toggleref support for boehm. This is line by line port of the sgen code, so keep them in sync. 2014-02-26 18:07:28 -05:00
Alex Rønne Petersen 5ed3db3596 Unbreak libgc. 2013-12-04 12:56:58 +01:00
Alex Rønne Petersen 69997b9b28 Remove some more mdb bits. 2013-12-04 11:37:52 +01:00
Alex Rønne Petersen a1e5ba803f Fix a missing return statement in 16d2bcaa37. 2013-07-29 05:09:03 +02:00
Alex Rønne Petersen 16d2bcaa37 libgc: Use GCC atomics on ARM.
This is to ensure that if the runtime is compiled for e.g.
ARM v4 or v5, it will use the correct atomics on v6 and v7.
2013-07-21 08:00:58 +02:00
Alex Rønne Petersen 846d80f19e Avoid using dmb/dsb/dib instructions on ARM v6.
This only worked by accident before the HAVE_ARMV<N>
changes because __ARM_ARCH_6__ is never defined by
any compiler.
2013-07-15 16:48:59 +02:00
Alex Rønne Petersen f99f84a429 Add ARM version detection to configure and use the resulting macros.
This defines ARM_VERSION_{5,6,7}. Several of these can be
defined at once. For example ARM_VERSION_5 and ARM_VERSION_6
will both be defined if the target is an ARM v6 CPU.

Previously, we defined HAVE_ARMV6 based on running a program.
This obviously didn't work for cross-compilation. This new
approach does, and detects more cases (v5, v6, v7) than the
previous check (v6).
2013-07-11 22:11:29 +02:00
Zoltan Varga bab31bcb58 Merge some Nacl/ARM changes from https://github.com/igotti-google/mono/commit/65d8d68e8c81cf6adb1076de7a9425c84cab86a3. 2013-05-24 23:41:50 +02:00
Neale Ferguson fc0560fb47 gcconfig.h - Add weak attribute to avoid __data_start undefined messages on dlopen
mini-s390x.c - Add profiling support to prolog/epilog instrumentation
2013-05-09 15:42:58 -04:00
Elijah Taylor ab39b74267 NaCl ARM work, first pass 2013-04-07 09:47:16 +02:00
Elijah Taylor 1e726ce7a3 NaCl runtime fixes
- fix compile/runtime issues caused by upstream changes
- add NaCl glibc support
- various changes to support running tests in NaCl glibc
  from 'make check'
2013-04-07 09:45:45 +02:00
Miguel de Icaza 7899d2f452 Merge pull request #554 from deplinenoise/ppc_fixes
PPC build fixes
2013-02-22 13:25:21 -08:00
Josh DuBois 9fa235bc34 Include <stdint.h> to allow cross-compilation from OS X.
Cross-compiling mono on an OS X host for a Windows target using
mingw-w64 fails because of undefined __int64 types in a couple of places.

Including <stdint.h> fixes this and allows the OS X host to cross-compile
a Windows mono.

It probably sounds like an obscure use-case, but the wine-mono
project does just this, so ability to cross-compile for Windows on OS X
is crucial to being able to build wine-mono on a Mac.
2013-02-12 11:59:29 -06:00
Andreas Fredriksson ab5e9cd6b9 Prefer __sync_bool_compare_and_swap() over PPC inline asm.
Debian's GCC 4.4 in particular does not compile the PPC assembly.
2013-02-10 13:55:52 -08:00
Rodrigo Kumpera 5a1eeba27e Add long links support to Boehm.
* gc.h: Added parts of boehm 7.3a long link API.

	* finalize.c (GC_finalize): Implemented long link support by adapting
	code from boehm 7.3a.
	The idea is to have two table of links, one for regular and another
	for the long links. Regular links are processed before finalization
	and the long ones right after. The bulk of the changes are abstracting
	the disappearing link hashtable into a data structure so we can have
	two of them.

	Boehm code came from github.com/ivmai/bdwgc.git. Authors of the
	relevant changes are Zach Saw and Ivan Maidanski.
2013-01-16 16:10:46 -05:00
Rodrigo Kumpera f794c69e44 Disable dynamic loading for iOS simulator builds. 2012-11-15 14:35:10 -05:00
Zoltan Varga b5a61875a0 Fix warnings. 2012-06-01 13:58:33 +02:00
Zoltan Varga e7f3bbad80 Fix altstack support in libgc by registering the bounds of the normal stack and the altstack with it. 2012-05-22 01:02:27 +02:00
Rodrigo Kumpera 5d805d1305 Properly handle ASLR randomization of the main thread stack on darwin. 2012-03-12 19:51:49 -03:00
Paolo Molaro acaa69acb7 Make __data_start a weak symbol, to allow loading modules on mips. 2011-12-13 15:47:31 +00:00
Elijah Taylor ff7c67833b More NACL updates 2011-08-09 22:03:46 +02:00
Zoltan Varga 04fe536dac Revert "More NACL updates"
This reverts commit ee68c04c10.
2011-08-09 22:02:50 +02:00
Elijah Taylor ee68c04c10 More NACL updates 2011-08-09 21:59:31 +02:00
Geoff Norton 7f799370ec [gc] Darwin/AMD64 can have 64-bit thread id's, so we need to ensure
we cast properly to make sure the modulus has a valid result.
Additionally add support for x86_THREAD_STATE64.
2011-08-02 21:45:49 -04:00
Zoltan Varga 26fd8d13fc Add a membar to libgc's UNLOCK () on arm. Fixes #683409. 2011-04-07 22:14:32 +02:00
Gonzalo Paniagua Javier acc0384e01 Fixes 2011-02-15 20:23:14 -05:00
Gonzalo Paniagua Javier 59fcb4f8d3 Remove a bunch of warnings. 2011-02-15 19:58:26 -05:00
Elijah Taylor 06fa666aee Merged in rest of Native Client changes, untested 2010-12-16 16:26:34 -08:00
Robert Nagy 065506369b Add support for the internal boehm-gc on OpenBSD 2010-11-29 17:05:46 +01:00
Robert Nagy f2e095f92c Add support for the internal boehm-gc on OpenBSD 2010-11-29 17:05:46 +01:00
Koushik Dutta c45cae8a26 Work around Android's pthread/kernel_id/fork bug to fix mono multithreading and GC_stop_world in processes that have been forked. 2010-10-01 12:33:18 -04:00
Raja R Harinath cd51491631 Fix a few cases of mixed line-endings
This is a scripted conversion of mixed line-ending files to LF-only or CRLF-only
based on which patch is smaller.  I used a threshold of upto a quarter of the
lines to determine whether to keep the patch or not.
2010-07-26 02:20:13 +05:30
Raja R Harinath b293948fb7 EOL handling
This set of .gitattributes was automatically generated from the list of files
that GIT tried to normalize when I enabled automatic EOL conversion.

With this set of attributes, we prevent automated EOL conversion on files that
we know will cause trouble down the road.
2010-07-25 20:17:39 +05:30
Geoff Norton 4f3439fdbb 2010-06-29 Geoff Norton <[email protected]>
* include/private/gc_locks.h: Implement armv6+ variants of
	GC_test_and_set

svn path=/trunk/mono/; revision=159690
2010-06-29 19:53:51 +00:00
Geoff Norton 2469f3b328 2010-04-23 Geoff Norton <[email protected]>
* include/private/gcconfig.h: Darwin x86-64 bit support.
	* darwin_stop_world.c: Ditto

svn path=/trunk/mono/; revision=156016
2010-04-23 17:21:39 +00:00
Jonathan Pryor 26311c1078 * include/private/gcconfig.h: Android platforms are built atop Linux,
don't use glibc, and uses `environ` instead of `__environ`.
	* configure.in: Use AC_CHECK_LIB() to check for pthread instead of
	  just blindly linking to -lpthread, as Android includes pthread
	  support within libc and doesn't provide a separate libpthread.

svn path=/trunk/mono/; revision=155747
2010-04-19 18:49:27 +00:00
Zoltan Varga 57f8ad7e99 2010-03-09 Zoltan Varga <[email protected]>
* include/private/gc_locks.h: Fix amd64 build with newer gcc's.

svn path=/trunk/mono/; revision=153291
2010-03-09 00:40:06 +00:00
Zoltan Varga 3e035004df In libgc/:
2010-03-04  David S. Miller  <[email protected]>

       * include/private/gc_locks.h: Add SPARC implementations of
       GC_compare_and_exchange and GC_memory_barrier.

In mono/mini/:

2010-03-04  David S. Miller  <[email protected]>

       * mini-sparc.h: Always use MONO_ARCH_USE_SIGACTION.  Linux kernels
       that don't provide the siginfo in the second signal handler argument
       are buggy, and this has been fixed for years.
       * mini.h (GET_CONTEXT): Remove __sparc__ special case.
       (SIG_HANDLER_SIGNATURE, SIG_HANDLER_PARMS): Likewise.

svn path=/trunk/mono/; revision=153114
2010-03-05 14:22:32 +00:00
Zoltan Varga 81d967fb86 2010-02-22 Zoltan Varga <[email protected]>
* obj_map.c (GC_add_map_entry): Speed this up for the common case where
	GC_register_displacement () was never called.

svn path=/trunk/mono/; revision=152155
2010-02-22 01:19:53 +00:00
Geoff Norton fe4d565853 2010-01-29 Geoff Norton <[email protected]>
* include/private/gcconfig.h: Don't define NO_PTHREAD_TRYLOCK on darwin-x86
        Patch from Tom Philpot ([email protected])

svn path=/trunk/mono/; revision=150568
2010-01-29 18:58:53 +00:00
Miguel de Icaza fe982b68ac remove DOS newlines
svn path=/trunk/mono/; revision=149932
2010-01-20 21:35:58 +00:00
Miguel de Icaza 754d6dd6ba Remove accidentally added file
svn path=/trunk/mono/; revision=149678
2010-01-16 01:03:13 +00:00
Miguel de Icaza f6b3de96c3 Revert temporary hack
svn path=/trunk/mono/; revision=149677
2010-01-16 01:02:34 +00:00
Miguel de Icaza 2e8071d8c9 Import proper patch
svn path=/trunk/mono/; revision=149676
2010-01-16 01:00:22 +00:00
Miguel de Icaza 3ebded89a2 Revert gcconfig.h change
svn path=/trunk/mono/; revision=149675
2010-01-16 00:59:54 +00:00