mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-16 01:41:18 -10:00
Compare commits
44
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6bf50d107b | ||
|
|
98aef175b2 | ||
|
|
cfbb707d77 | ||
|
|
26b44adfee | ||
|
|
7cc63291b9 | ||
|
|
242738b9b4 | ||
|
|
23daaa8f3d | ||
|
|
d26916f86c | ||
|
|
96debf77d1 | ||
|
|
26831a86d2 | ||
|
|
281208244f | ||
|
|
88eb6b008e | ||
|
|
87048f03df | ||
|
|
91e22b4d37 | ||
|
|
9c1b3cba34 | ||
|
|
8ab849eb82 | ||
|
|
6a4dcd4f6c | ||
|
|
f117b64a5d | ||
|
|
e789b6abbb | ||
|
|
7bd34e5715 | ||
|
|
d41a06ca08 | ||
|
|
8b3b6a5208 | ||
|
|
f4c24efe89 | ||
|
|
0b016adf56 | ||
|
|
5ad97cca6c | ||
|
|
057fc20fa4 | ||
|
|
9cb7a839eb | ||
|
|
2a62fb90b5 | ||
|
|
6608f5db66 | ||
|
|
a707a3dadb | ||
|
|
487b05c2b6 | ||
|
|
ad0c77db0f | ||
|
|
951f9a7912 | ||
|
|
9b63f759fb | ||
|
|
2e255604b2 | ||
|
|
2226f02696 | ||
|
|
0ea5ed961e | ||
|
|
abbf953e28 | ||
|
|
4d4e3c3d5b | ||
|
|
26a0904c82 | ||
|
|
3dfaaa542d | ||
|
|
005dbf7840 | ||
|
|
80d3d461c3 | ||
|
|
7554e7cd95 |
No files matched your search
+1
-1
@@ -1,5 +1,5 @@
|
||||
# ensure LF endings on all checkouts
|
||||
configure.ac crlf=input
|
||||
configure.in crlf=input
|
||||
|
||||
# ensure native line endings on checkout
|
||||
*.c crlf
|
||||
|
||||
@@ -79,7 +79,6 @@ releases
|
||||
stamp-h
|
||||
stamp-h1
|
||||
stamp-h.in
|
||||
/test-driver
|
||||
*~
|
||||
*.swp
|
||||
*.o
|
||||
@@ -113,7 +112,6 @@ GTAGS
|
||||
# Mono-specific patterns
|
||||
##############################################################################
|
||||
|
||||
.dirstamp
|
||||
compile
|
||||
mono.h
|
||||
mono-*.tar.*
|
||||
|
||||
@@ -22,6 +22,3 @@
|
||||
[submodule "external/Lucene.Net"]
|
||||
path = external/Lucene.Net
|
||||
url = git://github.com/mono/lucene.net.git
|
||||
[submodule "external/ikdasm"]
|
||||
path = external/ikdasm
|
||||
url = git://github.com/mono/ikdasm.git
|
||||
+12
-47
@@ -1,3 +1,4 @@
|
||||
|
||||
Guidelines
|
||||
==========
|
||||
|
||||
@@ -5,7 +6,7 @@ When contributing to the Mono project, please follow the [Mono Coding
|
||||
Guidelines][1]. We have been using a coding style for many years,
|
||||
please make your patches conform to these guidelines.
|
||||
|
||||
[1] http://www.mono-project.com/community/contributing/coding-guidelines/
|
||||
[1] http://www.mono-project.com/Coding_Guidelines
|
||||
|
||||
Etiquette
|
||||
=========
|
||||
@@ -31,54 +32,18 @@ file in this directory.
|
||||
|
||||
When contributing code, make sure that your contribution falls under
|
||||
the appropriate license. For example, contributions to code licensed
|
||||
under MIT/X11 code, should be MIT/X11 code.
|
||||
under MIT X11 code, should be MIT X11 code.
|
||||
|
||||
The runtime (`mono/...`) is a special case. The code is dual-licensed
|
||||
by Xamarin under both the GNU LGPL v2 license and is also available
|
||||
under commercial terms. For the runtime, you should either sign an
|
||||
The Runtime is a special case. The code is dual licensed by Xamarin
|
||||
under both the GNU LGPL v2 license and is also available under
|
||||
commercial terms. For the runtime, you should either sign an
|
||||
agreement that grants Xamarin the rights to relicense your code under
|
||||
other licenses other than the LGPL v2 or your contribution must be
|
||||
made as an MIT/X11 license which grants us the same rights, but
|
||||
involves no paperwork. For the latter case, please specify on your
|
||||
commit(s) that you are licensing the changes under MIT/X11.
|
||||
made as an MIT X11 license which grants us the same rights, but
|
||||
involves no paperwork.
|
||||
|
||||
For other parts of the project that are dual-licensed, please state
|
||||
on your commit(s) what license you are contributing the changes under.
|
||||
Submitting Patches
|
||||
==================
|
||||
|
||||
Testing
|
||||
=======
|
||||
|
||||
Pull requests go through testing on our [Jenkins server][2]. We will
|
||||
usually only merge a pull request if it causes no regressions in a
|
||||
test run there.
|
||||
|
||||
When you submit a pull request, one of two things happens:
|
||||
|
||||
* If you are a new contributor, Jenkins will ask for permissions (on
|
||||
the pull request) to test it. A maintainer will reply to approve
|
||||
the test run if they find the patch appropriate. After you have
|
||||
submitted a few patches, a maintainer will whitelist you so that
|
||||
all of your future pull requests are tested automatically.
|
||||
* If you are a well-known, whitelisted contributor, Jenkins will go
|
||||
ahead and test your pull request as soon as a test machine is
|
||||
available.
|
||||
|
||||
When your pull request has been built, Jenkins will update the build
|
||||
status of your pull request. If it succeeded and we like the changes,
|
||||
a maintainer will likely merge it. Otherwise, you can amend your pull
|
||||
request to fix build breakage and Jenkins will test it again.
|
||||
|
||||
[2] http://jenkins.mono-project.com/
|
||||
|
||||
# Inactivity
|
||||
|
||||
Occasionally, a pull request sits for several months without any
|
||||
response from the author. This isn't necessarily an issue, but we may
|
||||
sometimes decide to close pull requests that have not seen any
|
||||
progress for a long time. This is in interest of keeping the pull
|
||||
request list clean so that other pull requests don't get lost in the
|
||||
clutter.
|
||||
|
||||
If we do close your pull request due to inactivity, you're more than
|
||||
welcome to submit it anew after you address any comments or issues that
|
||||
were brought up on the original pull request.
|
||||
When Submitting patches to the dual-licensed portions, please specify
|
||||
on the commit the license that the code is under.
|
||||
@@ -64,6 +64,13 @@ For comments, corrections and updates, please contact [email protected]
|
||||
the terms of the MIT X11, this means that this code can be
|
||||
used for any purposes by anyone.
|
||||
|
||||
** mono/metadata/sgen*: Mono's Copying Collector
|
||||
|
||||
This new garbage collector is licensed under the terms of
|
||||
the MIT X11 license, in hopes that the GC could be reused
|
||||
by third party projects, follows the same spirit than the
|
||||
Boehm GC.
|
||||
|
||||
** mono/arch/*/XXX-codegen.h
|
||||
|
||||
This are C macros that are useful when generating native
|
||||
|
||||
+31
-18
@@ -1,20 +1,19 @@
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
AM_CFLAGS = $(WERROR_CFLAGS)
|
||||
|
||||
MOONLIGHT_SUBDIRS = $(libgc_dir) eglib/src mono
|
||||
MONOTOUCH_SUBDIRS = $(libgc_dir) eglib/src mono
|
||||
|
||||
if CROSS_COMPILING
|
||||
SUBDIRS = po $(libgc_dir) eglib mono $(ikvm_native_dir) support data runtime scripts man samples msvc $(docs_dir)
|
||||
SUBDIRS = po $(libgc_dir) eglib mono $(ikvm_native_dir) data runtime scripts man samples msvc $(docs_dir)
|
||||
# Keep in sync with SUBDIRS
|
||||
## 'tools' is not normally built
|
||||
DIST_SUBDIRS = m4 po libgc eglib mono ikvm-native support data runtime scripts man samples tools msvc docs
|
||||
DIST_SUBDIRS = m4 po libgc eglib mono ikvm-native data runtime scripts man samples tools msvc docs
|
||||
else
|
||||
if ONLY_MONOTOUCH
|
||||
SUBDIRS = $(MONOTOUCH_SUBDIRS) runtime
|
||||
else
|
||||
if ONLY_XAMMAC
|
||||
SUBDIRS = $(libgc_dir) eglib/src mono runtime
|
||||
if ONLY_MOONLIGHT
|
||||
SUBDIRS = $(MOONLIGHT_SUBDIRS) runtime
|
||||
else
|
||||
SUBDIRS = po $(libgc_dir) eglib mono $(ikvm_native_dir) support data runtime scripts man samples msvc $(docs_dir)
|
||||
# Keep in sync with SUBDIRS
|
||||
@@ -33,7 +32,6 @@ update_submodules:
|
||||
.PHONY: update_submodules
|
||||
|
||||
EXTRA_DIST= \
|
||||
README.md \
|
||||
LICENSE \
|
||||
autogen.sh \
|
||||
build-mingw32.sh \
|
||||
@@ -50,11 +48,7 @@ GIT_DIR ?= $(srcdir)/.git
|
||||
dist-hook:
|
||||
test -d $(distdir)/mcs || mkdir $(distdir)/mcs
|
||||
d=`cd $(distdir)/mcs && pwd`; cd $(mcs_topdir) && $(MAKE) distdir=$$d dist-recursive
|
||||
rm -rf `find $(top_distdir)/external -path '*\.git'`
|
||||
rm -f `find $(top_distdir)/external -path '*\.exe'`
|
||||
rm -f `find $(top_distdir)/external -path '*\.dll'`
|
||||
cp mcs/class/lib/basic/System.Configuration.dll mcs/class/lib/monolite/
|
||||
cp mcs/class/lib/basic/System.Security.dll mcs/class/lib/monolite/
|
||||
rm -rf `find $(top_distdir)/external -path '*\.git' -and -type d`
|
||||
# Disable this for now because it is very slow and causes wrench to timeout:
|
||||
# test ! -d $(GIT_DIR) || ./scripts/commits-to-changelog.py --root=$(distdir) last-commit-with-compulsory-changelog-entry
|
||||
|
||||
@@ -98,6 +92,31 @@ mcs-do-compiler-tests:
|
||||
bootstrap-world: compiler-tests
|
||||
$(MAKE) install
|
||||
|
||||
if MOONLIGHT
|
||||
moon-do-build: config.h
|
||||
@list='$(MOONLIGHT_SUBDIRS)'; for subdir in $$list; do \
|
||||
case "x$$subdir" in \
|
||||
xmono ) target="moon-do-build";; \
|
||||
* ) target="all";; \
|
||||
esac; \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target); \
|
||||
done;
|
||||
(cd runtime && $(MAKE) $(AM_MAKEFLAGS) moon-do-build)
|
||||
|
||||
moon-do-clean:
|
||||
@list='$(MOONLIGHT_SUBDIRS)'; for subdir in $$list; do \
|
||||
case "x$$subdir" in \
|
||||
xmono ) target="moon-do-clean";; \
|
||||
* ) target="clean";; \
|
||||
esac; \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target); \
|
||||
done;
|
||||
(cd runtime && $(MAKE) $(AM_MAKEFLAGS) moon-do-clean)
|
||||
|
||||
endif
|
||||
|
||||
if INSTALL_MONOTOUCH
|
||||
monotouch-do-build: config.h
|
||||
@list='$(MONOTOUCH_SUBDIRS)'; for subdir in $$list; do \
|
||||
@@ -166,9 +185,3 @@ package-inputs:
|
||||
done
|
||||
echo "</root>" >> msvc/scripts/order.xml
|
||||
|
||||
# Update llvm version in configure.ac to the output of $LLVM_DIR/bin/llvm-config --version
|
||||
update-llvm-version:
|
||||
if test "x$$LLVM_DIR" = "x"; then echo "Set the make variable LLVM_DIR to the directory containing the LLVM installation."; exit 1; fi
|
||||
REV=`$(LLVM_DIR)/bin/llvm-config --version` && sed -e "s,expected_llvm_version=.*,expected_llvm_version=\"$$REV\"," < configure.ac > tmp && mv tmp configure.ac && echo "Version set to $$REV."
|
||||
|
||||
|
||||
@@ -0,0 +1,592 @@
|
||||
This is Mono.
|
||||
|
||||
1. Installation
|
||||
2. Using Mono
|
||||
3. Directory Roadmap
|
||||
4. git submodules maintenance
|
||||
|
||||
1. Compilation and Installation
|
||||
===============================
|
||||
|
||||
a. Build Requirements
|
||||
---------------------
|
||||
|
||||
On Itanium, you must obtain libunwind:
|
||||
|
||||
http://www.hpl.hp.com/research/linux/libunwind/download.php4
|
||||
|
||||
On Solaris, make sure that you used GNU tar to unpack this package, as
|
||||
Solaris tar will not unpack this correctly, and you will get strange errors.
|
||||
|
||||
On Solaris, make sure that you use the GNU toolchain to build the software.
|
||||
|
||||
Optional dependencies:
|
||||
|
||||
* libgdiplus
|
||||
|
||||
If you want to get support for System.Drawing, you will need to get
|
||||
Libgdiplus. This library in turn requires glib and pkg-config:
|
||||
|
||||
* pkg-config
|
||||
|
||||
Available from: http://www.freedesktop.org/Software/pkgconfig
|
||||
|
||||
* glib 2.4
|
||||
|
||||
Available from: http://www.gtk.org/
|
||||
|
||||
* libzlib
|
||||
|
||||
This library and the development headers are required for compression
|
||||
file support in the 2.0 profile.
|
||||
|
||||
b. Building the Software
|
||||
------------------------
|
||||
|
||||
If you obtained this package as an officially released tarball,
|
||||
this is very simple, use configure and make:
|
||||
|
||||
./configure --prefix=/usr/local
|
||||
make
|
||||
make install
|
||||
|
||||
Mono supports a JIT engine on x86, SPARC, SPARCv9, S/390,
|
||||
S/390x, AMD64, ARM and PowerPC systems.
|
||||
|
||||
If you obtained this as a snapshot, you will need an existing
|
||||
Mono installation. To upgrade your installation, unpack both
|
||||
mono and mcs:
|
||||
|
||||
tar xzf mcs-XXXX.tar.gz
|
||||
tar xzf mono-XXXX.tar.gz
|
||||
mv mono-XXX mono
|
||||
mv mcs-XXX mcs
|
||||
cd mono
|
||||
./autogen.sh --prefix=/usr/local
|
||||
make
|
||||
|
||||
The Mono build system is silent for most compilation commands.
|
||||
To enable a more verbose compile (for example, to pinpoint
|
||||
problems in your makefiles or your system) pass the V=1 flag to make, like this:
|
||||
|
||||
make V=1
|
||||
|
||||
|
||||
c. Building the software from GIT
|
||||
---------------------------------
|
||||
|
||||
If you are building the software from GIT, make sure that you
|
||||
have up-to-date mcs and mono sources:
|
||||
|
||||
If you are an anonymous user:
|
||||
git clone git://github.com/mono/mono.git
|
||||
|
||||
If you are a Mono contributors with read/write privileges:
|
||||
git clone [email protected]:mono/mono.git
|
||||
|
||||
|
||||
Then, go into the mono directory, and configure:
|
||||
|
||||
cd mono
|
||||
./autogen.sh --prefix=/usr/local
|
||||
make
|
||||
|
||||
For people with non-standard installations of the auto* utils and of
|
||||
pkg-config (common on misconfigured OSX and windows boxes), you could get
|
||||
an error like this:
|
||||
|
||||
./configure: line 19176: syntax error near unexpected token `PKG_CHECK_MODULES(BASE_DEPENDENCIES,' ...
|
||||
|
||||
This means that you need to set the ACLOCAL_FLAGS environment var
|
||||
when invoking autogen.sh, like this:
|
||||
|
||||
ACLOCAL_FLAGS="-I $acprefix/share/aclocal" ./autogen.sh --prefix=/usr/loca
|
||||
|
||||
where $acprefix is the prefix where aclocal has been installed.
|
||||
|
||||
This will automatically go into the mcs/ tree and build the
|
||||
binaries there.
|
||||
|
||||
This assumes that you have a working mono installation, and that
|
||||
there's a C# compiler named 'mcs', and a corresponding IL
|
||||
runtime called 'mono'. You can use two make variables
|
||||
EXTERNAL_MCS and EXTERNAL_RUNTIME to override these. e.g., you
|
||||
can say
|
||||
|
||||
make EXTERNAL_MCS=/foo/bar/mcs EXTERNAL_RUNTIME=/somewhere/else/mono
|
||||
|
||||
If you don't have a working Mono installation
|
||||
---------------------------------------------
|
||||
|
||||
If you don't have a working Mono installation, an obvious choice
|
||||
is to install the latest released packages of 'mono' for your
|
||||
distribution and running autogen.sh; make; make install in the
|
||||
mono module directory.
|
||||
|
||||
You can also try a slightly more risky approach: this may not work,
|
||||
so start from the released tarball as detailed above.
|
||||
|
||||
This works by first getting the latest version of the 'monolite'
|
||||
distribution, which contains just enough to run the 'mcs'
|
||||
compiler. You do this with:
|
||||
|
||||
# Run the following line after ./autogen.sh
|
||||
make get-monolite-latest
|
||||
|
||||
This will download and automatically gunzip and untar the
|
||||
tarball, and place the files appropriately so that you can then
|
||||
just run:
|
||||
|
||||
make EXTERNAL_MCS=${PWD}/mcs/class/lib/monolite/gmcs.exe
|
||||
|
||||
And that will use the files downloaded by 'make get-monolite-latest.
|
||||
|
||||
Testing and Installation
|
||||
------------------------
|
||||
|
||||
You can run (part of) the mono and mcs testsuites with the command:
|
||||
|
||||
make check
|
||||
|
||||
All tests should pass.
|
||||
|
||||
If you want more extensive tests, including those that test the
|
||||
class libraries, you need to re-run 'configure' with the
|
||||
'--enable-nunit-tests' flag, and try
|
||||
|
||||
make -k check
|
||||
|
||||
Expect to find a few testsuite failures. As a sanity check, you
|
||||
can compare the failures you got with
|
||||
|
||||
https://wrench.mono-project.com/Wrench/
|
||||
|
||||
You can now install mono with:
|
||||
|
||||
make install
|
||||
|
||||
You can verify your installation by using the mono-test-install
|
||||
script, it can diagnose some common problems with Mono's install.
|
||||
|
||||
Failure to follow these steps may result in a broken installation.
|
||||
|
||||
d. Configuration Options
|
||||
------------------------
|
||||
|
||||
The following are the configuration options that someone
|
||||
building Mono might want to use:
|
||||
|
||||
--with-sgen=yes,no
|
||||
|
||||
Generational GC support: Used to enable or disable the
|
||||
compilation of a Mono runtime with the SGen garbage collector.
|
||||
|
||||
On platforms that support it, after building Mono, you
|
||||
will have both a mono binary and a mono-sgen binary.
|
||||
Mono uses Boehm, while mono-sgen uses the Simple
|
||||
Generational GC.
|
||||
|
||||
--with-gc=[boehm, included, sgen, none]
|
||||
|
||||
Selects the default Boehm garbage collector engine to
|
||||
use, the default is the "included" value.
|
||||
|
||||
included:
|
||||
This is the default value, and its
|
||||
the most feature complete, it will allow Mono
|
||||
to use typed allocations and support the
|
||||
debugger.
|
||||
|
||||
It is essentially a slightly modified Boehm GC
|
||||
|
||||
boehm:
|
||||
This is used to use a system-install Boehm GC,
|
||||
it is useful to test new features available in
|
||||
Boehm GC, but we do not recommend that people
|
||||
use this, as it disables a few features.
|
||||
|
||||
none:
|
||||
Disables the inclusion of a garbage
|
||||
collector.
|
||||
|
||||
--with-tls=__thread,pthread
|
||||
|
||||
Controls how Mono should access thread local storage,
|
||||
pthread forces Mono to use the pthread APIs, while
|
||||
__thread uses compiler-optimized access to it.
|
||||
|
||||
Although __thread is faster, it requires support from
|
||||
the compiler, kernel and libc. Old Linux systems do
|
||||
not support with __thread.
|
||||
|
||||
This value is typically pre-configured and there is no
|
||||
need to set it, unless you are trying to debug a
|
||||
problem.
|
||||
|
||||
--with-sigaltstack=yes,no
|
||||
|
||||
Experimental: Use at your own risk, it is known to
|
||||
cause problems with garbage collection and is hard to
|
||||
reproduce those bugs.
|
||||
|
||||
This controls whether Mono will install a special
|
||||
signal handler to handle stack overflows. If set to
|
||||
"yes", it will turn stack overflows into the
|
||||
StackOverflowException. Otherwise when a stack
|
||||
overflow happens, your program will receive a
|
||||
segmentation fault.
|
||||
|
||||
The configure script will try to detect if your
|
||||
operating system supports this. Some older Linux
|
||||
systems do not support this feature, or you might want
|
||||
to override the auto-detection.
|
||||
|
||||
--with-static_mono=yes,no
|
||||
|
||||
This controls whether `mono' should link against a
|
||||
static library (libmono.a) or a shared library
|
||||
(libmono.so).
|
||||
|
||||
This defaults to yes, and will improve the performance
|
||||
of the `mono' program.
|
||||
|
||||
This only affects the `mono' binary, the shared
|
||||
library libmono.so will always be produced for
|
||||
developers that want to embed the runtime in their
|
||||
application.
|
||||
|
||||
--with-xen-opt=yes,no
|
||||
|
||||
The default value for this is `yes', and it makes Mono
|
||||
generate code which might be slightly slower on
|
||||
average systems, but the resulting executable will run
|
||||
faster under the Xen virtualization system.
|
||||
|
||||
--with-large-heap=yes,no
|
||||
|
||||
Enable support for GC heaps larger than 3GB.
|
||||
|
||||
This value is set to `no' by default.
|
||||
|
||||
--enable-small-config=yes,no
|
||||
|
||||
Enable some tweaks to reduce memory usage and disk footprint at
|
||||
the expense of some capabilities. Typically this means that the
|
||||
number of threads that can be created is limited (256), that the
|
||||
maxmimum heap size is also reduced (256 MB) and other such limitations
|
||||
that still make mono useful, but more suitable to embedded devices
|
||||
(like mobile phones).
|
||||
|
||||
This value is set to `no' by default.
|
||||
|
||||
--with-ikvm-native=yes,no
|
||||
|
||||
Controls whether the IKVM JNI interface library is
|
||||
built or not. This is used if you are planning on
|
||||
using the IKVM Java Virtual machine with Mono.
|
||||
|
||||
This defaults to `yes'.
|
||||
|
||||
--with-profile4=yes,no
|
||||
|
||||
Whether you want to build the 4.x profile libraries
|
||||
and runtime.
|
||||
|
||||
It defaults to `yes'.
|
||||
|
||||
--with-moonlight=yes,no
|
||||
|
||||
Whether you want to generate the Silverlight/Moonlight
|
||||
libraries and toolchain in addition to the default
|
||||
(1.1 and 2.0 APIs).
|
||||
|
||||
This will produce the `smcs' compiler which will reference
|
||||
the Silverlight modified assemblies (mscorlib.dll,
|
||||
System.dll, System.Code.dll and System.Xml.Core.dll) and turn
|
||||
on the LINQ extensions for the compiler.
|
||||
|
||||
--with-moon-gc=boehm,sgen
|
||||
|
||||
Select the GC to use for Moonlight.
|
||||
|
||||
boehm:
|
||||
Selects the Boehm Garbage Collector, with the same flags
|
||||
as the regular Mono build. This is the default.
|
||||
|
||||
sgen:
|
||||
Selects the new SGen Garbage Collector, which provides
|
||||
Generational GC support, using the same flags as the
|
||||
mono-sgen build.
|
||||
|
||||
This defaults to `boehm'.
|
||||
|
||||
--with-libgdiplus=installed,sibling,<path>
|
||||
|
||||
This is used to configure where should Mono look for
|
||||
libgdiplus when running the System.Drawing tests.
|
||||
|
||||
It defaults to `installed', which means that the
|
||||
library is available to Mono through the regular
|
||||
system setup.
|
||||
|
||||
`sibling' can be used to specify that a libgdiplus
|
||||
that resides as a sibling of this directory (mono)
|
||||
should be used.
|
||||
|
||||
Or you can specify a path to a libgdiplus.
|
||||
|
||||
--disable-shared-memory
|
||||
|
||||
Use this option to disable the use of shared memory in
|
||||
Mono (this is equivalent to setting the MONO_DISABLE_SHM
|
||||
environment variable, although this removes the feature
|
||||
completely).
|
||||
|
||||
Disabling the shared memory support will disable certain
|
||||
features like cross-process named mutexes.
|
||||
|
||||
--enable-minimal=LIST
|
||||
|
||||
Use this feature to specify optional runtime
|
||||
components that you might not want to include. This
|
||||
is only useful for developers embedding Mono that
|
||||
require a subset of Mono functionality.
|
||||
|
||||
The list is a comma-separated list of components that
|
||||
should be removed, these are:
|
||||
|
||||
aot:
|
||||
Disables support for the Ahead of Time
|
||||
compilation.
|
||||
|
||||
attach:
|
||||
Support for the Mono.Management assembly and the
|
||||
VMAttach API (allowing code to be injected into
|
||||
a target VM)
|
||||
|
||||
com:
|
||||
Disables COM support.
|
||||
|
||||
debug:
|
||||
Drop debugging support.
|
||||
|
||||
decimal:
|
||||
Disables support for System.Decimal.
|
||||
|
||||
full_messages:
|
||||
By default Mono comes with a full table
|
||||
of messages for error codes. This feature
|
||||
turns off uncommon error messages and reduces
|
||||
the runtime size.
|
||||
|
||||
generics:
|
||||
Generics support. Disabling this will not
|
||||
allow Mono to run any 2.0 libraries or
|
||||
code that contains generics.
|
||||
|
||||
jit:
|
||||
Removes the JIT engine from the build, this reduces
|
||||
the executable size, and requires that all code
|
||||
executed by the virtual machine be compiled with
|
||||
Full AOT before execution.
|
||||
|
||||
large_code:
|
||||
Disables support for large assemblies.
|
||||
|
||||
logging:
|
||||
Disables support for debug logging.
|
||||
|
||||
pinvoke:
|
||||
Support for Platform Invocation services,
|
||||
disabling this will drop support for any
|
||||
libraries using DllImport.
|
||||
|
||||
portability:
|
||||
Removes support for MONO_IOMAP, the environment
|
||||
variables for simplifying porting applications that
|
||||
are case-insensitive and that mix the Unix and Windows path separators.
|
||||
|
||||
profiler:
|
||||
Disables support for the default profiler.
|
||||
|
||||
reflection_emit:
|
||||
Drop System.Reflection.Emit support
|
||||
|
||||
reflection_emit_save:
|
||||
Drop support for saving dynamically created
|
||||
assemblies (AssemblyBuilderAccess.Save) in
|
||||
System.Reflection.Emit.
|
||||
|
||||
shadow_copy:
|
||||
Disables support for AppDomain's shadow copies
|
||||
(you can disable this if you do not plan on
|
||||
using appdomains).
|
||||
|
||||
simd:
|
||||
Disables support for the Mono.SIMD intrinsics
|
||||
library.
|
||||
|
||||
ssa:
|
||||
Disables compilation for the SSA optimization
|
||||
framework, and the various SSA-based
|
||||
optimizations.
|
||||
|
||||
--enable-llvm
|
||||
--enable-loadedllvm
|
||||
|
||||
This enables the use of LLVM as a code generation engine
|
||||
for Mono. The LLVM code generator and optimizer will be
|
||||
used instead of Mono's built-in code generator for both
|
||||
Just in Time and Ahead of Time compilations.
|
||||
|
||||
See the http://www.mono-project.com/Mono_LLVM for the
|
||||
full details and up-to-date information on this feature.
|
||||
|
||||
You will need to have an LLVM built that Mono can link
|
||||
against,
|
||||
|
||||
The --enable-loadedllvm variant will make the llvm backend
|
||||
into a runtime-loadable module instead of linking it directly
|
||||
into the main mono binary.
|
||||
|
||||
--enable-big-arrays
|
||||
|
||||
This enables the use arrays whose indexes are larger
|
||||
than Int32.MaxValue.
|
||||
|
||||
By default Mono has the same limitation as .NET on
|
||||
Win32 and Win64 and limits array indexes to 32-bit
|
||||
values (even on 64-bit systems).
|
||||
|
||||
In certain scenarios where large arrays are required,
|
||||
you can pass this flag and Mono will be built to
|
||||
support 64-bit arrays.
|
||||
|
||||
This is not the default as it breaks the C embedding
|
||||
ABI that we have exposed through the Mono development
|
||||
cycle.
|
||||
|
||||
--enable-parallel-mark
|
||||
|
||||
Use this option to enable the garbage collector to use
|
||||
multiple CPUs to do its work. This helps performance
|
||||
on multi-CPU machines as the work is divided across CPUS.
|
||||
|
||||
This option is not currently the default as we have
|
||||
not done much testing with Mono.
|
||||
|
||||
--enable-dtrace
|
||||
|
||||
On Solaris and MacOS X builds a version of the Mono
|
||||
runtime that contains DTrace probes and can
|
||||
participate in the system profiling using DTrace.
|
||||
|
||||
|
||||
--disable-dev-random
|
||||
|
||||
Mono uses /dev/random to obtain good random data for
|
||||
any source that requires random numbers. If your
|
||||
system does not support this, you might want to
|
||||
disable it.
|
||||
|
||||
There are a number of runtime options to control this
|
||||
also, see the man page.
|
||||
|
||||
--enable-nacl
|
||||
|
||||
This configures the Mono compiler to generate code
|
||||
suitable to be used by Google's Native Client:
|
||||
|
||||
http://code.google.com/p/nativeclient/
|
||||
|
||||
Currently this is used with Mono's AOT engine as
|
||||
Native Client does not support JIT engines yet.
|
||||
|
||||
2. Using Mono
|
||||
=============
|
||||
|
||||
Once you have installed the software, you can run a few programs:
|
||||
|
||||
* runtime engine
|
||||
|
||||
mono program.exe
|
||||
|
||||
* C# compiler
|
||||
|
||||
mcs program.cs
|
||||
|
||||
* CIL Disassembler
|
||||
|
||||
monodis program.exe
|
||||
|
||||
See the man pages for mono(1), mint(1), monodis(1) and mcs(2)
|
||||
for further details.
|
||||
|
||||
3. Directory Roadmap
|
||||
====================
|
||||
|
||||
docs/
|
||||
Technical documents about the Mono runtime.
|
||||
|
||||
data/
|
||||
Configuration files installed as part of the Mono runtime.
|
||||
|
||||
mono/
|
||||
The core of the Mono Runtime.
|
||||
|
||||
metadata/
|
||||
The object system and metadata reader.
|
||||
|
||||
mini/
|
||||
The Just in Time Compiler.
|
||||
|
||||
dis/
|
||||
CIL executable Disassembler
|
||||
|
||||
cli/
|
||||
Common code for the JIT and the interpreter.
|
||||
|
||||
io-layer/
|
||||
The I/O layer and system abstraction for
|
||||
emulating the .NET IO model.
|
||||
|
||||
cil/
|
||||
Common Intermediate Representation, XML
|
||||
definition of the CIL bytecodes.
|
||||
|
||||
interp/
|
||||
Interpreter for CLI executables (obsolete).
|
||||
|
||||
arch/
|
||||
Architecture specific portions.
|
||||
|
||||
man/
|
||||
|
||||
Manual pages for the various Mono commands and programs.
|
||||
|
||||
samples/
|
||||
|
||||
Some simple sample programs on uses of the Mono
|
||||
runtime as an embedded library.
|
||||
|
||||
scripts/
|
||||
|
||||
Scripts used to invoke Mono and the corresponding program.
|
||||
|
||||
runtime/
|
||||
|
||||
A directory that contains the Makefiles that link the
|
||||
mono/ and mcs/ build systems.
|
||||
|
||||
../olive/
|
||||
|
||||
If the directory ../olive is present (as an
|
||||
independent checkout) from the Mono module, that
|
||||
directory is automatically configured to share the
|
||||
same prefix than this module gets.
|
||||
|
||||
|
||||
4. Git submodules maintenance
|
||||
=============================
|
||||
|
||||
Read documentation at http://mono-project.com/Git_Submodule_Maintenance
|
||||
@@ -1,548 +0,0 @@
|
||||
Mono is a software platform designed to allow developers to easily create cross platform applications.
|
||||
Mono is an open source implementation of Microsoft's .NET Framework based on the ECMA standards for C# and the Common Language Runtime.
|
||||
|
||||
[](http://jenkins.mono-project.com/job/test-mono-mainline/)
|
||||
|
||||
1. [Installation](#compilation-and-installation)
|
||||
2. [Using Mono](#using-mono)
|
||||
3. [Directory Roadmap](#directory-roadmap)
|
||||
4. [Contributing to Mono] (#contributing-to-mono)
|
||||
5. [Git submodules maintenance](#git-submodules-maintenance)
|
||||
6. [Reporting bugs](#reporting-bugs)
|
||||
|
||||
Compilation and Installation
|
||||
============================
|
||||
|
||||
a. Build Requirements
|
||||
---------------------
|
||||
|
||||
* On Itanium, you must obtain libunwind: http://www.hpl.hp.com/research/linux/libunwind/download.php4
|
||||
|
||||
* On Solaris
|
||||
|
||||
1. Make sure that you used GNU tar to unpack this package, as
|
||||
Solaris tar will not unpack this correctly, and you will get strange errors.
|
||||
|
||||
2. Make sure that you use the GNU toolchain to build the software.
|
||||
|
||||
3. Optional dependencies
|
||||
|
||||
* libgdiplus - Required for System.Drawing. This library in turn requires glib and pkg-config
|
||||
|
||||
* pkg-config - Available at: http://www.freedesktop.org/Software/pkgconfig
|
||||
|
||||
* glib 2.4 - Available at: http://www.gtk.org/
|
||||
|
||||
* libzlib - This library and the development headers are required for compression
|
||||
file support in the 2.0 profile.
|
||||
|
||||
4. Mono is required to build Mono. Use a system package or monolite (explained further below)
|
||||
|
||||
5. If you have a system Mono (not monolite), you will need to read this: http://mono-project.com/Parallel_Mono_Environments#Setting_up_a_Build_Environment
|
||||
|
||||
b. Building the Software
|
||||
------------------------
|
||||
|
||||
If you obtained this package as an officially released tarball,
|
||||
this is very simple, use configure and make:
|
||||
|
||||
`./configure --prefix=/usr/local ; make ; make install`
|
||||
|
||||
Mono supports a JIT engine on x86, SPARC, SPARCv9, S/390,
|
||||
S/390x, AMD64, ARM and PowerPC systems.
|
||||
|
||||
If you obtained this as a snapshot, you will need an existing
|
||||
Mono installation. To upgrade your installation, unpack both
|
||||
mono and mcs:
|
||||
|
||||
tar xzf mcs-XXXX.tar.gz
|
||||
tar xzf mono-XXXX.tar.gz
|
||||
mv mono-XXX mono
|
||||
mv mcs-XXX mcs
|
||||
cd mono
|
||||
./autogen.sh --prefix=/usr/local
|
||||
make
|
||||
|
||||
The Mono build system is silent for most compilation commands.
|
||||
To enable a more verbose compile (for example, to pinpoint
|
||||
problems in your makefiles or your system) pass the V=1 flag to make, like this:
|
||||
|
||||
` make V=1`
|
||||
|
||||
|
||||
c. Building the software from GIT
|
||||
---------------------------------
|
||||
|
||||
If you are building the software from GIT, make sure that you
|
||||
have up-to-date mcs and mono sources:
|
||||
|
||||
* If you are an anonymous user: `git clone git://github.com/mono/mono.git`
|
||||
|
||||
* If you are a Mono contributor with read/write privileges: `git clone [email protected]:mono/mono.git`
|
||||
|
||||
Then, go into the mono directory, and configure:
|
||||
|
||||
cd mono
|
||||
./autogen.sh --prefix=/usr/local
|
||||
make
|
||||
|
||||
For people with non-standard installations of the auto* utils and of
|
||||
pkg-config (common on misconfigured OSX and windows boxes), you could get
|
||||
an error like this:
|
||||
|
||||
./configure: line 19176: syntax error near unexpected token 'PKG_CHECK_MODULES(BASE_DEPENDENCIES,' ...
|
||||
|
||||
This means that you need to set the ACLOCAL_FLAGS environment variable
|
||||
when invoking autogen.sh, like this:
|
||||
|
||||
ACLOCAL_FLAGS="-I $acprefix/share/aclocal" ./autogen.sh --prefix=/usr/local
|
||||
|
||||
where $acprefix is the prefix where aclocal has been installed.
|
||||
This will automatically go into the mcs/ tree and build the
|
||||
binaries there.
|
||||
|
||||
This assumes that you have a working mono installation, and that
|
||||
there's a C# compiler named 'mcs', and a corresponding IL
|
||||
runtime called 'mono'. You can use two make variables
|
||||
EXTERNAL_MCS and EXTERNAL_RUNTIME to override these. e.g., you
|
||||
can say:
|
||||
|
||||
make EXTERNAL_MCS=/foo/bar/mcs EXTERNAL_RUNTIME=/somewhere/else/mono
|
||||
|
||||
If you don't have a working Mono installation
|
||||
---------------------------------------------
|
||||
|
||||
If you don't have a working Mono installation, an obvious choice
|
||||
is to install the latest released packages of 'mono' for your
|
||||
distribution and running `autogen.sh; make; make install` in the
|
||||
mono module directory.
|
||||
|
||||
You can also try a slightly more risky approach: this may not work,
|
||||
so start from the released tarball as detailed above.
|
||||
|
||||
This works by first getting the latest version of the 'monolite'
|
||||
distribution, which contains just enough to run the 'mcs'
|
||||
compiler. You do this with:
|
||||
|
||||
# Run the following line after ./autogen.sh
|
||||
make get-monolite-latest
|
||||
|
||||
This will download and automatically gunzip and untar the
|
||||
tarball, and place the files appropriately so that you can then
|
||||
just run: `make EXTERNAL_MCS=${PWD}/mcs/class/lib/monolite/gmcs.exe`
|
||||
|
||||
That will use the files downloaded by 'make get-monolite-latest.
|
||||
|
||||
Testing and Installation
|
||||
------------------------
|
||||
|
||||
You can run *(part of)* the mono and mcs test suites with the command: `make check`.
|
||||
All tests should pass.
|
||||
|
||||
If you want more *extensive* tests, including those that test the
|
||||
class libraries, you need to re-run 'configure' with the
|
||||
'--enable-nunit-tests' flag, and try: `make -k check`
|
||||
|
||||
Expect to find a few test suite failures. As a sanity check, you
|
||||
can compare the failures you got with
|
||||
|
||||
https://wrench.mono-project.com/Wrench/
|
||||
|
||||
You can now install mono with: `make install`
|
||||
|
||||
You can verify your installation by using the mono-test-install
|
||||
script, it can diagnose some common problems with Mono's install.
|
||||
Failure to follow these steps may result in a broken installation.
|
||||
|
||||
d. Configuration Options
|
||||
------------------------
|
||||
|
||||
The following are the configuration options that someone
|
||||
building Mono might want to use:
|
||||
|
||||
* `--with-sgen=yes,no` - Generational GC support: Used to enable or disable the
|
||||
compilation of a Mono runtime with the SGen garbage collector.
|
||||
|
||||
* On platforms that support it, after building Mono, you will have
|
||||
both a mono binary and a mono-sgen binary. Mono uses Boehm, while
|
||||
mono-sgen uses the Simple Generational GC.
|
||||
|
||||
* `--with-gc=[boehm, included, sgen, none]` - Selects the default Boehm garbage
|
||||
collector engine to use.
|
||||
|
||||
* *included*: (*slighty modified Boehm GC*)
|
||||
This is the default value, and its
|
||||
the most feature complete, it will allow Mono
|
||||
to use typed allocations and support the
|
||||
debugger.
|
||||
|
||||
* *boehm*:
|
||||
This is used to use a system-install Boehm GC,
|
||||
it is useful to test new features available in
|
||||
Boehm GC, but we do not recommend that people
|
||||
use this, as it disables a few features.
|
||||
|
||||
* *none*:
|
||||
Disables the inclusion of a garbage collector.
|
||||
|
||||
* This defaults to `included`.
|
||||
|
||||
* `--with-tls=__thread,pthread`
|
||||
|
||||
* Controls how Mono should access thread local storage,
|
||||
pthread forces Mono to use the pthread APIs, while
|
||||
__thread uses compiler-optimized access to it.
|
||||
|
||||
* Although __thread is faster, it requires support from
|
||||
the compiler, kernel and libc. Old Linux systems do
|
||||
not support with __thread.
|
||||
|
||||
* This value is typically pre-configured and there is no
|
||||
need to set it, unless you are trying to debug a problem.
|
||||
|
||||
* `--with-sigaltstack=yes,no`
|
||||
|
||||
* **Experimental**: Use at your own risk, it is known to
|
||||
cause problems with garbage collection and is hard to
|
||||
reproduce those bugs.
|
||||
|
||||
* This controls whether Mono will install a special
|
||||
signal handler to handle stack overflows. If set to
|
||||
`yes`, it will turn stack overflows into the
|
||||
StackOverflowException. Otherwise when a stack
|
||||
overflow happens, your program will receive a
|
||||
segmentation fault.
|
||||
|
||||
* The configure script will try to detect if your
|
||||
operating system supports this. Some older Linux
|
||||
systems do not support this feature, or you might want
|
||||
to override the auto-detection.
|
||||
|
||||
* `--with-static_mono=yes,no`
|
||||
|
||||
* This controls whether `mono` should link against a
|
||||
static library (libmono.a) or a shared library
|
||||
(libmono.so).
|
||||
|
||||
* This defaults to `yes`, and will improve the performance
|
||||
of the `mono` program.
|
||||
|
||||
* This only affects the `mono' binary, the shared
|
||||
library libmono.so will always be produced for
|
||||
developers that want to embed the runtime in their
|
||||
application.
|
||||
|
||||
* `--with-xen-opt=yes,no` - Optimize code for Xen virtualization.
|
||||
|
||||
* It makes Mono generate code which might be slightly
|
||||
slower on average systems, but the resulting executable will run
|
||||
faster under the Xen virtualization system.
|
||||
|
||||
* This defaults to `yes`.
|
||||
|
||||
* `--with-large-heap=yes,no` - Enable support for GC heaps larger than 3GB.
|
||||
|
||||
* This defaults to `no`.
|
||||
|
||||
* `--enable-small-config=yes,no` - Enable some tweaks to reduce memory usage
|
||||
and disk footprint at the expense of some capabilities.
|
||||
|
||||
* Typically this means that the number of threads that can be created
|
||||
is limited (256), that the maximum heap size is also reduced (256 MB)
|
||||
and other such limitations that still make mono useful, but more suitable
|
||||
to embedded devices (like mobile phones).
|
||||
|
||||
* This defaults to `no`.
|
||||
|
||||
* `--with-ikvm-native=yes,no` - Controls whether the IKVM JNI interface library is
|
||||
built or not.
|
||||
|
||||
* This is used if you are planning on
|
||||
using the IKVM Java Virtual machine with Mono.
|
||||
|
||||
* This defaults to `yes`.
|
||||
|
||||
* `--with-profile4=yes,no` - Whether you want to build the 4.x profile libraries
|
||||
and runtime.
|
||||
|
||||
* This defaults to `yes`.
|
||||
|
||||
* `--with-moonlight=yes,no`
|
||||
|
||||
* Whether you want to generate the Silverlight/Moonlight
|
||||
libraries and toolchain in addition to the default
|
||||
(1.1 and 2.0 APIs).
|
||||
|
||||
* This will produce the `smcs` compiler which will reference
|
||||
the Silverlight modified assemblies (mscorlib.dll,
|
||||
System.dll, System.Code.dll and System.Xml.Core.dll) and turn
|
||||
on the LINQ extensions for the compiler.
|
||||
|
||||
* `--with-moon-gc=boehm,sgen` - Select the GC to use for Moonlight.
|
||||
|
||||
* *boehm*:
|
||||
Selects the Boehm Garbage Collector, with the same flags
|
||||
as the regular Mono build. This is the default.
|
||||
|
||||
* *sgen*:
|
||||
Selects the new SGen Garbage Collector, which provides
|
||||
Generational GC support, using the same flags as the
|
||||
mono-sgen build.
|
||||
|
||||
* This defaults to `boehm`.
|
||||
|
||||
* `--with-libgdiplus=installed,sibling,<path>` - Configure where Mono
|
||||
searches for libgdiplus when running System.Drawing tests.
|
||||
|
||||
* It defaults to `installed`, which means that the
|
||||
library is available to Mono through the regular
|
||||
system setup.
|
||||
|
||||
* `sibling' can be used to specify that a libgdiplus
|
||||
that resides as a sibling of this directory (mono)
|
||||
should be used.
|
||||
|
||||
* Or you can specify a path to a libgdiplus.
|
||||
|
||||
* `--disable-shared-memory`
|
||||
|
||||
* Use this option to disable the use of shared memory in
|
||||
Mono (this is equivalent to setting the MONO_DISABLE_SHM
|
||||
environment variable, although this removes the feature
|
||||
completely).
|
||||
|
||||
* Disabling the shared memory support will disable certain
|
||||
features like cross-process named mutexes.
|
||||
|
||||
* `--enable-minimal=LIST`
|
||||
|
||||
* Use this feature to specify optional runtime
|
||||
components that you might not want to include. This
|
||||
is only useful for developers embedding Mono that
|
||||
require a subset of Mono functionality.
|
||||
* The list is a comma-separated list of components that
|
||||
should be removed, these are:
|
||||
|
||||
* `aot`:
|
||||
Disables support for the Ahead of Time compilation.
|
||||
|
||||
* `attach`:
|
||||
Support for the Mono.Management assembly and the
|
||||
VMAttach API (allowing code to be injected into
|
||||
a target VM)
|
||||
|
||||
* `com`:
|
||||
Disables COM support.
|
||||
|
||||
* `debug`:
|
||||
Drop debugging support.
|
||||
|
||||
* `decimal`:
|
||||
Disables support for System.Decimal.
|
||||
|
||||
* `full_messages`:
|
||||
By default Mono comes with a full table
|
||||
of messages for error codes. This feature
|
||||
turns off uncommon error messages and reduces
|
||||
the runtime size.
|
||||
|
||||
* `generics`:
|
||||
Generics support. Disabling this will not
|
||||
allow Mono to run any 2.0 libraries or
|
||||
code that contains generics.
|
||||
|
||||
* `jit`:
|
||||
Removes the JIT engine from the build, this reduces
|
||||
the executable size, and requires that all code
|
||||
executed by the virtual machine be compiled with
|
||||
Full AOT before execution.
|
||||
|
||||
* `large_code`:
|
||||
Disables support for large assemblies.
|
||||
|
||||
* `logging`:
|
||||
Disables support for debug logging.
|
||||
|
||||
* `pinvoke`:
|
||||
Support for Platform Invocation services,
|
||||
disabling this will drop support for any
|
||||
libraries using DllImport.
|
||||
|
||||
* `portability`:
|
||||
Removes support for MONO_IOMAP, the environment
|
||||
variables for simplifying porting applications that
|
||||
are case-insensitive and that mix the Unix and Windows path separators.
|
||||
|
||||
* `profiler`:
|
||||
Disables support for the default profiler.
|
||||
|
||||
* `reflection_emit`:
|
||||
Drop System.Reflection.Emit support
|
||||
|
||||
* `reflection_emit_save`:
|
||||
Drop support for saving dynamically created
|
||||
assemblies (AssemblyBuilderAccess.Save) in
|
||||
System.Reflection.Emit.
|
||||
|
||||
* `shadow_copy`:
|
||||
Disables support for AppDomain's shadow copies
|
||||
(you can disable this if you do not plan on
|
||||
using appdomains).
|
||||
|
||||
* `simd`:
|
||||
Disables support for the Mono.SIMD intrinsics
|
||||
library.
|
||||
|
||||
* `ssa`:
|
||||
Disables compilation for the SSA optimization
|
||||
framework, and the various SSA-based optimizations.
|
||||
|
||||
* `--enable-llvm`
|
||||
* `--enable-loadedllvm`
|
||||
|
||||
* This enables the use of LLVM as a code generation engine
|
||||
for Mono. The LLVM code generator and optimizer will be
|
||||
used instead of Mono's built-in code generator for both
|
||||
Just in Time and Ahead of Time compilations.
|
||||
|
||||
* See the http://www.mono-project.com/Mono_LLVM for the
|
||||
full details and up-to-date information on this feature.
|
||||
|
||||
* You will need to have an LLVM built that Mono can link
|
||||
against.
|
||||
|
||||
* The --enable-loadedllvm variant will make the LLVM backend
|
||||
into a runtime-loadable module instead of linking it directly
|
||||
into the main mono binary.
|
||||
|
||||
* `--enable-big-arrays` - Enable use of arrays with indexes larger
|
||||
than Int32.MaxValue.
|
||||
|
||||
* By default Mono has the same limitation as .NET on
|
||||
Win32 and Win64 and limits array indexes to 32-bit
|
||||
values (even on 64-bit systems).
|
||||
|
||||
* In certain scenarios where large arrays are required,
|
||||
you can pass this flag and Mono will be built to
|
||||
support 64-bit arrays.
|
||||
|
||||
* This is not the default as it breaks the C embedding
|
||||
ABI that we have exposed through the Mono development
|
||||
cycle.
|
||||
|
||||
* `--enable-parallel-mark`
|
||||
|
||||
* Use this option to enable the garbage collector to use
|
||||
multiple CPUs to do its work. This helps performance
|
||||
on multi-CPU machines as the work is divided across CPUS.
|
||||
|
||||
* This option is not currently the default as we have
|
||||
not done much testing with Mono.
|
||||
|
||||
* `--enable-dtrace`
|
||||
|
||||
* On Solaris and MacOS X builds a version of the Mono
|
||||
runtime that contains DTrace probes and can
|
||||
participate in the system profiling using DTrace.
|
||||
|
||||
|
||||
* `--disable-dev-random`
|
||||
|
||||
* Mono uses /dev/random to obtain good random data for
|
||||
any source that requires random numbers. If your
|
||||
system does not support this, you might want to
|
||||
disable it.
|
||||
|
||||
* There are a number of runtime options to control this
|
||||
also, see the man page.
|
||||
|
||||
* `--enable-nacl`
|
||||
|
||||
* This configures the Mono compiler to generate code
|
||||
suitable to be used by Google's Native Client:
|
||||
http://code.google.com/p/nativeclient/
|
||||
|
||||
* Currently this is used with Mono's AOT engine as
|
||||
Native Client does not support JIT engines yet.
|
||||
|
||||
Using Mono
|
||||
==========
|
||||
|
||||
Once you have installed the software, you can run a few programs:
|
||||
|
||||
* `mono program.exe` runtime engine
|
||||
|
||||
* `mcs program.cs` C# compiler
|
||||
|
||||
* `monodis program.exe` CIL Disassembler
|
||||
|
||||
See the man pages for mono(1), mint(1), monodis(1) and mcs(2)
|
||||
for further details.
|
||||
|
||||
Directory Roadmap
|
||||
=================
|
||||
|
||||
* `docs/` - Technical documents about the Mono runtime.
|
||||
|
||||
* `data/` - Configuration files installed as part of the Mono runtime.
|
||||
|
||||
* `mono/` - The core of the Mono Runtime.
|
||||
|
||||
* `metadata/` - The object system and metadata reader.
|
||||
|
||||
* `mini/` - The Just in Time Compiler.
|
||||
|
||||
* `dis/` - CIL executable Disassembler
|
||||
|
||||
* `io-layer/` - The I/O layer and system abstraction for
|
||||
emulating the .NET IO model.
|
||||
|
||||
* `cil/` - Common Intermediate Representation, XML
|
||||
definition of the CIL bytecodes.
|
||||
|
||||
* `arch/` - Architecture specific portions.
|
||||
|
||||
* `man/` - Manual pages for the various Mono commands and programs.
|
||||
|
||||
* `samples/` -Some simple sample programs on uses of the Mono
|
||||
runtime as an embedded library.
|
||||
|
||||
* `scripts/` - Scripts used to invoke Mono and the corresponding program.
|
||||
|
||||
* `runtime/` - A directory that contains the Makefiles that link the
|
||||
mono/ and mcs/ build systems.
|
||||
|
||||
* `../olive/`
|
||||
|
||||
* If the directory ../olive is present (as an
|
||||
independent checkout) from the Mono module, that
|
||||
directory is automatically configured to share the
|
||||
same prefix than this module gets.
|
||||
|
||||
Contributing to Mono
|
||||
====================
|
||||
Before submitting changes to Mono, please review the contribution guidelines at http://mono-project.com/Contributing. Please pay particular attention to the [Important Rules](http://mono-project.com/Contributing#Important_Rules) section.
|
||||
|
||||
|
||||
Git submodules maintenance
|
||||
==========================
|
||||
|
||||
Read documentation at http://mono-project.com/Git_Submodule_Maintenance
|
||||
|
||||
Maintainer
|
||||
==========
|
||||
|
||||
Mono is maintained by miguel@xamarin.com
|
||||
|
||||
Reporting bugs
|
||||
==============
|
||||
|
||||
To submit bug reports, please use Xamarin's Bugzilla:
|
||||
|
||||
https://bugzilla.xamarin.com/
|
||||
|
||||
Please use the search facility to ensure the same bug hasn't already
|
||||
been submitted and follow our guidelines on how to make a good bug
|
||||
report:
|
||||
|
||||
http://mono-project.com/Bugs#How_to_make_a_good_bug_report
|
||||
+4
-4
@@ -22,11 +22,11 @@ if test x$GCC != xyes; then
|
||||
dolt_supported=no
|
||||
fi
|
||||
case $host in
|
||||
i?86-*-linux*|i?86-apple-darwin*|x86_64-*-linux*|powerpc-*-linux*|powerpc64-*-linux* \
|
||||
|amd64-*-freebsd*|i?86-*-freebsd*|ia64-*-freebsd*|arm*-*-linux*|sparc*-*-linux*|mips*-*-linux*|x86_64-apple-darwin*|aarch64*)
|
||||
i?86-*-linux*|x86_64-*-linux*|powerpc-*-linux*|powerpc64-*-linux* \
|
||||
|amd64-*-freebsd*|i?86-*-freebsd*|ia64-*-freebsd*|arm*-*-linux*|sparc*-*-linux*|mips*-*-linux*|x86_64-apple-darwin*)
|
||||
pic_options='-fPIC'
|
||||
;;
|
||||
?86-pc-cygwin*|i?86-pc-cygwin*|i?86-pc-mingw32*)
|
||||
?86-pc-cygwin*|i?86-pc-cygwin*)
|
||||
pic_options='-DDLL_EXPORT'
|
||||
;;
|
||||
i?86-apple-darwin*|arm-apple-darwin*)
|
||||
@@ -158,7 +158,7 @@ modeok=false
|
||||
tagok=false
|
||||
for arg in "$[]@"; do
|
||||
case "$arg" in
|
||||
--silent) ;;
|
||||
--silent) ;;
|
||||
--mode=compile) modeok=true ;;
|
||||
--tag=CC|--tag=CXX) tagok=true ;;
|
||||
--quiet) ;;
|
||||
|
||||
@@ -1,98 +0,0 @@
|
||||
#
|
||||
# Appveyor configuration file for CI build of Mono on Windows (under Cygwin)
|
||||
#
|
||||
# For further details see http://www.appveyor.com
|
||||
#
|
||||
|
||||
# Use 'unstable' Appveyor build worker image as Appveyor have added Cygwin to this for us
|
||||
os: Unstable
|
||||
|
||||
#
|
||||
# Custom environment variables
|
||||
#
|
||||
environment:
|
||||
global:
|
||||
CYG_ROOT: C:/cygwin
|
||||
CYG_MIRROR: http://cygwin.mirror.constant.com
|
||||
CYG_CACHE: C:/cygwin/var/cache/setup
|
||||
NSIS_ROOT: C:\nsis
|
||||
|
||||
#
|
||||
# Initialisation prior to pulling the Mono repository
|
||||
#
|
||||
init:
|
||||
- 'echo Building Mono for Windows'
|
||||
- 'echo System architecture: %PLATFORM%'
|
||||
- 'echo Repo build branch is: %APPVEYOR_REPO_BRANCH%'
|
||||
- 'echo Build folder is: %APPVEYOR_BUILD_FOLDER%'
|
||||
# Attempt to ensure we don't try to convert line endings to Win32 CRLF as this will cause build to fail
|
||||
- 'git config --global core.autocrlf input'
|
||||
|
||||
#
|
||||
# Install needed build dependencies
|
||||
#
|
||||
install:
|
||||
# NOTE: Already installed on current Appveyor unstable image
|
||||
# - 'echo Retrieving Cygwin'
|
||||
# - 'appveyor DownloadFile http://cygwin.com/setup-x86.exe -FileName %CYGROOT%/setup-x86.exe'
|
||||
- 'echo Setting up Cygwin dependencies'
|
||||
- '%CYG_ROOT%\setup-x86.exe -qnNdO -R "%CYG_ROOT%" -s "%CYG_MIRROR%" -l "%CYG_CACHE%" -P autoconf -P automake -P bison -P gcc-core -P gcc-g++ -P mingw-runtime -P mingw-binutils -P mingw-gcc-core -P mingw-gcc-g++ -P mingw-pthreads -P mingw-w32api -P libtool -P make -P python -P gettext-devel -P gettext -P intltool -P libiconv -P pkg-config -P git -P wget -P curl > NUL'
|
||||
- 'echo Check Cygwin setup'
|
||||
- '%CYG_ROOT%/bin/bash -lc "cygcheck -dc cygwin"'
|
||||
- 'echo Done setting up Cygwin'
|
||||
- 'echo Retrieving NSIS'
|
||||
- 'appveyor DownloadFile "http://sunet.dl.sourceforge.net/project/nsis/NSIS 2/2.46/nsis-2.46-setup.exe" -FileName nsissetup.exe'
|
||||
- 'echo Setting up NSIS'
|
||||
- 'nsissetup.exe /S /D=%NSIS_ROOT%'
|
||||
- 'echo Done setting up NSIS'
|
||||
|
||||
#
|
||||
# NOTE: msbuild doesn't work at present so use Cygwin to build
|
||||
#
|
||||
#build:
|
||||
# project: C:\projects\mono\msvc\mono.sln
|
||||
# verbosity: detailed
|
||||
|
||||
# Cygwin build script
|
||||
#
|
||||
# NOTES:
|
||||
#
|
||||
# The stdin/stdout file descriptor appears not to be valid for the Appveyor
|
||||
# build which causes failures as certain functions attempt to redirect
|
||||
# default file handles. Ensure a dummy file descriptor is opened with exec.
|
||||
#
|
||||
build_script:
|
||||
- cmd: 'echo Cygwin root is: %CYG_ROOT%'
|
||||
- cmd: 'echo Build folder is: %APPVEYOR_BUILD_FOLDER%'
|
||||
- cmd: 'echo Repo build branch is: %APPVEYOR_REPO_BRANCH%'
|
||||
- cmd: 'echo Repo build commit is: %APPVEYOR_REPO_COMMIT%'
|
||||
- cmd: 'echo Autogen running...'
|
||||
- cmd: '%CYG_ROOT%/bin/bash -lc "cd $APPVEYOR_BUILD_FOLDER; exec 0</dev/null; NOCONFIGURE=1 ./autogen.sh --prefix=/usr/local --with-preview=yes"'
|
||||
- cmd: 'echo Configure running...'
|
||||
- cmd: '%CYG_ROOT%/bin/bash -lc "cd $APPVEYOR_BUILD_FOLDER; exec 0</dev/null; ./configure --host=i686-pc-mingw32"'
|
||||
- cmd: 'echo Pulling monolite latest...'
|
||||
- cmd: '%CYG_ROOT%/bin/bash -lc "cd $APPVEYOR_BUILD_FOLDER; exec 0</dev/null; make get-monolite-latest"'
|
||||
- cmd: 'echo Make running...'
|
||||
- cmd: '%CYG_ROOT%/bin/bash -lc "cd $APPVEYOR_BUILD_FOLDER; exec 0</dev/null; make"'
|
||||
- cmd: 'echo Installing...'
|
||||
- cmd: 'mkdir %APPVEYOR_BUILD_FOLDER%\install'
|
||||
- cmd: '%CYG_ROOT%/bin/bash --login -lc "export CYGWIN=winsymlinks:native; mount \"$APPVEYOR_BUILD_FOLDER\install\" /usr/local; cd $APPVEYOR_BUILD_FOLDER; exec 0</dev/null; make install; umount /usr/local"'
|
||||
# - cmd: 'echo Building package...'
|
||||
# - cmd: 'cd %APPVEYOR_BUILD_FOLDER%'
|
||||
# - cmd: '%NSIS_ROOT%\makensis /DMILESTONE=%APPVEYOR_REPO_BRANCH% /DSOURCE_INSTALL_DIR=%APPVEYOR_BUILD_FOLDER\install\*.* /DBUILDNUM=%APPVEYOR_BUILD_VERSION% monowiz.win32.nsi'
|
||||
# - cmd: 'Building distribution...'
|
||||
# - cmd: '%CYG_ROOT%/bin/bash -lc "export CYGWIN=winsymlinks:native; cd $APPVEYOR_BUILD_FOLDER; exec 0</dev/null; make dist"'
|
||||
|
||||
#
|
||||
# Disable tests for now
|
||||
#
|
||||
test: off
|
||||
|
||||
#
|
||||
# NOTE: Currently this is the Mono installation tree. In future we will create an installation package artifact.
|
||||
# It has to be relative to the project path. Thus we have installed to within the build tree.
|
||||
#
|
||||
artifacts:
|
||||
- path: install
|
||||
name: mono-binaries
|
||||
type: zip
|
||||
+10
-13
@@ -37,7 +37,7 @@ if [ -z "$LIBTOOL" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
(grep "^AM_PROG_LIBTOOL" $srcdir/configure.ac >/dev/null) && {
|
||||
(grep "^AM_PROG_LIBTOOL" $srcdir/configure.in >/dev/null) && {
|
||||
($LIBTOOL --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "**Error**: You must have \`libtool' installed to compile Mono."
|
||||
@@ -47,8 +47,8 @@ fi
|
||||
}
|
||||
}
|
||||
|
||||
grep "^AM_GNU_GETTEXT" $srcdir/configure.ac >/dev/null && {
|
||||
grep "sed.*POTFILES" $srcdir/configure.ac >/dev/null || \
|
||||
grep "^AM_GNU_GETTEXT" $srcdir/configure.in >/dev/null && {
|
||||
grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \
|
||||
(gettext --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "**Error**: You must have \`gettext' installed to compile Mono."
|
||||
@@ -95,7 +95,7 @@ xlc )
|
||||
esac
|
||||
|
||||
|
||||
if grep "^AM_PROG_LIBTOOL" configure.ac >/dev/null; then
|
||||
if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then
|
||||
if test -z "$NO_LIBTOOLIZE" ; then
|
||||
echo "Running libtoolize..."
|
||||
${LIBTOOL}ize --force --copy
|
||||
@@ -107,22 +107,19 @@ fi
|
||||
# Plug in the extension module
|
||||
#
|
||||
has_ext_mod=false
|
||||
ext_mod_args=''
|
||||
for PARAM; do
|
||||
if [[ $PARAM =~ "--enable-extension-module" ]] ; then
|
||||
has_ext_mod=true
|
||||
if [[ $PARAM =~ "=" ]] ; then
|
||||
ext_mod_args=`echo $PARAM | cut -d= -f2`
|
||||
fi
|
||||
fi
|
||||
if test "$PARAM" = "--enable-extension-module" ; then
|
||||
has_ext_mod=true
|
||||
fi
|
||||
done
|
||||
|
||||
if test x$has_ext_mod = xtrue; then
|
||||
pushd ../mono-extensions/scripts
|
||||
sh ./prepare-repo.sh $ext_mod_args || exit 1
|
||||
sh ./prepare-repo.sh || exit 1
|
||||
popd
|
||||
else
|
||||
cat mono/mini/Makefile.am.in > mono/mini/Makefile.am
|
||||
cat mono/metadata/Makefile.am.in > mono/metadata/Makefile.am
|
||||
fi
|
||||
|
||||
|
||||
@@ -137,7 +134,7 @@ aclocal -Wnone -I m4 -I . $ACLOCAL_FLAGS || {
|
||||
exit 1
|
||||
}
|
||||
|
||||
if grep "^AC_CONFIG_HEADERS" configure.ac >/dev/null; then
|
||||
if grep "^AC_CONFIG_HEADERS" configure.in >/dev/null; then
|
||||
echo "Running autoheader..."
|
||||
autoheader || { echo "**Error**: autoheader failed."; exit 1; }
|
||||
fi
|
||||
|
||||
+1
-1
@@ -57,7 +57,7 @@ function setup ()
|
||||
CROSS_DLL_DIR="$CROSS_DIR/bin"
|
||||
PATH=$CROSS_BIN_DIR:$PATH
|
||||
|
||||
MONO_VERSION=`grep AC_INIT configure.ac | cut -d ',' -f 2|tr -d '\[ \]'`
|
||||
MONO_VERSION=`grep AC_INIT configure.in | cut -d ',' -f 2|tr -d '\[ \]'`
|
||||
|
||||
if [ -d ./.git ]; then
|
||||
MONO_GIT_COMMIT="`git log -1 --format=format:%t`"
|
||||
|
||||
-3767
File diff suppressed because it is too large.
Load diff
Executable
+3689
File diff suppressed because it is too large.
Load diff
+12
-4
@@ -12,8 +12,7 @@ EXTRA_DIST = \
|
||||
mono.pc.in mono-2.pc.in monosgen-2.pc.in mint.pc.in dotnet.pc.in dotnet35.pc.in wcf.pc.in monodoc.pc.in \
|
||||
mono-nunit.pc.in mono-cairo.pc.in mono-options.pc.in cecil.pc.in \
|
||||
mono-lineeditor.pc.in system.web.extensions_1.0.pc.in system.web.extensions.design_1.0.pc.in\
|
||||
dtrace-prelink.sh system.web.mvc.pc.in system.web.mvc2.pc.in system.web.mvc3.pc.in aspnetwebstack.pc.in \
|
||||
reactive.pc.in xbuild12.pc \
|
||||
dtrace-prelink.sh mono.web.pc.in system.web.mvc.pc.in system.web.mvc2.pc.in system.web.mvc3.pc.in aspnetwebstack.pc.in reactive.pc.in \
|
||||
net_1_1/machine.config \
|
||||
gdb/mono-gdb.py \
|
||||
gdb/gdb-python.diff
|
||||
@@ -26,11 +25,20 @@ else
|
||||
SGENPCFILE=
|
||||
endif
|
||||
|
||||
if JIT_SUPPORTED
|
||||
if INTERP_SUPPORTED
|
||||
pkgconfig_DATA= mono.pc mono-2.pc mint.pc dotnet.pc dotnet35.pc wcf.pc mono-nunit.pc mono-cairo.pc mono-options.pc cecil.pc monodoc.pc mono-lineeditor.pc system.web.extensions_1.0.pc \
|
||||
system.web.extensions.design_1.0.pc mono.web.pc system.web.mvc.pc system.web.mvc2.pc system.web.mvc3.pc aspnetwebstack.pc reactive.pc $(SGENPCFILE)
|
||||
else
|
||||
pkgconfig_DATA= mono.pc mono-2.pc dotnet.pc dotnet35.pc wcf.pc mono-nunit.pc mono-cairo.pc mono-options.pc cecil.pc monodoc.pc mono-lineeditor.pc system.web.extensions_1.0.pc \
|
||||
system.web.extensions.design_1.0.pc system.web.mvc.pc system.web.mvc2.pc system.web.mvc3.pc aspnetwebstack.pc reactive.pc xbuild12.pc $(SGENPCFILE)
|
||||
system.web.extensions.design_1.0.pc mono.web.pc system.web.mvc.pc system.web.mvc2.pc system.web.mvc3.pc aspnetwebstack.pc reactive.pc $(SGENPCFILE)
|
||||
endif
|
||||
else
|
||||
pkgconfig_DATA= mint.pc mono-nunit.pc mono-cairo.pc mono-options.pc cecil.pc monodoc.pc mono-lineeditor.pc
|
||||
endif
|
||||
|
||||
DISTCLEANFILES= mono-2.pc mono.pc mint.pc dotnet.pc dotnet35.pc wcf.pc mono-nunit.pc mono-cairo.pc mono-options.pc cecil.pc monodoc.pc mono-lineeditor.pc system.web.extensions_1.0.pc \
|
||||
system.web.extensions.design_1.0.pc system.web.mvc.pc system.web.mvc2.pc system.web.mvc3.pc aspnetwebstack.pc reactive.pc $(SGENPCFILE) mono-sgen-gdb.py
|
||||
system.web.extensions.design_1.0.pc mono.web.pc system.web.mvc.pc system.web.mvc2.pc system.web.mvc3.pc aspnetwebstack.pc reactive.pc $(SGENPCFILE) mono-sgen-gdb.py
|
||||
|
||||
mono_DATA = config \
|
||||
browscap.ini
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Name: AspNetWebStack
|
||||
Description: References Microsoft ASP.NET Web Stack
|
||||
Version: @VERSION@
|
||||
Libs: -r:@prefix@/lib/mono/gac/System.Web.Razor/2.0.0.0__31bf3856ad364e35/System.Web.Razor.dll -r:@prefix@/lib/mono/gac/System.Web.Http/4.0.0.0__31bf3856ad364e35/System.Web.Http.dll -r:@prefix@/lib/mono/gac/System.Web.WebPages/2.0.0.0__31bf3856ad364e35/System.Web.WebPages.dll -r:@prefix@/lib/mono/gac/System.Web.WebPages.Razor/2.0.0.0__31bf3856ad364e35/System.Web.WebPages.Razor.dll -r:@prefix@/lib/mono/gac/System.Web.WebPages.Deployment/2.0.0.0__31bf3856ad364e35/System.Web.WebPages.Deployment.dll
|
||||
Libs: -r:System.Web.Razor.dll -r:System.Web.Http.dll -r:System.Web.WebPages -r:System.Web.WebPages.Razor -r:System.Web.WebPages.Deployment
|
||||
+3
-8
@@ -10,15 +10,12 @@
|
||||
<dllmap dll="i:odbc32.dll" target="libiodbc.dylib" os="osx"/>
|
||||
<dllmap dll="oci" target="libclntsh@libsuffix@" os="!windows"/>
|
||||
<dllmap dll="db2cli" target="libdb2_36@libsuffix@" os="!windows"/>
|
||||
<dllmap dll="MonoPosixHelper" target="@prefix@/@reloc_libdir@/libMonoPosixHelper@libsuffix@" os="!windows" />
|
||||
<dllmap dll="MonoPosixHelper" target="libMonoPosixHelper@libsuffix@" os="!windows" />
|
||||
<dllmap dll="i:msvcrt" target="@LIBC@" os="!windows"/>
|
||||
<dllmap dll="i:msvcrt.dll" target="@LIBC@" os="!windows"/>
|
||||
<dllmap dll="sqlite" target="@SQLITE@" os="!windows"/>
|
||||
<dllmap dll="sqlite3" target="@SQLITE3@" os="!windows"/>
|
||||
<dllmap dll="libX11" target="@X11@" os="!windows" />
|
||||
<dllmap dll="libgdk-x11-2.0" target="@GDKX11@" os="!windows"/>
|
||||
<dllmap dll="libgtk-x11-2.0" target="@GTKX11@" os="!windows"/>
|
||||
<dllmap dll="libXinerama" target="@XINERAMA@" os="!windows" />
|
||||
<dllmap dll="libcairo-2.dll" target="libcairo.so.2" os="!windows"/>
|
||||
<dllmap dll="libcairo-2.dll" target="libcairo.2.dylib" os="osx"/>
|
||||
<dllmap dll="libcups" target="libcups.so.2" os="!windows"/>
|
||||
@@ -29,8 +26,6 @@
|
||||
<dllentry dll="__Internal" name="MoveMemory" target="mono_win32_compat_MoveMemory"/>
|
||||
<dllentry dll="__Internal" name="ZeroMemory" target="mono_win32_compat_ZeroMemory"/>
|
||||
</dllmap>
|
||||
<dllmap dll="gdiplus" target="@libgdiplus_install_loc@" os="!windows"/>
|
||||
<dllmap dll="gdiplus.dll" target="@libgdiplus_install_loc@" os="!windows"/>
|
||||
<dllmap dll="gdi32" target="@libgdiplus_install_loc@" os="!windows"/>
|
||||
<dllmap dll="gdi32.dll" target="@libgdiplus_install_loc@" os="!windows"/>
|
||||
<dllmap dll="gdiplus" target="@prefix@/lib/libgdiplus@libsuffix@" />
|
||||
<dllmap dll="gdiplus.dll" target="@prefix@/lib/libgdiplus@libsuffix@" />
|
||||
</configuration>
|
||||
+1
-1
@@ -2,4 +2,4 @@
|
||||
Name: Standard libraries in a .NET setup
|
||||
Description: References all the standard .NET libraries for compilation
|
||||
Version: @VERSION@
|
||||
Libs: -r:Accessibility.dll -r:cscompmgd.dll -r:Microsoft.VisualC.dll -r:System.Configuration.Install.dll -r:System.Data.dll -r:System.Data.OracleClient.dll -r:System.Design.dll -r:System.DirectoryServices.dll -r:System.dll -r:System.Drawing.Design.dll -r:System.Drawing.dll -r:System.EnterpriseServices.dll -r:System.Management.dll -r:System.Messaging.dll -r:System.Runtime.Remoting.dll -r:System.Runtime.Serialization.Formatters.Soap.dll -r:System.Security.dll -r:System.ServiceProcess.dll -r:System.Web.dll -r:System.Web.Services.dll -r:System.Windows.Forms.dll -r:System.Xml.dll -r:System.Xml.Linq.dll
|
||||
Libs: -r:Accessibility.dll -r:cscompmgd.dll -r:Microsoft.VisualC.dll -r:System.Configuration.Install.dll -r:System.Data.dll -r:System.Data.OracleClient.dll -r:System.Design.dll -r:System.DirectoryServices.dll -r:System.dll -r:System.Drawing.Design.dll -r:System.Drawing.dll -r:System.EnterpriseServices.dll -r:System.Management.dll -r:System.Messaging.dll -r:System.Runtime.Remoting.dll -r:System.Runtime.Serialization.Formatters.Soap.dll -r:System.Security.dll -r:System.ServiceProcess.dll -r:System.Web.dll -r:System.Web.Services.dll -r:System.Windows.Forms.dll -r:System.Xml.dll
|
||||
+20
-21
@@ -15,7 +15,6 @@
|
||||
# When attaching to a mono process, make sure you are in the same directory.
|
||||
#
|
||||
|
||||
from __future__ import print_function
|
||||
import os
|
||||
|
||||
class StringPrinter:
|
||||
@@ -36,7 +35,7 @@ class StringPrinter:
|
||||
while i < len:
|
||||
val = (chars.cast(gdb.lookup_type ("gint64")) + (i * 2)).cast(gdb.lookup_type ("gunichar2").pointer ()).dereference ()
|
||||
if val >= 256:
|
||||
c = "\u%X".format (val)
|
||||
c = "\u%X" % val
|
||||
else:
|
||||
c = chr (val)
|
||||
res.append (c)
|
||||
@@ -53,7 +52,7 @@ def stringify_class_name(ns, name):
|
||||
if ns == "":
|
||||
return name
|
||||
else:
|
||||
return "%s.%s".format (ns, name)
|
||||
return "%s.%s" % (ns, name)
|
||||
|
||||
class ArrayPrinter:
|
||||
"Print a C# array"
|
||||
@@ -66,7 +65,7 @@ class ArrayPrinter:
|
||||
def to_string(self):
|
||||
obj = self.val.cast (gdb.lookup_type ("MonoArray").pointer ()).dereference ()
|
||||
length = obj ['max_length']
|
||||
return "%s [%d]".format (stringify_class_name (self.class_ns, self.class_name [0:len (self.class_name) - 2]), int (length))
|
||||
return "%s [%d]" % (stringify_class_name (self.class_ns, self.class_name [0:len(self.class_name) - 2]), int(length))
|
||||
|
||||
class ObjectPrinter:
|
||||
"Print a C# object"
|
||||
@@ -96,7 +95,7 @@ class ObjectPrinter:
|
||||
return (field.name, self.obj [field.name])
|
||||
except:
|
||||
# Superclass
|
||||
return (field.name, self.obj.cast (gdb.lookup_type ("%s".format (field.name))))
|
||||
return (field.name, self.obj.cast (gdb.lookup_type ("%s" % (field.name))))
|
||||
|
||||
def children(self):
|
||||
# FIXME: It would be easier if gdb.Value would support iteration itself
|
||||
@@ -109,11 +108,11 @@ class ObjectPrinter:
|
||||
class_name = obj ['vtable'].dereference ()['klass'].dereference ()['name'].string ()
|
||||
if class_name [-2:len(class_name)] == "[]":
|
||||
return {}.__iter__ ()
|
||||
gdb_type = gdb.lookup_type ("struct %s_%s".format (class_ns.replace (".", "_"), class_name))
|
||||
gdb_type = gdb.lookup_type ("struct %s_%s" % (class_ns.replace (".", "_"), class_name))
|
||||
return self._iterator(obj.cast (gdb_type))
|
||||
except:
|
||||
print (sys.exc_info ()[0])
|
||||
print (sys.exc_info ()[1])
|
||||
print sys.exc_info ()[0]
|
||||
print sys.exc_info ()[1]
|
||||
return {}.__iter__ ()
|
||||
|
||||
def to_string(self):
|
||||
@@ -129,16 +128,16 @@ class ObjectPrinter:
|
||||
return ArrayPrinter (self.val,class_ns,class_name).to_string ()
|
||||
if class_ns != "":
|
||||
try:
|
||||
gdb_type = gdb.lookup_type ("struct %s.%s".format (class_ns, class_name))
|
||||
gdb_type = gdb.lookup_type ("struct %s.%s" % (class_ns, class_name))
|
||||
except:
|
||||
# Maybe there is no debug info for that type
|
||||
return "%s.%s".format (class_ns, class_name)
|
||||
return "%s.%s" % (class_ns, class_name)
|
||||
#return obj.cast (gdb_type)
|
||||
return "%s.%s".format (class_ns, class_name)
|
||||
return "%s.%s" % (class_ns, class_name)
|
||||
return class_name
|
||||
except:
|
||||
print (sys.exc_info ()[0])
|
||||
print (sys.exc_info ()[1])
|
||||
print sys.exc_info ()[0]
|
||||
print sys.exc_info ()[1]
|
||||
# FIXME: This can happen because we don't have liveness information
|
||||
return self.val.cast (gdb.lookup_type ("guint64"))
|
||||
|
||||
@@ -154,9 +153,9 @@ class MonoMethodPrinter:
|
||||
val = self.val.dereference ()
|
||||
klass = val ["klass"].dereference ()
|
||||
class_name = stringify_class_name (klass ["name_space"].string (), klass ["name"].string ())
|
||||
return "\"%s:%s ()\"".format (class_name, val ["name"].string ())
|
||||
return "\"%s:%s ()\"" % (class_name, val ["name"].string ())
|
||||
# This returns more info but requires calling into the inferior
|
||||
#return "\"%s\"".format (gdb.parse_and_eval ("mono_method_full_name (%s, 1)".format (str (int (self.val.cast (gdb.lookup_type ("guint64")))))).string ())
|
||||
#return "\"%s\"" % (gdb.parse_and_eval ("mono_method_full_name (%s, 1)" % (str (int (self.val.cast (gdb.lookup_type ("guint64")))))).string ())
|
||||
|
||||
class MonoClassPrinter:
|
||||
"Print a MonoClass structure"
|
||||
@@ -169,9 +168,9 @@ class MonoClassPrinter:
|
||||
return "0x0"
|
||||
klass = self.val.dereference ()
|
||||
class_name = stringify_class_name (klass ["name_space"].string (), klass ["name"].string ())
|
||||
return "\"%s\"".format (class_name)
|
||||
return "\"%s\"" % (class_name)
|
||||
# This returns more info but requires calling into the inferior
|
||||
#return "\"%s\"".format (gdb.parse_and_eval ("mono_type_full_name (&((MonoClass*)%s)->byval_arg)".format (str (int ((self.val).cast (gdb.lookup_type ("guint64")))))))
|
||||
#return "\"%s\"" % (gdb.parse_and_eval ("mono_type_full_name (&((MonoClass*)%s)->byval_arg)" % (str (int ((self.val).cast (gdb.lookup_type ("guint64")))))))
|
||||
|
||||
def lookup_pretty_printer(val):
|
||||
t = str (val.type)
|
||||
@@ -217,9 +216,9 @@ class MonoSupport(object):
|
||||
new_size = os.stat ("xdb.s").st_size
|
||||
if new_size > self.s_size:
|
||||
sofile = "xdb.so"
|
||||
gdb.execute ("shell as -o xdb.o xdb.s && ld -shared -o %s xdb.o".format (sofile))
|
||||
gdb.execute ("shell as -o xdb.o xdb.s && ld -shared -o %s xdb.o" % sofile)
|
||||
# FIXME: This prints messages which couldn't be turned off
|
||||
gdb.execute ("add-symbol-file %s 0".format (sofile))
|
||||
gdb.execute ("add-symbol-file %s 0" % sofile)
|
||||
self.s_size = new_size
|
||||
|
||||
class RunHook (gdb.Command):
|
||||
@@ -230,7 +229,7 @@ class RunHook (gdb.Command):
|
||||
def invoke(self, arg, from_tty):
|
||||
mono_support.run_hook ()
|
||||
|
||||
print ("Mono support loaded.")
|
||||
print "Mono support loaded."
|
||||
|
||||
mono_support = MonoSupport ()
|
||||
|
||||
@@ -245,4 +244,4 @@ exec_file = gdb.current_objfile ().filename
|
||||
if os.stat (exec_file).st_size != os.lstat (exec_file).st_size:
|
||||
exec_file = os.readlink (exec_file)
|
||||
exec_dir = os.path.dirname (exec_file)
|
||||
gdb.execute ("source %s/%s-gdbinit".format (exec_dir, os.path.basename (exec_file)))
|
||||
gdb.execute ("source %s/%s-gdbinit" % (exec_dir, os.path.basename (exec_file)))
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
import sys
|
||||
|
||||
gdb.execute ("file %s".format (sys.argv [0]))
|
||||
gdb.execute ("r --break *:* %s".format (" ".join (sys.argv [1:len (sys.argv)])))
|
||||
gdb.execute ("file %s" % sys.argv [0])
|
||||
gdb.execute ("r --break *:* %s" % " ".join (sys.argv[1:len(sys.argv)]))
|
||||
|
||||
while True:
|
||||
try:
|
||||
|
||||
+31
-32
@@ -10,7 +10,6 @@
|
||||
# - run mono under gdb, or attach to a mono process started with --debug=gdb using gdb.
|
||||
#
|
||||
|
||||
from __future__ import print_function
|
||||
import os
|
||||
|
||||
class StringPrinter:
|
||||
@@ -31,7 +30,7 @@ class StringPrinter:
|
||||
while i < len:
|
||||
val = (chars.cast(gdb.lookup_type ("gint64")) + (i * 2)).cast(gdb.lookup_type ("gunichar2").pointer ()).dereference ()
|
||||
if val >= 256:
|
||||
c = "\u%X".format (val)
|
||||
c = "\u%X" % val
|
||||
else:
|
||||
c = chr (val)
|
||||
res.append (c)
|
||||
@@ -48,7 +47,7 @@ def stringify_class_name(ns, name):
|
||||
if ns == "":
|
||||
return name
|
||||
else:
|
||||
return "%s.%s".format (ns, name)
|
||||
return "%s.%s" % (ns, name)
|
||||
|
||||
class ArrayPrinter:
|
||||
"Print a C# array"
|
||||
@@ -61,7 +60,7 @@ class ArrayPrinter:
|
||||
def to_string(self):
|
||||
obj = self.val.cast (gdb.lookup_type ("MonoArray").pointer ()).dereference ()
|
||||
length = obj ['max_length']
|
||||
return "%s [%d]".format (stringify_class_name (self.class_ns, self.class_name [0:len(self.class_name) - 2]), int(length))
|
||||
return "%s [%d]" % (stringify_class_name (self.class_ns, self.class_name [0:len(self.class_name) - 2]), int(length))
|
||||
|
||||
class ObjectPrinter:
|
||||
"Print a C# object"
|
||||
@@ -91,7 +90,7 @@ class ObjectPrinter:
|
||||
return (field.name, self.obj [field.name])
|
||||
except:
|
||||
# Superclass
|
||||
return (field.name, self.obj.cast (gdb.lookup_type ("%s".format (field.name))))
|
||||
return (field.name, self.obj.cast (gdb.lookup_type ("%s" % (field.name))))
|
||||
|
||||
def children(self):
|
||||
# FIXME: It would be easier if gdb.Value would support iteration itself
|
||||
@@ -105,13 +104,13 @@ class ObjectPrinter:
|
||||
if class_name [-2:len(class_name)] == "[]":
|
||||
return {}.__iter__ ()
|
||||
try:
|
||||
gdb_type = gdb.lookup_type ("struct %s_%s".format (class_ns.replace (".", "_"), class_name))
|
||||
gdb_type = gdb.lookup_type ("struct %s_%s" % (class_ns.replace (".", "_"), class_name))
|
||||
return self._iterator(obj.cast (gdb_type))
|
||||
except:
|
||||
return {}.__iter__ ()
|
||||
except:
|
||||
print (sys.exc_info ()[0])
|
||||
print (sys.exc_info ()[1])
|
||||
print sys.exc_info ()[0]
|
||||
print sys.exc_info ()[1]
|
||||
return {}.__iter__ ()
|
||||
|
||||
def to_string(self):
|
||||
@@ -127,16 +126,16 @@ class ObjectPrinter:
|
||||
return ArrayPrinter (self.val,class_ns,class_name).to_string ()
|
||||
if class_ns != "":
|
||||
try:
|
||||
gdb_type = gdb.lookup_type ("struct %s.%s".format (class_ns, class_name))
|
||||
gdb_type = gdb.lookup_type ("struct %s.%s" % (class_ns, class_name))
|
||||
except:
|
||||
# Maybe there is no debug info for that type
|
||||
return "%s.%s".format (class_ns, class_name)
|
||||
return "%s.%s" % (class_ns, class_name)
|
||||
#return obj.cast (gdb_type)
|
||||
return "%s.%s".format (class_ns, class_name)
|
||||
return "%s.%s" % (class_ns, class_name)
|
||||
return class_name
|
||||
except:
|
||||
print (sys.exc_info ()[0])
|
||||
print (sys.exc_info ()[1])
|
||||
print sys.exc_info ()[0]
|
||||
print sys.exc_info ()[1]
|
||||
# FIXME: This can happen because we don't have liveness information
|
||||
return self.val.cast (gdb.lookup_type ("guint64"))
|
||||
|
||||
@@ -152,9 +151,9 @@ class MonoMethodPrinter:
|
||||
val = self.val.dereference ()
|
||||
klass = val ["klass"].dereference ()
|
||||
class_name = stringify_class_name (klass ["name_space"].string (), klass ["name"].string ())
|
||||
return "\"%s:%s ()\"".format (class_name, val ["name"].string ())
|
||||
return "\"%s:%s ()\"" % (class_name, val ["name"].string ())
|
||||
# This returns more info but requires calling into the inferior
|
||||
#return "\"%s\"".format (gdb.parse_and_eval ("mono_method_full_name (%s, 1)".format (str (int (self.val.cast (gdb.lookup_type ("guint64")))))).string ())
|
||||
#return "\"%s\"" % (gdb.parse_and_eval ("mono_method_full_name (%s, 1)" % (str (int (self.val.cast (gdb.lookup_type ("guint64")))))).string ())
|
||||
|
||||
class MonoClassPrinter:
|
||||
"Print a MonoClass structure"
|
||||
@@ -168,20 +167,20 @@ class MonoClassPrinter:
|
||||
klass = self.val.dereference ()
|
||||
class_name = stringify_class_name (klass ["name_space"].string (), klass ["name"].string ())
|
||||
if klass ["generic_class"].cast (gdb.lookup_type ("guint64")) != 0:
|
||||
class_name = "%s<%s>".format (class_name, str (klass ["generic_class"]["context"]["class_inst"]))
|
||||
class_name = "%s<%s>" % (class_name, str (klass ["generic_class"]["context"]["class_inst"]))
|
||||
if add_quotes:
|
||||
return "\"%s\"".format (class_name)
|
||||
return "\"%s\"" % (class_name)
|
||||
else:
|
||||
return class_name
|
||||
# This returns more info but requires calling into the inferior
|
||||
#return "\"%s\"".format (gdb.parse_and_eval ("mono_type_full_name (&((MonoClass*)%s)->byval_arg)".format (str (int ((self.val).cast (gdb.lookup_type ("guint64")))))))
|
||||
#return "\"%s\"" % (gdb.parse_and_eval ("mono_type_full_name (&((MonoClass*)%s)->byval_arg)" % (str (int ((self.val).cast (gdb.lookup_type ("guint64")))))))
|
||||
|
||||
def to_string(self):
|
||||
try:
|
||||
return self.to_string_inner (True)
|
||||
except:
|
||||
#print (sys.exc_info ()[0])
|
||||
#print (sys.exc_info ()[1])
|
||||
#print sys.exc_info ()[0]
|
||||
#print sys.exc_info ()[1]
|
||||
return str(self.val.cast (gdb.lookup_type ("gpointer")))
|
||||
|
||||
class MonoGenericInstPrinter:
|
||||
@@ -198,7 +197,7 @@ class MonoGenericInstPrinter:
|
||||
inst_args = inst ["type_argv"]
|
||||
inst_str = ""
|
||||
for i in range(0, inst_len):
|
||||
print (inst_args)
|
||||
print inst_args
|
||||
type_printer = MonoTypePrinter (inst_args [i])
|
||||
if i > 0:
|
||||
inst_str = inst_str + ", "
|
||||
@@ -222,14 +221,14 @@ class MonoGenericClassPrinter:
|
||||
method_inst_str = ""
|
||||
if int(method_inst.cast (gdb.lookup_type ("guint64"))) != 0:
|
||||
method_inst_str = str(method_inst)
|
||||
return "%s, [%s], [%s]>".format (container_str, class_inst_str, method_inst_str)
|
||||
return "%s, [%s], [%s]>" % (container_str, class_inst_str, method_inst_str)
|
||||
|
||||
def to_string(self):
|
||||
try:
|
||||
return self.to_string_inner ()
|
||||
except:
|
||||
#print (sys.exc_info ()[0])
|
||||
#print (sys.exc_info ()[1])
|
||||
#print sys.exc_info ()[0]
|
||||
#print sys.exc_info ()[1]
|
||||
return str(self.val.cast (gdb.lookup_type ("gpointer")))
|
||||
|
||||
class MonoTypePrinter:
|
||||
@@ -252,12 +251,12 @@ class MonoTypePrinter:
|
||||
info = str(t ["data"]["generic_class"])
|
||||
|
||||
if info != "":
|
||||
return "{%s, %s}".format (kind, info)
|
||||
return "{%s, %s}" % (kind, info)
|
||||
else:
|
||||
return "{%s}".format (kind)
|
||||
return "{%s}" % (kind)
|
||||
except:
|
||||
#print (sys.exc_info ()[0])
|
||||
#print (sys.exc_info ()[1])
|
||||
#print sys.exc_info ()[0]
|
||||
#print sys.exc_info ()[1]
|
||||
return str(self.val.cast (gdb.lookup_type ("gpointer")))
|
||||
|
||||
def to_string(self):
|
||||
@@ -278,12 +277,12 @@ class MonoMethodRgctxPrinter:
|
||||
inst_args = inst ["type_argv"]
|
||||
inst_str = ""
|
||||
for i in range(0, inst_len):
|
||||
print (inst_args)
|
||||
print inst_args
|
||||
type_printer = MonoTypePrinter (inst_args [i])
|
||||
if i > 0:
|
||||
inst_str = inst_str + ", "
|
||||
inst_str = inst_str + type_printer.to_string ()
|
||||
return "MRGCTX[%s, [%s]]".format (klass_printer.to_string(), inst_str)
|
||||
return "MRGCTX[%s, [%s]]" % (klass_printer.to_string(), inst_str)
|
||||
|
||||
class MonoVTablePrinter:
|
||||
"Print a MonoVTable structure"
|
||||
@@ -298,7 +297,7 @@ class MonoVTablePrinter:
|
||||
klass = vtable ["klass"]
|
||||
klass_printer = MonoClassPrinter (klass)
|
||||
|
||||
return "vtable(%s)".format (klass_printer.to_string ())
|
||||
return "vtable(%s)" % (klass_printer.to_string ())
|
||||
|
||||
def lookup_pretty_printer(val):
|
||||
t = str (val.type)
|
||||
@@ -349,6 +348,6 @@ XdbCommand ()
|
||||
|
||||
gdb.execute ("set environment MONO_XDEBUG gdb")
|
||||
|
||||
print ("Mono support loaded.")
|
||||
print "Mono support loaded."
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
import sys
|
||||
|
||||
gdb.execute ("file %s".format (sys.argv [0]))
|
||||
gdb.execute ("r --break *:* %s".format (" ".join (sys.argv [1:len (sys.argv)])))
|
||||
gdb.execute ("file %s" % sys.argv [0])
|
||||
gdb.execute ("r --break *:* %s" % " ".join (sys.argv[1:len(sys.argv)]))
|
||||
|
||||
while True:
|
||||
try:
|
||||
|
||||
@@ -102,35 +102,15 @@ Global locks:
|
||||
Adding global locks is not to be taken lightly.
|
||||
|
||||
The current lock hierarchy:
|
||||
loader lock (global)
|
||||
domain lock (complex)
|
||||
domain jit lock (complex)
|
||||
marshal lock
|
||||
loader lock
|
||||
domain lock
|
||||
domain jit lock
|
||||
simple locks
|
||||
|
||||
Examples:
|
||||
You can take the loader lock without holding a domain lock.
|
||||
You can take the domain load while holding the loader lock
|
||||
You cannot take the loader lock if only the domain lock is held.
|
||||
You cannot take a domain lock if the loader lock is held.
|
||||
You cannot take a domain lock while holding the lock to another domain.
|
||||
|
||||
|
||||
TODO:
|
||||
|
||||
We have a few known ok violation. We need a way to whitelist them.
|
||||
|
||||
Known ok issues:
|
||||
|
||||
ERROR: tried to acquire lock DomainLock at mono_domain_code_reserve_align while holding DomainLock at mono_class_create_runtime_vtable: Hierarchy violation.
|
||||
This is triggered when building the vtable of a non-root domain and fetching a vtable trampoline for an offset that has not been built. We'll take the root
|
||||
domain lock while holding the other one.
|
||||
This is ok since we never allow locking to have in the other direction, IOW, the root-domain lock is one level down from the other domain-locks.
|
||||
|
||||
WARNING: tried to acquire lock ImageDataLock at mono_image_init_name_cache while holding ImageDataLock at mono_class_from_name
|
||||
WARNING: tried to acquire lock ImageDataLock at mono_image_init_name_cache while holding ImageDataLock at mono_image_add_to_name_cache
|
||||
Both of those happen when filling up the name_cache, as it needs to alloc image memory.
|
||||
This one is fixable by spliting mono_image_init_name_cache into a locked and an unlocked variants and calling them appropriatedly.
|
||||
|
||||
*/
|
||||
|
||||
public enum Lock {
|
||||
@@ -140,9 +120,6 @@ public enum Lock {
|
||||
DomainLock,
|
||||
DomainAssembliesLock,
|
||||
DomainJitCodeHashLock,
|
||||
IcallLock,
|
||||
AssemblyBindingLock,
|
||||
MarshalLock,
|
||||
}
|
||||
|
||||
public class SimLock
|
||||
@@ -162,7 +139,6 @@ public class SimLock
|
||||
case Lock.DomainLock:
|
||||
return 1;
|
||||
case Lock.DomainJitCodeHashLock:
|
||||
case Lock.MarshalLock:
|
||||
return 2;
|
||||
default:
|
||||
return 3;
|
||||
@@ -181,10 +157,6 @@ public class SimLock
|
||||
get { return kind == Lock.LoaderLock; }
|
||||
}
|
||||
|
||||
public bool IsResursiveLock {
|
||||
get { return kind == Lock.LoaderLock || kind == Lock.DomainLock; }
|
||||
}
|
||||
|
||||
/*locked is already owned by the thread, 'this' is the new one*/
|
||||
bool Compare (SimThread thread, SimLock locked, out bool isWarning, out string msg)
|
||||
{
|
||||
@@ -304,11 +276,6 @@ public class Trace {
|
||||
"mono_loader_unlock",
|
||||
"mono_image_lock",
|
||||
"mono_image_unlock",
|
||||
"mono_icall_lock",
|
||||
"mono_icall_unlock",
|
||||
"add_record",
|
||||
"mono_locks_lock_acquired",
|
||||
"mono_locks_lock_released",
|
||||
};
|
||||
|
||||
public Trace (string[] fields) {
|
||||
@@ -359,10 +326,6 @@ public class Symbol : IComparable<Symbol>
|
||||
public int CompareTo(Symbol other) {
|
||||
return offset - other.offset;
|
||||
}
|
||||
|
||||
public void AdjustSize (Symbol next) {
|
||||
size = next.offset - this.offset;
|
||||
}
|
||||
}
|
||||
|
||||
public interface SymbolTable {
|
||||
@@ -389,26 +352,21 @@ public class OsxSymbolTable : SymbolTable
|
||||
string line;
|
||||
while ((line = proc.StandardOutput.ReadLine ()) != null) {
|
||||
string[] fields = line.Split(new char[] {' ', '\t'}, StringSplitOptions.RemoveEmptyEntries);
|
||||
if (fields.Length < 7)
|
||||
if (fields.Length < 4)
|
||||
continue;
|
||||
|
||||
if (!fields [3].Equals ("FUN"))
|
||||
if (!(fields [1].Equals ("g") || fields [1].Equals ("d")))
|
||||
continue;
|
||||
if (!fields [2].Equals ("*UND*"))
|
||||
continue;
|
||||
|
||||
int offset = fields [0].ParseHex ();
|
||||
string name = fields [6];
|
||||
if (name.StartsWith ("_"))
|
||||
name = name.Substring (1);
|
||||
|
||||
string name = fields [3];
|
||||
if (offset != 0)
|
||||
list.Add (new Symbol (offset, 0, name));
|
||||
}
|
||||
table = new Symbol [list.Count];
|
||||
list.CopyTo (table, 0);
|
||||
Array.Sort (table);
|
||||
for (int i = 1; i < table.Length; ++i) {
|
||||
table [i - 1].AdjustSize (table [i]);
|
||||
}
|
||||
}
|
||||
|
||||
public string Translate (int offset) {
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
Name: Mono.Web
|
||||
Description: Mono ASP.NET extension classes
|
||||
Version: 2.0.0.0
|
||||
Libs: -r:@prefix@/lib/mono/gac/Mono.Web/2.0.0.0__0738eb9f132ed756/Mono.Web.dll
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,6 +1,6 @@
|
||||
monodir = $(sysconfdir)/mono/2.0/Browsers
|
||||
|
||||
EXTRA_DIST = ../../Browsers/Compat.browser
|
||||
EXTRA_DIST = Compat.browser
|
||||
|
||||
mono_DATA = ../../Browsers/Compat.browser
|
||||
mono_DATA = Compat.browser
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<settingsMap>
|
||||
<map sectionType="System.Web.Configuration.MembershipSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
|
||||
mapperType="Mono.Web.Util.MembershipSectionMapper, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
|
||||
mapperType="Mono.Web.Util.MembershipSectionMapper, Mono.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756"
|
||||
platform="Unix">
|
||||
|
||||
<!-- The 'what' tag specifies which region of the section to modify. The 'value' attribute value is mapper-specific and is not defined here. It can be
|
||||
@@ -24,7 +24,7 @@
|
||||
</map>
|
||||
|
||||
<map sectionType="System.Web.Configuration.RoleManagerSection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
|
||||
mapperType="Mono.Web.Util.RoleManagerSectionMapper, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
|
||||
mapperType="Mono.Web.Util.RoleManagerSectionMapper, Mono.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756"
|
||||
platform="Unix">
|
||||
|
||||
<!-- The 'what' tag specifies which region of the section to modify. The 'value' attribute value is mapper-specific and is not defined here. It can be
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
/Makefile
|
||||
/Makefile.in
|
||||
@@ -1,6 +0,0 @@
|
||||
monodir = $(sysconfdir)/mono/4.0/Browsers
|
||||
|
||||
EXTRA_DIST = ../../Browsers/Compat.browser
|
||||
|
||||
mono_DATA = ../../Browsers/Compat.browser
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
SUBDIRS = Browsers
|
||||
SUBDIRS =
|
||||
|
||||
monodir = $(sysconfdir)/mono/4.0
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<settingsMap>
|
||||
<map sectionType="System.Web.Configuration.MembershipSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
|
||||
mapperType="Mono.Web.Util.MembershipSectionMapper, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
|
||||
mapperType="Mono.Web.Util.MembershipSectionMapper, Mono.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756"
|
||||
platform="Unix">
|
||||
|
||||
<!-- The 'what' tag specifies which region of the section to modify. The 'value' attribute value is mapper-specific and is not defined here. It can be
|
||||
@@ -24,7 +24,7 @@
|
||||
</map>
|
||||
|
||||
<map sectionType="System.Web.Configuration.RoleManagerSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
|
||||
mapperType="Mono.Web.Util.RoleManagerSectionMapper, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
|
||||
mapperType="Mono.Web.Util.RoleManagerSectionMapper, Mono.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756"
|
||||
platform="Unix">
|
||||
|
||||
<!-- The 'what' tag specifies which region of the section to modify. The 'value' attribute value is mapper-specific and is not defined here. It can be
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
/Makefile
|
||||
/Makefile.in
|
||||
@@ -1,6 +0,0 @@
|
||||
monodir = $(sysconfdir)/mono/4.5/Browsers
|
||||
|
||||
EXTRA_DIST = ../../Browsers/Compat.browser
|
||||
|
||||
mono_DATA = ../../Browsers/Compat.browser
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
SUBDIRS = Browsers
|
||||
SUBDIRS =
|
||||
|
||||
monodir = $(sysconfdir)/mono/4.5
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<settingsMap>
|
||||
<map sectionType="System.Web.Configuration.MembershipSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
|
||||
mapperType="Mono.Web.Util.MembershipSectionMapper, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
|
||||
mapperType="Mono.Web.Util.MembershipSectionMapper, Mono.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756"
|
||||
platform="Unix">
|
||||
|
||||
<!-- The 'what' tag specifies which region of the section to modify. The 'value' attribute value is mapper-specific and is not defined here. It can be
|
||||
@@ -24,7 +24,7 @@
|
||||
</map>
|
||||
|
||||
<map sectionType="System.Web.Configuration.RoleManagerSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
|
||||
mapperType="Mono.Web.Util.RoleManagerSectionMapper, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
|
||||
mapperType="Mono.Web.Util.RoleManagerSectionMapper, Mono.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756"
|
||||
platform="Unix">
|
||||
|
||||
<!-- The 'what' tag specifies which region of the section to modify. The 'value' attribute value is mapper-specific and is not defined here. It can be
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
bindir=${pcfiledir}/../mono/xbuild/12.0/bin
|
||||
|
||||
Name: XBuild 12.0
|
||||
Description: XBuild/MSBuild 12.0
|
||||
Version: 12.0
|
||||
Libs: -r:${bindir}/Microsoft.Build.Engine.dll -r:${bindir}/Microsoft.Build.Framework.dll -r:${bindir}/Microsoft.Build.Tasks.v12.0.dll -r:${bindir}/Microsoft.Build.Utilities.v12.0.dll -r:${bindir}/Microsoft.Build.dll
|
||||
|
||||
+26
-25
@@ -73,40 +73,41 @@ dist-hook:
|
||||
cp HtmlAgilityPack/* $(distdir)/HtmlAgilityPack
|
||||
|
||||
clean-local:
|
||||
-rm -Rf html
|
||||
-rm -f deploy/* convert.exe* AgilityPack.dll*
|
||||
-rm -f $(ASSEMBLED_DOCS)
|
||||
|
||||
TOOL_MAKE=$(MAKE) -f $(srcdir)/docs.make topdir=$(srcdir)/../mcs srcdir=$(srcdir)
|
||||
-rm -Rf $(srcdir)/html
|
||||
-rm -f $(srcdir)/deploy/* $(srcdir)/convert.exe* $(srcdir)/AgilityPack.dll*
|
||||
-cd $(srcdir) && rm -f $(ASSEMBLED_DOCS)
|
||||
|
||||
monoapi.zip: monoapi.tree
|
||||
|
||||
monoapi.tree: $(srcdir)/docs.make $(srcdir)/Makefile.am $(srcdir)/toc.xml $(srcdir)/deploy/.stamp
|
||||
-mkdir -p deploy
|
||||
cp -f $(srcdir)/api-style.css deploy
|
||||
$(TOOL_MAKE) $@
|
||||
@test -f $@ || { rm -f $(srcdir)/monoapi.tree && $(MAKE) monoapi.tree; }
|
||||
monoapi.tree: docs.make Makefile.am toc.xml $(srcdir)/deploy/.stamp perms
|
||||
cd $(srcdir) && cp -f api-style.css deploy
|
||||
cd $(srcdir) && $(MAKE) -f docs.make topdir=$(mcs_topdir_from_srcdir) $@
|
||||
|
||||
mono-tools.zip: mono-tools.tree
|
||||
@test -f $@ || { rm -f $(srcdir)/mono-tools.tree && $(MAKE) mono-tools.tree; }
|
||||
mono-tools.tree: docs.make Makefile.am $(srcdir)/deploy/.stamp perms
|
||||
cd $(srcdir) && $(MAKE) -f docs.make topdir=$(mcs_topdir_from_srcdir) $@
|
||||
|
||||
mono-tools.tree: $(srcdir)/docs.make Makefile.am deploy/.stamp
|
||||
$(TOOL_MAKE) $@
|
||||
mono-file-formats.zip: mono-file-formats.tree perms
|
||||
@test -f $@ || { rm -f $(srcdir)/mono-file-formats.tree && $(MAKE) mono-file-formats.tree; }
|
||||
mono-file-formats.tree: docs.make Makefile.am $(srcdir)/deploy/.stamp
|
||||
cd $(srcdir) && $(MAKE) -f docs.make topdir=$(mcs_topdir_from_srcdir) $@
|
||||
|
||||
mono-file-formats.zip: mono-file-formats.tree
|
||||
|
||||
mono-file-formats.tree: $(srcdir)/docs.make $(srcdir)/Makefile.am $(srcdir)/deploy/.stamp
|
||||
$(TOOL_MAKE) $@
|
||||
|
||||
deploy/.stamp: convert.exe Makefile.am
|
||||
$(mkdir_p) html
|
||||
$(srcdir)/deploy/.stamp: convert.exe Makefile.am perms
|
||||
$(mkdir_p) $(srcdir)/html
|
||||
runtimedir=`cd ../runtime && pwd`; export runtimedir; \
|
||||
MONO_PATH=../mcs/class/lib/net_2_0 perl $(srcdir)/exdoc -h $(srcdir) -t . $(srcdir)/../mono/*/*.c
|
||||
cd $(srcdir) && MONO_PATH=$(mcs_topdir_from_srcdir)/class/lib/net_2_0 perl ./exdoc -h . ../mono/*/*.c
|
||||
touch $@
|
||||
|
||||
extract: deploy/.stamp
|
||||
extract: $(srcdir)/deploy/.stamp
|
||||
|
||||
convert.exe: convert.cs AgilityPack.dll
|
||||
$(TOOL_MAKE) PROFILE=net_2_0 convert.exe
|
||||
convert.exe: convert.cs AgilityPack.dll perms
|
||||
cd $(srcdir) && $(MAKE) PROFILE=net_2_0 -f docs.make topdir=$(mcs_topdir_from_srcdir) convert.exe
|
||||
|
||||
AgilityPack.dll:
|
||||
$(TOOL_MAKE) PROFILE=net_2_0 AgilityPack.dll
|
||||
AgilityPack.dll: perms
|
||||
cd $(srcdir) && $(MAKE) PROFILE=net_2_0 -f docs.make topdir=$(mcs_topdir_from_srcdir) AgilityPack.dll
|
||||
|
||||
.PHONY: perms
|
||||
perms:
|
||||
-@test -w $(srcdir) || chmod a+w $(srcdir)
|
||||
|
||||
@@ -307,7 +307,6 @@ mono_gc_out_of_memory
|
||||
mono_gc_wbarrier_arrayref_copy
|
||||
mono_gc_wbarrier_generic_nostore
|
||||
mono_gc_wbarrier_generic_store
|
||||
mono_gc_wbarrier_generic_store_atomic
|
||||
mono_gc_wbarrier_object_copy
|
||||
mono_gc_wbarrier_set_arrayref
|
||||
mono_gc_wbarrier_set_field
|
||||
|
||||
+5
-13
@@ -1,8 +1,3 @@
|
||||
#
|
||||
# This makefile is here because it uses the configuration from the
|
||||
# in-place built mono to run and compile a few C# tools
|
||||
#
|
||||
|
||||
thisdir = docs
|
||||
SUBDIRS =
|
||||
include $(topdir)/build/rules.make
|
||||
@@ -12,28 +7,25 @@ ASSEMBLED_DOCS = \
|
||||
mono-tools.tree mono-tools.zip \
|
||||
monoapi.tree monoapi.zip
|
||||
|
||||
convert.exe: $(srcdir)/convert.cs AgilityPack.dll
|
||||
convert.exe: convert.cs AgilityPack.dll
|
||||
$(CSCOMPILE) -out:$@ $< -r:AgilityPack.dll
|
||||
|
||||
AgilityPack.dll:
|
||||
$(CSCOMPILE) -target:library -out:$@ $(srcdir)/HtmlAgilityPack/*.cs
|
||||
$(CSCOMPILE) -target:library -out:$@ HtmlAgilityPack/*.cs
|
||||
|
||||
monoapi.zip: monoapi.tree
|
||||
@test -f $@ || { rm -f $< && $(MAKE) $<; }
|
||||
|
||||
monoapi.tree: $(srcdir)/toc.xml $(srcdir)/docs.make
|
||||
monoapi.tree: toc.xml docs.make
|
||||
$(MDOC) assemble -o monoapi -f hb $<
|
||||
|
||||
mono-tools.zip: mono-tools.tree
|
||||
@test -f $@ || { rm -f $< && $(MAKE) $<; }
|
||||
|
||||
mono-tools.tree: $(srcdir)/mono-tools.config $(srcdir)/docs.make
|
||||
mono-tools.tree: mono-tools.config docs.make
|
||||
$(MDOC) assemble -o mono-tools -f man $<
|
||||
|
||||
mono-file-formats.zip: mono-file-formats.tree
|
||||
@test -f $@ || { rm -f $< && $(MAKE) $<; }
|
||||
|
||||
mono-file-formats.tree: $(srcdir)/mono-file-formats.config $(srcdir)/docs.make
|
||||
mono-file-formats.tree: mono-file-formats.config docs.make
|
||||
$(MDOC) assemble -o mono-file-formats -f man $<
|
||||
|
||||
.doc-stamp:
|
||||
|
||||
+3
-9
@@ -1,23 +1,17 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
if ($ARGV[0] eq "-h"){
|
||||
$sourcedir = $ARGV[1];
|
||||
$dir = $sourcedir;
|
||||
$dir = $ARGV[1];
|
||||
$html = 1;
|
||||
shift @ARGV;
|
||||
shift @ARGV;
|
||||
}
|
||||
|
||||
if ($ARGV[0] eq "-t"){
|
||||
$dir = $ARGV[1];
|
||||
shift @ARGV;
|
||||
}
|
||||
|
||||
if ($html){
|
||||
opendir (D, "$sourcedir/sources/") || die "Can not open $dir";
|
||||
opendir (D, "$dir/sources/") || die "Can not open $dir";
|
||||
while ($n = readdir (D)){
|
||||
if ($n =~ /mono-api-.*\.html$/){
|
||||
open (IN, "$sourcedir/sources/$n") || die "Can not open $n";
|
||||
open (IN, "$dir/sources/$n") || die "Can not open $n";
|
||||
$files[$filecount] = $n;
|
||||
while (<IN>){
|
||||
@files_content[$filecount] .= $_;
|
||||
|
||||
@@ -307,7 +307,6 @@ mono_gc_out_of_memory
|
||||
mono_gc_wbarrier_arrayref_copy
|
||||
mono_gc_wbarrier_generic_nostore
|
||||
mono_gc_wbarrier_generic_store
|
||||
mono_gc_wbarrier_generic_store_atomic
|
||||
mono_gc_wbarrier_object_copy
|
||||
mono_gc_wbarrier_set_arrayref
|
||||
mono_gc_wbarrier_set_field
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<h4><a name="api:mono_custom_attrs_from_property">mono_custom_attrs_from_property</a></h4>
|
||||
<h4><a name="api:mono_custom_attrs_has_attr">mono_custom_attrs_has_attr</a></h4>
|
||||
|
||||
<h2></h2>
|
||||
<h2>
|
||||
<h4><a name="api:mono_module_file_get_object">mono_module_file_get_object</a></h4>
|
||||
<h4><a name="api:mono_module_get_object">mono_module_get_object</a></h4>
|
||||
<h4><a name="api:mono_method_body_get_object">mono_method_body_get_object</a></h4>
|
||||
|
||||
@@ -19,12 +19,12 @@
|
||||
<h4><a name="api:CreateMutex">CreateMutex</a></h4>
|
||||
<h4><a name="api:CreatePipe">CreatePipe</a></h4>
|
||||
<h4><a name="api:CreateProcess">CreateProcess</a></h4>
|
||||
<h4><a name="api:CreateProcessWithLogonW">CreateProcessWithLogonW</a></h4>
|
||||
<h4><a name="api:CreateProcessWithLogonW">CreateProcessWithLogonW</a>
|
||||
<h4><a name="api:CreateSemaphore">CreateSemaphore</a></h4>
|
||||
<h4><a name="api:CreateThread">CreateThread</a></h4>
|
||||
<h4><a name="api:DeleteCriticalSection">DeleteCriticalSection</a></h4>
|
||||
<h4><a name="api:DeleteFile">DeleteFile</a></h4>
|
||||
<h4><a name="api:DuplicateHandle">DuplicateHandle</a></h4>
|
||||
<h4><a name="api:DuplicateHandle">DuplicateHandle</a>
|
||||
<h4><a name="api:EnterCriticalSection">EnterCriticalSection</a></h4>
|
||||
<h4><a name="api:EnumProcesses">EnumProcesses</a></h4>
|
||||
<h4><a name="api:EnumProcessModules">EnumProcessModules</a></h4>
|
||||
@@ -35,14 +35,14 @@
|
||||
<h4><a name="api:FindFirstFile">FindFirstFile</a></h4>
|
||||
<h4><a name="api:FindNextFile">FindNextFile</a></h4>
|
||||
<h4><a name="api:FlushFileBuffers">FlushFileBuffers</a></h4>
|
||||
<h4><a name="api:FormatMessage">FormatMessage</a></h4>
|
||||
<h4><a name="api:FormatMessage">FormatMessage</a>
|
||||
<h4><a name="api:GetCurrentDirectory">GetCurrentDirectory</a></h4>
|
||||
<h4><a name="api:GetCurrentProcess">GetCurrentProcess</a></h4>
|
||||
<h4><a name="api:GetCurrentProcessId">GetCurrentProcessId</a></h4>
|
||||
<h4><a name="api:GetCurrentThread">GetCurrentThread</a></h4>
|
||||
<h4><a name="api:GetCurrentThreadId">GetCurrentThreadId</a></h4>
|
||||
<h4><a name="api:GetDiskFreeSpaceEx">GetDiskFreeSpaceEx</a></h4>
|
||||
<h4><a name="api:GetDriveType">GetDriveType</a></h4>
|
||||
<h4><a name="api:GetDiskFreeSpaceEx">GetDiskFreeSpaceEx</a>
|
||||
<h4><a name="api:GetDriveType">GetDriveType</a>
|
||||
<h4><a name="api:GetExitCodeProcess">GetExitCodeProcess</a></h4>
|
||||
<h4><a name="api:GetExitCodeThread">GetExitCodeThread</a></h4>
|
||||
<h4><a name="api:GetFileAttributesEx">GetFileAttributesEx</a></h4>
|
||||
@@ -50,14 +50,14 @@
|
||||
<h4><a name="api:GetFileSize">GetFileSize</a></h4>
|
||||
<h4><a name="api:GetFileTime">GetFileTime</a></h4>
|
||||
<h4><a name="api:GetFileType">GetFileType</a></h4>
|
||||
<h4><a name="api:GetFileVersionInfo">GetFileVersionInfo</a></h4>
|
||||
<h4><a name="api:GetFileVersionInfoSize">GetFileVersionInfoSize</a></h4>
|
||||
<h4><a name="api:GetFileVersionInfo">GetFileVersionInfo</a>
|
||||
<h4><a name="api:GetFileVersionInfoSize">GetFileVersionInfoSize</a>
|
||||
<h4><a name="api:GetLastError">GetLastError</a></h4>
|
||||
<h4><a name="api:GetLogicalDriveStrings">GetLogicalDriveStrings</a></h4>
|
||||
<h4><a name="api:GetModuleBaseName">GetModuleBaseName</a></h4>
|
||||
<h4><a name="api:GetModuleFileNameEx">GetModuleFileNameEx</a></h4>
|
||||
<h4><a name="api:GetModuleInformation">GetModuleInformation</a></h4>
|
||||
<h4><a name="api:GetPriorityClass">GetPriorityClass</a></h4>
|
||||
<h4><a name="api:GetModuleFileNameEx">GetModuleFileNameEx</a>
|
||||
<h4><a name="api:GetModuleInformation">GetModuleInformation</a>
|
||||
<h4><a name="api:GetPriorityClass">GetPriorityClass</a>
|
||||
<h4><a name="api:GetProcessId">GetProcessId</a></h4>
|
||||
<h4><a name="api:GetProcessTimes">GetProcessTimes</a></h4>
|
||||
<h4><a name="api:GetProcessWorkingSetSize">GetProcessWorkingSetSize</a></h4>
|
||||
@@ -86,7 +86,7 @@
|
||||
<h4><a name="api:ReleaseMutex">ReleaseMutex</a></h4>
|
||||
<h4><a name="api:ReleaseSemaphore">ReleaseSemaphore</a></h4>
|
||||
<h4><a name="api:RemoveDirectory">RemoveDirectory</a></h4>
|
||||
<h4><a name="api:ReplaceFile">ReplaceFile</a></h4>
|
||||
<h4><a name="api:ReplaceFile">ReplaceFile</a>
|
||||
<h4><a name="api:ResetEvent">ResetEvent</a></h4>
|
||||
<h4><a name="api:ResumeThread">ResumeThread</a></h4>
|
||||
<h4><a name="api:RevertToSelf">RevertToSelf</a></h4>
|
||||
@@ -98,7 +98,7 @@
|
||||
<h4><a name="api:SetFilePointer">SetFilePointer</a></h4>
|
||||
<h4><a name="api:SetFileTime">SetFileTime</a></h4>
|
||||
<h4><a name="api:SetLastError">SetLastError</a></h4>
|
||||
<h4><a name="api:SetPriorityClass">SetPriorityClass</a></h4>
|
||||
<h4><a name="api:SetPriorityClass">SetPriorityClass</a>
|
||||
<h4><a name="api:SetProcessWorkingSetSize">SetProcessWorkingSetSize</a></h4>
|
||||
<h4><a name="api:ShellExecuteEx">ShellExecuteEx</a></h4>
|
||||
<h4><a name="api:SignalObjectAndWait">SignalObjectAndWait</a></h4>
|
||||
@@ -110,12 +110,12 @@
|
||||
<h4><a name="api:TlsFree">TlsFree</a></h4>
|
||||
<h4><a name="api:TlsGetValue">TlsGetValue</a></h4>
|
||||
<h4><a name="api:TlsSetValue">TlsSetValue</a></h4>
|
||||
<h4><a name="api:TransmitFile">TransmitFile</a></h4>
|
||||
<h4><a name="api:TransmitFile">TransmitFile</a>
|
||||
<h4><a name="api:TryEnterCriticalSection">TryEnterCriticalSection</a></h4>
|
||||
<h4><a name="api:UnlockFile">UnlockFile</a></h4>
|
||||
<h4><a name="api:VerLanguageName">VerLanguageName</a></h4>
|
||||
<h4><a name="api:VerQueryValue">VerQueryValue</a></h4>
|
||||
<h4><a name="api:WaitForInputIdle">WaitForInputIdle</a></h4>
|
||||
<h4><a name="api:VerLanguageName">VerLanguageName</a>
|
||||
<h4><a name="api:VerQueryValue">VerQueryValue</a>
|
||||
<h4><a name="api:WaitForInputIdle">WaitForInputIdle</a>
|
||||
<h4><a name="api:WaitForMultipleObjectsEx">WaitForMultipleObjectsEx</a></h4>
|
||||
<h4><a name="api:WaitForMultipleObjects">WaitForMultipleObjects</a></h4>
|
||||
<h4><a name="api:WaitForSingleObjectEx">WaitForSingleObjectEx</a></h4>
|
||||
@@ -136,9 +136,9 @@
|
||||
APIs.
|
||||
|
||||
<h4><a name="api:mono_once">mono_once</a></h4>
|
||||
<h4><a name="api:wapi_clear_interruption">wapi_clear_interruption</a></h4>
|
||||
<h4><a name="api:wapi_current_thread_desc">wapi_current_thread_desc</a></h4>
|
||||
<h4><a name="api:wapi_interrupt_thread">wapi_interrupt_thread</a></h4>
|
||||
<h4><a name="api:wapi_self_interrupt">wapi_self_interrupt</a></h4>
|
||||
<h4><a name="api:wapi_thread_clear_wait_handle">wapi_thread_clear_wait_handle</a></h4>
|
||||
<h4><a name="api:wapi_thread_set_wait_handle">wapi_thread_set_wait_handle</a></h4>
|
||||
<h4><a name="api:wapi_clear_interruption">wapi_clear_interruption</a>
|
||||
<h4><a name="api:wapi_current_thread_desc">wapi_current_thread_desc</a>
|
||||
<h4><a name="api:wapi_interrupt_thread">wapi_interrupt_thread</a>
|
||||
<h4><a name="api:wapi_self_interrupt">wapi_self_interrupt</a>
|
||||
<h4><a name="api:wapi_thread_clear_wait_handle">wapi_thread_clear_wait_handle</a>
|
||||
<h4><a name="api:wapi_thread_set_wait_handle">wapi_thread_set_wait_handle</a>
|
||||
@@ -1,7 +1,5 @@
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
AM_CFLAGS = $(WERROR_CFLAGS)
|
||||
|
||||
if HOST_WIN32
|
||||
SUBDIRS = m4 src
|
||||
else
|
||||
|
||||
+3
-3
@@ -22,11 +22,11 @@ if test x$GCC != xyes; then
|
||||
dolt_supported=no
|
||||
fi
|
||||
case $host in
|
||||
i?86-*-linux*|i?86-apple-darwin*|x86_64-*-linux*|powerpc-*-linux*|powerpc64-*-linux* \
|
||||
|amd64-*-freebsd*|i?86-*-freebsd*|ia64-*-freebsd*|arm*-*-linux*|sparc*-*-linux*|mips*-*-linux*|x86_64-apple-darwin*|aarch64*)
|
||||
i?86-*-linux*|x86_64-*-linux*|powerpc-*-linux*|powerpc64-*-linux* \
|
||||
|amd64-*-freebsd*|i?86-*-freebsd*|ia64-*-freebsd*|arm*-*-linux*|sparc*-*-linux*|mips*-*-linux*)
|
||||
pic_options='-fPIC'
|
||||
;;
|
||||
?86-pc-cygwin*|i?86-pc-cygwin*|i?86-pc-mingw32*)
|
||||
?86-pc-cygwin*|i?86-pc-cygwin*)
|
||||
pic_options='-DDLL_EXPORT'
|
||||
;;
|
||||
i?86-apple-darwin*|arm-apple-darwin*)
|
||||
|
||||
+13
-7
@@ -88,7 +88,7 @@ case $host in
|
||||
esac
|
||||
|
||||
case $target in
|
||||
arm*-darwin*|aarch64*-*)
|
||||
arm*-darwin*)
|
||||
CFLAGS="$CFLAGS -U_FORTIFY_SOURCE"
|
||||
;;
|
||||
i*86-*-darwin*)
|
||||
@@ -135,7 +135,6 @@ AC_CHECK_SIZEOF(void *)
|
||||
AC_CHECK_SIZEOF(long)
|
||||
AC_CHECK_SIZEOF(long long)
|
||||
AC_CHECK_FUNCS(strlcpy stpcpy strtok_r rewinddir vasprintf)
|
||||
AC_CHECK_FUNCS(getrlimit)
|
||||
|
||||
#
|
||||
# Mono currently supports 10.6, but strndup is not available prior to 10.7; avoiding
|
||||
@@ -180,7 +179,7 @@ if test "x$have_iso_varargs" = "xyes"; then
|
||||
fi
|
||||
AC_SUBST(G_HAVE_ISO_VARARGS)
|
||||
|
||||
AC_CHECK_HEADERS(getopt.h sys/select.h sys/time.h sys/wait.h pwd.h langinfo.h iconv.h localcharset.h sys/types.h sys/resource.h)
|
||||
AC_CHECK_HEADERS(getopt.h sys/time.h sys/wait.h pwd.h langinfo.h iconv.h localcharset.h sys/types.h)
|
||||
AC_CHECK_HEADER(alloca.h, [HAVE_ALLOCA_H=1], [HAVE_ALLOCA_H=0])
|
||||
AC_SUBST(HAVE_ALLOCA_H)
|
||||
|
||||
@@ -236,11 +235,18 @@ AC_ARG_WITH(crosspkgdir, [ --with-crosspkgdir=/path/to/pkg-config/dir Chan
|
||||
fi
|
||||
)
|
||||
|
||||
AC_ARG_ENABLE(werror, [ --enable-werror Pass -Werror to the C compiler], werror_flag=$enableval, werror_flag=no)
|
||||
if test x$werror_flag = xyes; then
|
||||
WERROR_CFLAGS="-Werror"
|
||||
dnl
|
||||
dnl No, you can not replace the call below with a pkg.m4 macro
|
||||
dnl
|
||||
have_glib=false
|
||||
if test "x$PKG_CONFIG" != "xno"; then
|
||||
if $PKG_CONFIG --atleast-version=$GLIB_REQUIRED_VERSION glib-2.0; then
|
||||
have_glib=true;
|
||||
else
|
||||
have_glib=false;
|
||||
fi
|
||||
fi
|
||||
AC_SUBST([WERROR_CFLAGS])
|
||||
AM_CONDITIONAL(HAVE_GLIB, $have_glib)
|
||||
|
||||
AC_SUBST(GPOINTER_TO_INT)
|
||||
AC_SUBST(GPOINTER_TO_UINT)
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
noinst_LTLIBRARIES = libeglib.la libeglib-static.la
|
||||
|
||||
AM_CFLAGS = $(WERROR_CFLAGS)
|
||||
|
||||
win_files = \
|
||||
eglib-config.hw \
|
||||
gdate-win32.c gdir-win32.c gfile-win32.c gmisc-win32.c \
|
||||
@@ -32,7 +30,6 @@ libeglib_la_SOURCES = \
|
||||
garray.c \
|
||||
gbytearray.c \
|
||||
gerror.c \
|
||||
vasprintf.h \
|
||||
ghashtable.c \
|
||||
giconv.c \
|
||||
gmem.c \
|
||||
|
||||
@@ -273,9 +273,3 @@
|
||||
#define g_utf8_get_char_validated monoeg_utf8_get_char_validated
|
||||
#define g_utf8_prev_char monoeg_utf8_prev_char
|
||||
#define g_utf8_to_ucs4 monoeg_utf8_to_ucs4
|
||||
|
||||
|
||||
#define g_log_default_handler monoeg_log_default_handler
|
||||
#define g_log_set_default_handler monoeg_log_set_default_handler
|
||||
#define g_set_print_handler monoeg_set_print_handler
|
||||
#define g_set_printerr_handler monoeg_set_printerr_handler
|
||||
@@ -30,8 +30,6 @@
|
||||
#include <string.h>
|
||||
#include <glib.h>
|
||||
|
||||
#include "vasprintf.h"
|
||||
|
||||
GError *
|
||||
g_error_new (gpointer domain, gint code, const char *format, ...)
|
||||
{
|
||||
|
||||
+23
-15
@@ -49,6 +49,12 @@
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
/* MSC and Cross-compilatin will use this */
|
||||
int vasprintf (char **strp, const char *fmt, va_list ap);
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Basic data types
|
||||
*/
|
||||
@@ -176,6 +182,7 @@ typedef struct _GMemChunk GMemChunk;
|
||||
/*
|
||||
* Misc.
|
||||
*/
|
||||
#define g_atexit(func) ((void) atexit (func))
|
||||
|
||||
const gchar * g_getenv(const gchar *variable);
|
||||
gboolean g_setenv(const gchar *variable, const gchar *value, gboolean overwrite);
|
||||
@@ -602,14 +609,10 @@ void g_assertion_message (const gchar *format, ...) G_GNUC_NORETURN
|
||||
#define g_message(...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_MESSAGE, __VA_ARGS__)
|
||||
#define g_debug(...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, __VA_ARGS__)
|
||||
#endif /* ndef HAVE_C99_SUPPORT */
|
||||
#define g_log_set_handler(a,b,c,d)
|
||||
|
||||
typedef void (*GLogFunc) (const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer user_data);
|
||||
typedef void (*GPrintFunc) (const gchar *string);
|
||||
#define G_GNUC_INTERNAL
|
||||
|
||||
void g_log_default_handler (const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer unused_data);
|
||||
GLogFunc g_log_set_default_handler (GLogFunc log_func, gpointer user_data);
|
||||
GPrintFunc g_set_print_handler (GPrintFunc func);
|
||||
GPrintFunc g_set_printerr_handler (GPrintFunc func);
|
||||
/*
|
||||
* Conversions
|
||||
*/
|
||||
@@ -724,16 +727,8 @@ GUnicodeBreakType g_unichar_break_type (gunichar c);
|
||||
#define G_UNLIKELY(x) (x)
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#define eg_unreachable() __assume(0)
|
||||
#elif defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4 && (__GNUC_MINOR__ >= 5)))
|
||||
#define eg_unreachable() __builtin_unreachable()
|
||||
#else
|
||||
#define eg_unreachable()
|
||||
#endif
|
||||
|
||||
#define g_assert(x) G_STMT_START { if (G_UNLIKELY (!(x))) g_assertion_message ("* Assertion at %s:%d, condition `%s' not met\n", __FILE__, __LINE__, #x); } G_STMT_END
|
||||
#define g_assert_not_reached() G_STMT_START { g_assertion_message ("* Assertion: should not be reached at %s:%d\n", __FILE__, __LINE__); eg_unreachable(); } G_STMT_END
|
||||
#define g_assert_not_reached() G_STMT_START { g_assertion_message ("* Assertion: should not be reached at %s:%d\n", __FILE__, __LINE__); } G_STMT_END
|
||||
|
||||
/*
|
||||
* Unicode conversion
|
||||
@@ -1013,6 +1008,19 @@ glong g_utf8_pointer_to_offset (const gchar *str, const gchar *pos);
|
||||
#define G_PRIORITY_DEFAULT 0
|
||||
#define G_PRIORITY_DEFAULT_IDLE 200
|
||||
|
||||
/*
|
||||
* Empty thread functions, not used by eglib
|
||||
*/
|
||||
#define g_thread_supported() TRUE
|
||||
#define g_thread_init(x) G_STMT_START { if (x != NULL) { g_error ("No vtable supported in g_thread_init"); } } G_STMT_END
|
||||
|
||||
#define G_LOCK_DEFINE(name) int name;
|
||||
#define G_LOCK_DEFINE_STATIC(name) static int name;
|
||||
#define G_LOCK_EXTERN(name)
|
||||
#define G_LOCK(name)
|
||||
#define G_TRYLOCK(name)
|
||||
#define G_UNLOCK(name)
|
||||
|
||||
#define GUINT16_SWAP_LE_BE_CONSTANT(x) ((((guint16) x) >> 8) | ((((guint16) x) << 8)))
|
||||
|
||||
#define GUINT16_SWAP_LE_BE(x) ((guint16) (((guint16) x) >> 8) | ((((guint16)(x)) & 0xff) << 8))
|
||||
|
||||
@@ -87,12 +87,10 @@ g_unsetenv(const gchar *variable)
|
||||
gchar*
|
||||
g_win32_getlocale(void)
|
||||
{
|
||||
LCID lcid = GetThreadLocale();
|
||||
gchar buf[19];
|
||||
gint ccBuf = GetLocaleInfo(lcid, LOCALE_SISO639LANGNAME, buf, 9);
|
||||
buf[ccBuf - 1] = '-';
|
||||
ccBuf += GetLocaleInfo(lcid, LOCALE_SISO3166CTRYNAME, buf + ccBuf, 9);
|
||||
return strdup(buf);
|
||||
/* FIXME: Use GetThreadLocale
|
||||
* and convert LCID to standard
|
||||
* string form, "en_US" */
|
||||
return strdup ("en_US");
|
||||
}
|
||||
|
||||
gboolean
|
||||
|
||||
+92
-167
@@ -31,51 +31,87 @@
|
||||
#include <stdlib.h>
|
||||
#include <glib.h>
|
||||
|
||||
#include "vasprintf.h"
|
||||
|
||||
/* The current fatal levels, error is always fatal */
|
||||
static GLogLevelFlags fatal = G_LOG_LEVEL_ERROR;
|
||||
static GLogFunc default_log_func;
|
||||
static gpointer default_log_func_user_data;
|
||||
static GPrintFunc stdout_handler, stderr_handler;
|
||||
|
||||
static void default_stdout_handler (const gchar *string);
|
||||
static void default_stderr_handler (const gchar *string);
|
||||
#if PLATFORM_ANDROID
|
||||
#include <android/log.h>
|
||||
|
||||
static android_LogPriority
|
||||
to_android_priority (GLogLevelFlags log_level)
|
||||
{
|
||||
switch (log_level & G_LOG_LEVEL_MASK)
|
||||
{
|
||||
case G_LOG_LEVEL_ERROR: return ANDROID_LOG_FATAL;
|
||||
case G_LOG_LEVEL_CRITICAL: return ANDROID_LOG_ERROR;
|
||||
case G_LOG_LEVEL_WARNING: return ANDROID_LOG_WARN;
|
||||
case G_LOG_LEVEL_MESSAGE: return ANDROID_LOG_INFO;
|
||||
case G_LOG_LEVEL_INFO: return ANDROID_LOG_DEBUG;
|
||||
case G_LOG_LEVEL_DEBUG: return ANDROID_LOG_VERBOSE;
|
||||
}
|
||||
return ANDROID_LOG_UNKNOWN;
|
||||
}
|
||||
|
||||
static void
|
||||
out_vfprintf (FILE *ignore, const gchar *format, va_list args)
|
||||
{
|
||||
/* TODO: provide a proper app name */
|
||||
__android_log_vprint (ANDROID_LOG_ERROR, "mono", format, args);
|
||||
}
|
||||
#elif MONOTOUCH && defined(__arm__)
|
||||
#include <asl.h>
|
||||
|
||||
static int
|
||||
to_asl_priority (GLogLevelFlags log_level)
|
||||
{
|
||||
switch (log_level & G_LOG_LEVEL_MASK)
|
||||
{
|
||||
case G_LOG_LEVEL_ERROR: return ASL_LEVEL_CRIT;
|
||||
case G_LOG_LEVEL_CRITICAL: return ASL_LEVEL_ERR;
|
||||
case G_LOG_LEVEL_WARNING: return ASL_LEVEL_WARNING;
|
||||
case G_LOG_LEVEL_MESSAGE: return ASL_LEVEL_NOTICE;
|
||||
case G_LOG_LEVEL_INFO: return ASL_LEVEL_INFO;
|
||||
case G_LOG_LEVEL_DEBUG: return ASL_LEVEL_DEBUG;
|
||||
}
|
||||
return ASL_LEVEL_ERR;
|
||||
}
|
||||
|
||||
static void
|
||||
out_vfprintf (FILE *ignore, const gchar *format, va_list args)
|
||||
{
|
||||
asl_vlog (NULL, NULL, ASL_LEVEL_WARNING, format, args);
|
||||
}
|
||||
|
||||
#else
|
||||
static void
|
||||
out_vfprintf (FILE *file, const gchar *format, va_list args)
|
||||
{
|
||||
vfprintf (file, format, args);
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
g_print (const gchar *format, ...)
|
||||
{
|
||||
char *msg;
|
||||
va_list args;
|
||||
|
||||
va_start (args, format);
|
||||
if (vasprintf (&msg, format, args) < 0)
|
||||
return;
|
||||
|
||||
out_vfprintf (stdout, format, args);
|
||||
|
||||
va_end (args);
|
||||
|
||||
if (!stdout_handler)
|
||||
stdout_handler = default_stdout_handler;
|
||||
|
||||
stdout_handler (msg);
|
||||
free (msg);
|
||||
}
|
||||
|
||||
void
|
||||
g_printerr (const gchar *format, ...)
|
||||
{
|
||||
char *msg;
|
||||
va_list args;
|
||||
|
||||
va_start (args, format);
|
||||
if (vasprintf (&msg, format, args) < 0)
|
||||
return;
|
||||
|
||||
out_vfprintf (stderr, format, args);
|
||||
|
||||
va_end (args);
|
||||
|
||||
if (!stderr_handler)
|
||||
stderr_handler = default_stderr_handler;
|
||||
|
||||
stderr_handler (msg);
|
||||
free (msg);
|
||||
}
|
||||
|
||||
GLogLevelFlags
|
||||
@@ -102,16 +138,42 @@ g_log_set_fatal_mask (const gchar *log_domain, GLogLevelFlags fatal_mask)
|
||||
void
|
||||
g_logv (const gchar *log_domain, GLogLevelFlags log_level, const gchar *format, va_list args)
|
||||
{
|
||||
#if PLATFORM_ANDROID
|
||||
__android_log_vprint (to_android_priority (log_level), log_domain, format, args);
|
||||
#elif MONOTOUCH && defined(__arm__)
|
||||
asl_vlog (NULL, NULL, to_asl_priority (log_level), format, args);
|
||||
#else
|
||||
char *msg;
|
||||
|
||||
if (!default_log_func)
|
||||
default_log_func = g_log_default_handler;
|
||||
|
||||
if (vasprintf (&msg, format, args) < 0)
|
||||
return;
|
||||
|
||||
default_log_func (log_domain, log_level, msg, default_log_func_user_data);
|
||||
#ifdef G_OS_WIN32
|
||||
printf ("%s%s%s\n",
|
||||
log_domain != NULL ? log_domain : "",
|
||||
log_domain != NULL ? ": " : "",
|
||||
msg);
|
||||
#else
|
||||
#if MONOTOUCH
|
||||
FILE *target = stderr;
|
||||
#else
|
||||
FILE *target = stdout;
|
||||
#endif
|
||||
|
||||
fprintf (target, "%s%s%s\n",
|
||||
log_domain != NULL ? log_domain : "",
|
||||
log_domain != NULL ? ": " : "",
|
||||
msg);
|
||||
#endif
|
||||
free (msg);
|
||||
if (log_level & fatal){
|
||||
fflush (stdout);
|
||||
fflush (stderr);
|
||||
}
|
||||
#endif
|
||||
if (log_level & fatal){
|
||||
abort ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
@@ -132,143 +194,6 @@ g_assertion_message (const gchar *format, ...)
|
||||
va_start (args, format);
|
||||
g_logv (G_LOG_DOMAIN, G_LOG_LEVEL_ERROR, format, args);
|
||||
va_end (args);
|
||||
}
|
||||
|
||||
|
||||
#if PLATFORM_ANDROID
|
||||
#include <android/log.h>
|
||||
|
||||
static android_LogPriority
|
||||
to_android_priority (GLogLevelFlags log_level)
|
||||
{
|
||||
switch (log_level & G_LOG_LEVEL_MASK)
|
||||
{
|
||||
case G_LOG_LEVEL_ERROR: return ANDROID_LOG_FATAL;
|
||||
case G_LOG_LEVEL_CRITICAL: return ANDROID_LOG_ERROR;
|
||||
case G_LOG_LEVEL_WARNING: return ANDROID_LOG_WARN;
|
||||
case G_LOG_LEVEL_MESSAGE: return ANDROID_LOG_INFO;
|
||||
case G_LOG_LEVEL_INFO: return ANDROID_LOG_DEBUG;
|
||||
case G_LOG_LEVEL_DEBUG: return ANDROID_LOG_VERBOSE;
|
||||
}
|
||||
return ANDROID_LOG_UNKNOWN;
|
||||
}
|
||||
|
||||
void
|
||||
g_log_default_handler (const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer unused_data)
|
||||
{
|
||||
__android_log_write (to_android_priority (log_level), log_domain, message);
|
||||
if (log_level & fatal)
|
||||
abort ();
|
||||
}
|
||||
|
||||
static void
|
||||
default_stdout_handler (const gchar *message)
|
||||
{
|
||||
/* TODO: provide a proper app name */
|
||||
__android_log_write (ANDROID_LOG_ERROR, "mono", message);
|
||||
}
|
||||
|
||||
static void
|
||||
default_stderr_handler (const gchar *message)
|
||||
{
|
||||
/* TODO: provide a proper app name */
|
||||
__android_log_write (ANDROID_LOG_ERROR, "mono", message);
|
||||
}
|
||||
|
||||
|
||||
#elif defined(HOST_IOS)
|
||||
#include <asl.h>
|
||||
|
||||
static int
|
||||
to_asl_priority (GLogLevelFlags log_level)
|
||||
{
|
||||
switch (log_level & G_LOG_LEVEL_MASK)
|
||||
{
|
||||
case G_LOG_LEVEL_ERROR: return ASL_LEVEL_CRIT;
|
||||
case G_LOG_LEVEL_CRITICAL: return ASL_LEVEL_ERR;
|
||||
case G_LOG_LEVEL_WARNING: return ASL_LEVEL_WARNING;
|
||||
case G_LOG_LEVEL_MESSAGE: return ASL_LEVEL_NOTICE;
|
||||
case G_LOG_LEVEL_INFO: return ASL_LEVEL_INFO;
|
||||
case G_LOG_LEVEL_DEBUG: return ASL_LEVEL_DEBUG;
|
||||
}
|
||||
return ASL_LEVEL_ERR;
|
||||
}
|
||||
|
||||
void
|
||||
g_log_default_handler (const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer unused_data)
|
||||
{
|
||||
asl_log (NULL, NULL, to_asl_priority (log_level), "%s", message);
|
||||
if (log_level & fatal)
|
||||
abort ();
|
||||
}
|
||||
|
||||
static void
|
||||
default_stdout_handler (const gchar *message)
|
||||
{
|
||||
asl_log (NULL, NULL, ASL_LEVEL_WARNING, "%s", message);
|
||||
}
|
||||
|
||||
static void
|
||||
default_stderr_handler (const gchar *message)
|
||||
{
|
||||
asl_log (NULL, NULL, ASL_LEVEL_WARNING, "%s", message);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
void
|
||||
g_log_default_handler (const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer unused_data)
|
||||
{
|
||||
FILE *target = stdout;
|
||||
|
||||
fprintf (target, "%s%s%s\n",
|
||||
log_domain != NULL ? log_domain : "",
|
||||
log_domain != NULL ? ": " : "",
|
||||
message);
|
||||
|
||||
if (log_level & fatal) {
|
||||
fflush (stdout);
|
||||
fflush (stderr);
|
||||
abort ();
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
default_stdout_handler (const gchar *string)
|
||||
{
|
||||
fprintf (stdout, "%s", string);
|
||||
}
|
||||
|
||||
static void
|
||||
default_stderr_handler (const gchar *string)
|
||||
{
|
||||
fprintf (stderr, "%s", string);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
GLogFunc
|
||||
g_log_set_default_handler (GLogFunc log_func, gpointer user_data)
|
||||
{
|
||||
GLogFunc old = default_log_func;
|
||||
default_log_func = log_func;
|
||||
default_log_func_user_data = user_data;
|
||||
return old;
|
||||
}
|
||||
|
||||
GPrintFunc
|
||||
g_set_print_handler (GPrintFunc func)
|
||||
{
|
||||
GPrintFunc old = stdout_handler;
|
||||
stdout_handler = func;
|
||||
return old;
|
||||
}
|
||||
|
||||
GPrintFunc
|
||||
g_set_printerr_handler (GPrintFunc func)
|
||||
{
|
||||
GPrintFunc old = stderr_handler;
|
||||
stderr_handler = func;
|
||||
return old;
|
||||
abort ();
|
||||
}
|
||||
|
||||
+2
-3
@@ -216,8 +216,8 @@ cont:
|
||||
gchar *
|
||||
g_find_program_in_path (const gchar *program)
|
||||
{
|
||||
char *p;
|
||||
char *x, *l;
|
||||
char *p = g_strdup (g_getenv ("PATH"));
|
||||
char *x = p, *l;
|
||||
gchar *curdir = NULL;
|
||||
char *save = NULL;
|
||||
#ifdef G_OS_WIN32
|
||||
@@ -228,7 +228,6 @@ g_find_program_in_path (const gchar *program)
|
||||
#endif
|
||||
|
||||
g_return_val_if_fail (program != NULL, NULL);
|
||||
x = p = g_strdup (g_getenv ("PATH"));
|
||||
|
||||
if (x == NULL || *x == '\0') {
|
||||
curdir = g_get_current_dir ();
|
||||
|
||||
@@ -126,7 +126,7 @@ g_ptr_array_remove_index(GPtrArray *array, guint index)
|
||||
gpointer removed_node;
|
||||
|
||||
g_return_val_if_fail(array != NULL, NULL);
|
||||
g_return_val_if_fail(index < array->len, NULL);
|
||||
g_return_val_if_fail(index >= 0 || index < array->len, NULL);
|
||||
|
||||
removed_node = array->pdata[index];
|
||||
|
||||
@@ -147,7 +147,7 @@ g_ptr_array_remove_index_fast(GPtrArray *array, guint index)
|
||||
gpointer removed_node;
|
||||
|
||||
g_return_val_if_fail(array != NULL, NULL);
|
||||
g_return_val_if_fail(index < array->len, NULL);
|
||||
g_return_val_if_fail(index >= 0 || index < array->len, NULL);
|
||||
|
||||
removed_node = array->pdata[index];
|
||||
|
||||
|
||||
+2
-27
@@ -41,10 +41,6 @@
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_SELECT_H
|
||||
#include <sys/select.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
@@ -53,10 +49,6 @@
|
||||
#include <sys/wait.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_RESOURCE_H
|
||||
# include <sys/resource.h>
|
||||
#endif
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
#include <io.h>
|
||||
#include <winsock2.h>
|
||||
@@ -217,23 +209,6 @@ write_all (int fd, const void *vbuf, size_t n)
|
||||
return nwritten;
|
||||
}
|
||||
|
||||
#ifndef G_OS_WIN32
|
||||
static int
|
||||
g_getdtablesize (void)
|
||||
{
|
||||
#ifdef HAVE_GETRLIMIT
|
||||
struct rlimit limit;
|
||||
int res;
|
||||
|
||||
res = getrlimit (RLIMIT_NOFILE, &limit);
|
||||
g_assert (res == 0);
|
||||
return limit.rlim_cur;
|
||||
#else
|
||||
return getdtablesize ();
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
gboolean
|
||||
g_spawn_command_line_sync (const gchar *command_line,
|
||||
gchar **standard_output,
|
||||
@@ -277,7 +252,7 @@ g_spawn_command_line_sync (const gchar *command_line,
|
||||
close (stderr_pipe [0]);
|
||||
dup2 (stderr_pipe [1], STDERR_FILENO);
|
||||
}
|
||||
for (i = g_getdtablesize () - 1; i >= 3; i--)
|
||||
for (i = getdtablesize () - 1; i >= 3; i--)
|
||||
close (i);
|
||||
|
||||
/* G_SPAWN_SEARCH_PATH is always enabled for g_spawn_command_line_sync */
|
||||
@@ -438,7 +413,7 @@ g_spawn_async_with_pipes (const gchar *working_directory,
|
||||
}
|
||||
|
||||
if ((flags & G_SPAWN_LEAVE_DESCRIPTORS_OPEN) != 0) {
|
||||
for (i = g_getdtablesize () - 1; i >= 3; i--)
|
||||
for (i = getdtablesize () - 1; i >= 3; i--)
|
||||
close (i);
|
||||
}
|
||||
|
||||
|
||||
@@ -32,8 +32,6 @@
|
||||
#include <ctype.h>
|
||||
#include <glib.h>
|
||||
|
||||
#include "vasprintf.h"
|
||||
|
||||
/* This is not a macro, because I dont want to put _GNU_SOURCE in the glib.h header */
|
||||
gchar *
|
||||
g_strndup (const gchar *str, gsize n)
|
||||
|
||||
@@ -88,24 +88,12 @@ merge_lists (list_node *first, list_node *second, GCompareFunc func)
|
||||
static inline list_node *
|
||||
sweep_up (struct sort_info *si, list_node *list, int upto)
|
||||
{
|
||||
#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 406)
|
||||
/*
|
||||
* GCC incorrectly thinks we're writing below si->ranks array bounds.
|
||||
*/
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Warray-bounds"
|
||||
#endif
|
||||
|
||||
int i;
|
||||
for (i = si->min_rank; i < upto; ++i) {
|
||||
list = merge_lists (si->ranks [i], list, si->func);
|
||||
si->ranks [i] = NULL;
|
||||
}
|
||||
return list;
|
||||
|
||||
#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 406)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -136,14 +124,6 @@ sweep_up (struct sort_info *si, list_node *list, int upto)
|
||||
static inline void
|
||||
insert_list (struct sort_info *si, list_node* list, int rank)
|
||||
{
|
||||
#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 406)
|
||||
/*
|
||||
* GCC incorrectly thinks we're writing below si->ranks array bounds.
|
||||
*/
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Warray-bounds"
|
||||
#endif
|
||||
|
||||
int i;
|
||||
|
||||
if (rank > si->n_ranks) {
|
||||
@@ -169,10 +149,6 @@ insert_list (struct sort_info *si, list_node* list, int rank)
|
||||
si->n_ranks = i + 1;
|
||||
si->min_rank = i;
|
||||
si->ranks [i] = list;
|
||||
|
||||
#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 406)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
}
|
||||
|
||||
#undef stringify2
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
#ifndef __VASPRINTF_H
|
||||
#define __VASPRINTF_H
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <config.h>
|
||||
|
||||
#ifndef HAVE_VASPRINTF
|
||||
int vasprintf(char **ret, const char *fmt, va_list ap);
|
||||
#endif
|
||||
|
||||
#endif /* __VASPRINTF_H */
|
||||
@@ -37,8 +37,26 @@ test_eglib_LDADD = ../src/libeglib.la $(LIBICONV)
|
||||
run-eglib: all
|
||||
srcdir=`readlink -f $(srcdir)` ./test-eglib
|
||||
|
||||
if HAVE_GLIB
|
||||
|
||||
noinst_PROGRAMS = test-glib test-eglib
|
||||
|
||||
test_glib_SOURCES = $(SOURCES)
|
||||
|
||||
test_glib_CFLAGS = `pkg-config --cflags glib-2.0` -DDRIVER_NAME=\"GLib\"
|
||||
test_glib_LDFLAGS = `pkg-config --libs glib-2.0 gmodule-2.0`
|
||||
|
||||
run-glib: all
|
||||
srcdir=`readlink -f $(srcdir)` ./test-glib
|
||||
|
||||
run-both: run-glib run-eglib
|
||||
|
||||
else
|
||||
|
||||
noinst_PROGRAMS = test-eglib
|
||||
|
||||
run-both: run-eglib
|
||||
|
||||
endif
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
+1
-1
@@ -115,7 +115,7 @@ test_file ()
|
||||
|
||||
#ifndef G_OS_WIN32 /* FIXME */
|
||||
gchar *sympath;
|
||||
gint ignored G_GNUC_UNUSED;
|
||||
gint ignored;
|
||||
#endif
|
||||
|
||||
res = g_file_test (NULL, 0);
|
||||
|
||||
+9
-9
@@ -60,22 +60,22 @@ test_ptrconv ()
|
||||
return FAILED ("int to pointer and back conversions fail %d != %d", iv, iv2);
|
||||
|
||||
uv = 0;
|
||||
ptr = GUINT_TO_POINTER (uv);
|
||||
ptr = GUINT_TO_POINTER (iv);
|
||||
uv2 = GPOINTER_TO_UINT (ptr);
|
||||
if (uv != uv2)
|
||||
return FAILED ("uint to pointer and back conversions fail %u != %d", uv, uv2);
|
||||
if (iv != iv2)
|
||||
return FAILED ("uint to pointer and back conversions fail %u != %d", iv, iv2);
|
||||
|
||||
uv = 1;
|
||||
ptr = GUINT_TO_POINTER (uv);
|
||||
ptr = GUINT_TO_POINTER (iv);
|
||||
uv2 = GPOINTER_TO_UINT (ptr);
|
||||
if (uv != uv2)
|
||||
return FAILED ("uint to pointer and back conversions fail %u != %d", uv, uv2);
|
||||
if (iv != iv2)
|
||||
return FAILED ("uint to pointer and back conversions fail %u != %d", iv, iv2);
|
||||
|
||||
uv = UINT32_MAX;
|
||||
ptr = GUINT_TO_POINTER (uv);
|
||||
ptr = GUINT_TO_POINTER (iv);
|
||||
uv2 = GPOINTER_TO_UINT (ptr);
|
||||
if (uv != uv2)
|
||||
return FAILED ("uint to pointer and back conversions fail %u != %d", uv, uv2);
|
||||
if (iv != iv2)
|
||||
return FAILED ("uint to pointer and back conversions fail %u != %d", iv, iv2);
|
||||
|
||||
return NULL;
|
||||
|
||||
|
||||
Vendored
+1
-1
Submodule external/cecil updated: 33d50b874f...54e0a50464.
Vendored
-1
Submodule external/ikdasm deleted from 7ded4decb9.
Vendored
+1
-1
Submodule external/ikvm updated: 22534de209...10b8312c80.
Vendored
+1
-1
Submodule external/rx updated: 00c1aadf14...17e8477b2c.
+1
-7
@@ -486,15 +486,11 @@ static void* JNIEnv_vtable[] =
|
||||
0 // jlong JNICALL GetDirectBufferCapacity(jobject buf);
|
||||
};
|
||||
|
||||
void** ikvm_GetJNIEnvVTable(void);
|
||||
|
||||
JNIEXPORT void** JNICALL ikvm_GetJNIEnvVTable(void)
|
||||
JNIEXPORT void** JNICALL ikvm_GetJNIEnvVTable()
|
||||
{
|
||||
return JNIEnv_vtable;
|
||||
}
|
||||
|
||||
void* JNICALL ikvm_MarshalDelegate(void* p);
|
||||
|
||||
JNIEXPORT void* JNICALL ikvm_MarshalDelegate(void* p)
|
||||
{
|
||||
return p;
|
||||
@@ -502,8 +498,6 @@ JNIEXPORT void* JNICALL ikvm_MarshalDelegate(void* p)
|
||||
|
||||
typedef jint (JNICALL *PJNI_ONLOAD)(JavaVM* vm, void* reserved);
|
||||
|
||||
jint JNICALL ikvm_CallOnLoad(PJNI_ONLOAD method, JavaVM* vm, void* reserved);
|
||||
|
||||
JNIEXPORT jint JNICALL ikvm_CallOnLoad(PJNI_ONLOAD method, JavaVM* vm, void* reserved)
|
||||
{
|
||||
return method(vm, reserved);
|
||||
|
||||
@@ -61,22 +61,16 @@
|
||||
#include <sys/mman.h>
|
||||
#include "jni.h"
|
||||
|
||||
void* JNICALL ikvm_LoadLibrary(char* psz);
|
||||
|
||||
JNIEXPORT void* JNICALL ikvm_LoadLibrary(char* psz)
|
||||
{
|
||||
return g_module_open(psz, 0);
|
||||
}
|
||||
|
||||
void JNICALL ikvm_FreeLibrary(GModule* handle);
|
||||
|
||||
JNIEXPORT void JNICALL ikvm_FreeLibrary(GModule* handle)
|
||||
{
|
||||
g_module_close(handle);
|
||||
}
|
||||
|
||||
void* JNICALL ikvm_GetProcAddress(GModule* handle, char* name, jint argc);
|
||||
|
||||
JNIEXPORT void* JNICALL ikvm_GetProcAddress(GModule* handle, char* name, jint argc)
|
||||
{
|
||||
void *symbol;
|
||||
@@ -89,22 +83,16 @@
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void* JNICALL ikvm_mmap(int fd, jboolean writeable, jboolean copy_on_write, jlong position, jint size);
|
||||
|
||||
JNIEXPORT void* JNICALL ikvm_mmap(int fd, jboolean writeable, jboolean copy_on_write, jlong position, jint size)
|
||||
{
|
||||
return mmap(0, size, writeable ? PROT_WRITE | PROT_READ : PROT_READ, copy_on_write ? MAP_PRIVATE : MAP_SHARED, fd, position);
|
||||
}
|
||||
|
||||
int JNICALL ikvm_munmap(void* address, jint size);
|
||||
|
||||
JNIEXPORT int JNICALL ikvm_munmap(void* address, jint size)
|
||||
{
|
||||
return munmap(address, size);
|
||||
}
|
||||
|
||||
int JNICALL ikvm_msync(void* address, jint size);
|
||||
|
||||
JNIEXPORT int JNICALL ikvm_msync(void* address, jint size)
|
||||
{
|
||||
#if defined(__native_client__) && defined(USE_NEWLIB)
|
||||
|
||||
+1
-1
@@ -68,7 +68,7 @@ libmonogc_static_la_LDFLAGS = -static
|
||||
|
||||
EXTRA_DIST += alpha_mach_dep.S mips_sgi_mach_dep.s sparc_mach_dep.S
|
||||
|
||||
AM_CFLAGS = $(WERROR_CFLAGS) @GC_CFLAGS@
|
||||
AM_CFLAGS = @GC_CFLAGS@
|
||||
|
||||
if CPLUSPLUS
|
||||
extra_checks = test_cpp
|
||||
|
||||
@@ -331,7 +331,7 @@ DOC_FILES= README.QUICK doc/README.Mac doc/README.MacOSX doc/README.OS2 \
|
||||
TESTS= tests/test.c tests/test_cpp.cc tests/trace_test.c \
|
||||
tests/leak_test.c tests/thread_leak_test.c tests/middle.c
|
||||
|
||||
GNU_BUILD_FILES= configure.ac Makefile.am configure acinclude.m4 \
|
||||
GNU_BUILD_FILES= configure.in Makefile.am configure acinclude.m4 \
|
||||
libtool.m4 install-sh configure.host Makefile.in \
|
||||
aclocal.m4 config.sub config.guess \
|
||||
include/Makefile.am include/Makefile.in \
|
||||
|
||||
+3
-3
@@ -5,8 +5,8 @@ This is a modified version of Boehm GC 6.1 for Mono.
|
||||
- Makefile changes:
|
||||
|
||||
libgc has a lot of configurable options which are AC_DEFINE()d in its
|
||||
configure.ac. To make it easier to build and bundle it with Mono, I
|
||||
replaced most of the orignal configure.ac and the makefiles with custom
|
||||
configure.in. To make it easier to build and bundle it with Mono, I
|
||||
replaced most of the orignal configure.in and the makefiles with custom
|
||||
versions which just define what we actually need for Mono.
|
||||
|
||||
This means that you can just run configure in this directory and it'll
|
||||
@@ -58,7 +58,7 @@ This is a modified version of Boehm GC 6.1 for Mono.
|
||||
|
||||
cvs diff -u -r LIBGC
|
||||
|
||||
When importing new upstream versions, don't import the new configure.ac or any of the
|
||||
When importing new upstream versions, don't import the new configure.in or any of the
|
||||
Makefile.am's; they've been replaced by custom versions. Just import all the new source
|
||||
files and it should be fine.
|
||||
|
||||
|
||||
+3
-3
@@ -22,11 +22,11 @@ if test x$GCC != xyes; then
|
||||
dolt_supported=no
|
||||
fi
|
||||
case $host in
|
||||
i?86-*-linux*|i?86-apple-darwin*|x86_64-*-linux*|powerpc-*-linux*|powerpc64-*-linux* \
|
||||
|amd64-*-freebsd*|i?86-*-freebsd*|ia64-*-freebsd*|arm*-*-linux*|sparc*-*-linux*|mips*-*-linux*|x86_64-apple-darwin*|aarch64*)
|
||||
i?86-*-linux*|x86_64-*-linux*|powerpc-*-linux*|powerpc64-*-linux* \
|
||||
|amd64-*-freebsd*|i?86-*-freebsd*|ia64-*-freebsd*|arm*-*-linux*|sparc*-*-linux*|mips*-*-linux*)
|
||||
pic_options='-fPIC'
|
||||
;;
|
||||
?86-pc-cygwin*|i?86-pc-cygwin*|i?86-pc-mingw32*)
|
||||
?86-pc-cygwin*|i?86-pc-cygwin*)
|
||||
pic_options='-DDLL_EXPORT'
|
||||
;;
|
||||
i?86-apple-darwin*|arm-apple-darwin*)
|
||||
|
||||
+5
-5
@@ -22,7 +22,7 @@ if [ -z "$LIBTOOL" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
(grep "^AM_PROG_LIBTOOL" $srcdir/configure.ac >/dev/null) && {
|
||||
(grep "^AM_PROG_LIBTOOL" $srcdir/configure.in >/dev/null) && {
|
||||
($LIBTOOL --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "**Error**: You must have \`libtool' installed to compile Mono."
|
||||
@@ -32,8 +32,8 @@ fi
|
||||
}
|
||||
}
|
||||
|
||||
grep "^AM_GNU_GETTEXT" $srcdir/configure.ac >/dev/null && {
|
||||
grep "sed.*POTFILES" $srcdir/configure.ac >/dev/null || \
|
||||
grep "^AM_GNU_GETTEXT" $srcdir/configure.in >/dev/null && {
|
||||
grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \
|
||||
(gettext --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "**Error**: You must have \`gettext' installed to compile Mono."
|
||||
@@ -80,7 +80,7 @@ xlc )
|
||||
esac
|
||||
|
||||
|
||||
if grep "^AC_PROG_LIBTOOL" configure.ac >/dev/null; then
|
||||
if grep "^AC_PROG_LIBTOOL" configure.in >/dev/null; then
|
||||
if test -z "$NO_LIBTOOLIZE" ; then
|
||||
echo "Running libtoolize..."
|
||||
${LIBTOOL}ize --force --copy
|
||||
@@ -99,7 +99,7 @@ aclocal $ACLOCAL_FLAGS || {
|
||||
exit 1
|
||||
}
|
||||
|
||||
if grep "^AC_CONFIG_HEADERS" configure.ac >/dev/null; then
|
||||
if grep "^AC_CONFIG_HEADERS" configure.in >/dev/null; then
|
||||
echo "Running autoheader..."
|
||||
autoheader || { echo "**Error**: autoheader failed."; exit 1; }
|
||||
fi
|
||||
|
||||
@@ -1,567 +0,0 @@
|
||||
# Copyright (c) 1999-2001 by Red Hat, Inc. All rights reserved.
|
||||
#
|
||||
# THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
|
||||
# OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
|
||||
#
|
||||
# Permission is hereby granted to use or copy this program
|
||||
# for any purpose, provided the above notices are retained on all copies.
|
||||
# Permission to modify the code and to distribute modified code is granted,
|
||||
# provided the above notices are retained, and a notice that the code was
|
||||
# modified is included with the above copyright notice.
|
||||
#
|
||||
# Original author: Tom Tromey
|
||||
# Modified by: Grzegorz Jakacki <jakacki at acm dot org>
|
||||
|
||||
dnl Process this file with autoconf to produce configure.
|
||||
|
||||
AC_PREREQ([2.53])
|
||||
AC_INIT([libgc-mono], [6.6], [[email protected]])
|
||||
|
||||
AM_INIT_AUTOMAKE([1.9 no-define foreign])
|
||||
AC_CONFIG_SRCDIR(gcj_mlc.c)
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
AC_SUBST(PACKAGE)
|
||||
AC_SUBST(GC_VERSION)
|
||||
|
||||
AC_PROG_CC
|
||||
AC_PROG_CXX
|
||||
|
||||
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
||||
|
||||
dnl automake 1.6 and later need the AM_PROG_AS macro.
|
||||
ifdef([AM_PROG_AS],[AM_PROG_AS],[])
|
||||
AC_CHECK_TOOL(AR, ar)
|
||||
AC_CHECK_TOOL(RANLIB, ranlib, :) # :)
|
||||
|
||||
AC_PROG_INSTALL
|
||||
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
. [$]{srcdir}/configure.host
|
||||
|
||||
# We use a separate variable to pass down CPPFLAGS and CFLAGS from the main mono
|
||||
# configure, because of autoconf brokeness
|
||||
if test "x$CPPFLAGS_FOR_LIBGC" != "x"; then
|
||||
CPPFLAGS=$CPPFLAGS_FOR_LIBGC
|
||||
fi
|
||||
if test "x$CFLAGS_FOR_LIBGC" != "x"; then
|
||||
CFLAGS=$CFLAGS_FOR_LIBGC
|
||||
fi
|
||||
|
||||
GC_CFLAGS=${gc_cflags}
|
||||
AC_SUBST(GC_CFLAGS)
|
||||
|
||||
case $enable_embed_check in
|
||||
no) ;;
|
||||
*) AC_MSG_ERROR([This module is now part of 'mono' and cannot be built as a stand-alone module any longer.]) ;;
|
||||
esac
|
||||
|
||||
THREADS=$with_libgc_threads
|
||||
|
||||
AC_ARG_ENABLE(win32-dllmain,
|
||||
[ --enable-win32-dllmain Define the DllMain function in win32_threads.c even if the collector is not built as a dll],
|
||||
)
|
||||
|
||||
AC_ARG_ENABLE(parallel-mark,
|
||||
[ --enable-parallel-mark parallelize marking and free list construction],
|
||||
[case "$THREADS" in
|
||||
no | none | single)
|
||||
AC_MSG_ERROR([Parallel mark requires --enable-threads=x spec])
|
||||
;;
|
||||
esac]
|
||||
)
|
||||
|
||||
AC_ARG_ENABLE(cplusplus,
|
||||
[ --enable-cplusplus install C++ support],
|
||||
)
|
||||
|
||||
AM_CPPFLAGS=-I${srcdir}/include
|
||||
THREADDLLIBS=
|
||||
## Libraries needed to support dynamic loading and/or threads.
|
||||
case "$THREADS" in
|
||||
no | none | single)
|
||||
THREADS=none
|
||||
;;
|
||||
posix | pthreads)
|
||||
THREADS=posix
|
||||
AC_CHECK_LIB(pthread, pthread_self, THREADDLLIBS="-lpthread",,)
|
||||
case "$host" in
|
||||
x86-*-linux* | ia64-*-linux* | i386-*-linux* | i486-*-linux* | i586-*-linux* | i686-*-linux* | x86_64-*-linux* | alpha*-*-linux* | s390*-*-linux* | sparc*-*-linux* | powerpc-*-linux*)
|
||||
AC_DEFINE(GC_LINUX_THREADS)
|
||||
AC_DEFINE(_REENTRANT)
|
||||
if test "${enable_parallel_mark}" = yes; then
|
||||
AC_DEFINE(PARALLEL_MARK)
|
||||
fi
|
||||
AC_DEFINE(THREAD_LOCAL_ALLOC)
|
||||
;;
|
||||
*-*-linux* | *-*-nacl*)
|
||||
AC_DEFINE(GC_LINUX_THREADS)
|
||||
AC_DEFINE(_REENTRANT)
|
||||
;;
|
||||
*-*-aix*)
|
||||
AC_DEFINE(GC_AIX_THREADS)
|
||||
AC_DEFINE(_REENTRANT)
|
||||
;;
|
||||
*-*-hpux*)
|
||||
AC_MSG_WARN("Only HP/UX 11 threads are supported.")
|
||||
AC_DEFINE(GC_HPUX_THREADS)
|
||||
AC_DEFINE(_POSIX_C_SOURCE,199506L)
|
||||
if test "${enable_parallel_mark}" = yes; then
|
||||
AC_DEFINE(PARALLEL_MARK)
|
||||
fi
|
||||
AC_DEFINE(THREAD_LOCAL_ALLOC)
|
||||
THREADDLLIBS="-lpthread -lrt"
|
||||
;;
|
||||
*-*-kfreebsd*-gnu)
|
||||
AC_DEFINE(GC_FREEBSD_THREADS)
|
||||
INCLUDES="$INCLUDES -pthread"
|
||||
THREADDLLIBS=-pthread
|
||||
AC_DEFINE(_REENTRANT)
|
||||
if test "${enable_parallel_mark}" = yes; then
|
||||
AC_DEFINE(PARALLEL_MARK)
|
||||
fi
|
||||
AC_DEFINE(THREAD_LOCAL_ALLOC)
|
||||
AC_DEFINE(USE_COMPILER_TLS)
|
||||
;;
|
||||
*-*-freebsd*)
|
||||
AC_DEFINE(GC_FREEBSD_THREADS)
|
||||
if test "x$PTHREAD_CFLAGS" != "x"; then
|
||||
AM_CPPFLAGS="$AM_CPPFLAGS $PTHREAD_CFLAGS"
|
||||
fi
|
||||
if test "x$PTHREAD_LIBS" = "x"; then
|
||||
THREADDLLIBS=-pthread
|
||||
else
|
||||
THREADDLLIBS="$PTHREAD_LIBS"
|
||||
fi
|
||||
AC_DEFINE(THREAD_LOCAL_ALLOC)
|
||||
;;
|
||||
*-*-solaris*)
|
||||
AC_DEFINE(GC_SOLARIS_THREADS)
|
||||
AC_DEFINE(GC_SOLARIS_PTHREADS)
|
||||
;;
|
||||
*-*-irix*)
|
||||
AC_DEFINE(GC_IRIX_THREADS)
|
||||
;;
|
||||
*-*-cygwin*)
|
||||
AC_DEFINE(GC_WIN32_THREADS)
|
||||
;;
|
||||
*-*-darwin*)
|
||||
AC_DEFINE(GC_DARWIN_THREADS)
|
||||
AC_DEFINE(THREAD_LOCAL_ALLOC)
|
||||
if test "${enable_parallel_mark}" = yes; then
|
||||
AC_DEFINE(PARALLEL_MARK)
|
||||
fi
|
||||
;;
|
||||
*-*-netbsd*)
|
||||
AC_DEFINE(GC_NETBSD_THREADS)
|
||||
if test "${enable_parallel_mark}" = yes; then
|
||||
AC_DEFINE(PARALLEL_MARK)
|
||||
fi
|
||||
AC_DEFINE(THREAD_LOCAL_ALLOC)
|
||||
;;
|
||||
*-*-openbsd*)
|
||||
AC_DEFINE(GC_OPENBSD_THREADS)
|
||||
if test "${enable_parallel_mark}" = yes; then
|
||||
AC_DEFINE(PARALLEL_MARK)
|
||||
fi
|
||||
AC_DEFINE(THREAD_LOCAL_ALLOC)
|
||||
;;
|
||||
*-*-osf*)
|
||||
AC_DEFINE(GC_OSF1_THREADS)
|
||||
if test "${enable_parallel_mark}" = yes; then
|
||||
AC_DEFINE(PARALLEL_MARK)
|
||||
AC_DEFINE(THREAD_LOCAL_ALLOC)
|
||||
# May want to enable it in other cases, too.
|
||||
# Measurements havent yet been done.
|
||||
fi
|
||||
AM_CPPFLAGS="$AM_CPPFLAGS -pthread"
|
||||
THREADDLLIBS="-lpthread -lrt"
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR("Pthreads not supported by the GC on this platform.")
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
win32)
|
||||
AC_DEFINE(GC_WIN32_THREADS)
|
||||
dnl Wine getenv may not return NULL for missing entry
|
||||
AC_DEFINE(NO_GETENV)
|
||||
if test "${enable_win32_dllmain}" = yes; then
|
||||
AC_DEFINE(GC_INSIDE_DLL)
|
||||
fi
|
||||
;;
|
||||
dgux386)
|
||||
THREADS=dgux386
|
||||
AC_MSG_RESULT($THREADDLLIBS)
|
||||
# Use pthread GCC switch
|
||||
THREADDLLIBS=-pthread
|
||||
if test "${enable_parallel_mark}" = yes; then
|
||||
AC_DEFINE(PARALLEL_MARK)
|
||||
fi
|
||||
AC_DEFINE(THREAD_LOCAL_ALLOC)
|
||||
AC_DEFINE(GC_DGUX386_THREADS)
|
||||
AC_DEFINE(DGUX_THREADS)
|
||||
# Enable _POSIX4A_DRAFT10_SOURCE with flag -pthread
|
||||
AM_CPPFLAGS="-pthread $AM_CPPFLAGS"
|
||||
;;
|
||||
aix)
|
||||
THREADS=posix
|
||||
THREADDLLIBS=-lpthread
|
||||
AC_DEFINE(GC_AIX_THREADS)
|
||||
AC_DEFINE(_REENTRANT)
|
||||
;;
|
||||
decosf1 | irix | mach | os2 | solaris | dce | vxworks)
|
||||
AC_MSG_ERROR(thread package $THREADS not yet supported)
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR($THREADS is an unknown thread package)
|
||||
;;
|
||||
esac
|
||||
AC_SUBST(THREADDLLIBS)
|
||||
|
||||
case "$host" in
|
||||
powerpc-*-darwin*)
|
||||
powerpc_darwin=true
|
||||
;;
|
||||
esac
|
||||
AM_CONDITIONAL(POWERPC_DARWIN,test x$powerpc_darwin = xtrue)
|
||||
|
||||
# Check if the GCC builtin __sync_bool_compare_and_swap is available.
|
||||
# It is preferred in gc_locks.h for PPC as GCC 4.4 has a problem with the inline assembly there.
|
||||
AC_MSG_CHECKING(for __sync_bool_compare_and_swap)
|
||||
AC_TRY_COMPILE([],[
|
||||
volatile unsigned int foo = 0;
|
||||
int main(int argc, char** argv) {
|
||||
unsigned int r1 = __sync_bool_compare_and_swap(&foo, 0, 1);
|
||||
return 0;
|
||||
}
|
||||
], [
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAS___SYNC_BOOL_COMPARE_AND_SWAP)
|
||||
], [
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
|
||||
AC_MSG_CHECKING(for xlc)
|
||||
AC_TRY_COMPILE([],[
|
||||
#ifndef __xlC__
|
||||
# error
|
||||
#endif
|
||||
], [compiler_xlc=yes], [compiler_xlc=no])
|
||||
AC_MSG_RESULT($compiler_xlc)
|
||||
AM_CONDITIONAL(COMPILER_XLC,test $compiler_xlc = yes)
|
||||
if test $compiler_xlc = yes -a "$powerpc_darwin" = true; then
|
||||
# the darwin stack-frame-walking code is completely broken on xlc
|
||||
AC_DEFINE(DARWIN_DONT_PARSE_STACK)
|
||||
fi
|
||||
|
||||
# We never want libdl on darwin. It is a fake libdl that just ends up making
|
||||
# dyld calls anyway
|
||||
case "$host" in
|
||||
*-*-darwin*) ;;
|
||||
*)
|
||||
AC_CHECK_LIB(dl, dlopen, THREADDLLIBS="$THREADDLLIBS -ldl")
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_SUBST(EXTRA_TEST_LIBS)
|
||||
|
||||
target_all=libgc.la
|
||||
AC_SUBST(target_all)
|
||||
|
||||
dnl If the target is an eCos system, use the appropriate eCos
|
||||
dnl I/O routines.
|
||||
dnl FIXME: this should not be a local option but a global target
|
||||
dnl system; at present there is no eCos target.
|
||||
TARGET_ECOS="no"
|
||||
AC_ARG_WITH(ecos,
|
||||
[ --with-ecos enable runtime eCos target support],
|
||||
TARGET_ECOS="$with_ecos"
|
||||
)
|
||||
|
||||
addobjs=
|
||||
addlibs=
|
||||
addincludes=
|
||||
addtests=
|
||||
CXXAM_CPPFLAGS=
|
||||
case "$TARGET_ECOS" in
|
||||
no)
|
||||
;;
|
||||
*)
|
||||
AC_DEFINE(ECOS)
|
||||
CXXINCLUDES="-I${TARGET_ECOS}/include"
|
||||
addobjs="$addobjs ecos.lo"
|
||||
;;
|
||||
esac
|
||||
|
||||
if test "${enable_cplusplus}" = yes; then
|
||||
addincludes="$addincludes include/gc_cpp.h include/gc_allocator.h"
|
||||
addtests="$addtests test_cpp"
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(CPLUSPLUS, test "${enable_cplusplus}" = yes)
|
||||
|
||||
AC_SUBST(CXX)
|
||||
|
||||
AC_SUBST(AM_CPPFLAGS)
|
||||
AC_SUBST(CXXINCLUDES)
|
||||
|
||||
# Configuration of shared libraries
|
||||
#
|
||||
AC_MSG_CHECKING(whether to build shared libraries)
|
||||
AC_ENABLE_SHARED
|
||||
|
||||
case "$host" in
|
||||
alpha-*-openbsd*)
|
||||
enable_shared=no
|
||||
AC_MSG_RESULT(no)
|
||||
;;
|
||||
*)
|
||||
AC_MSG_RESULT(yes)
|
||||
;;
|
||||
esac
|
||||
|
||||
# Configuration of machine-dependent code
|
||||
#
|
||||
AC_MSG_CHECKING(which machine-dependent code should be used)
|
||||
machdep=
|
||||
case "$host" in
|
||||
alpha-*-openbsd*)
|
||||
machdep="alpha_mach_dep.lo"
|
||||
if test x"${ac_cv_lib_dl_dlopen}" != xyes ; then
|
||||
AC_MSG_WARN(OpenBSD/Alpha without dlopen(). Shared library support is disabled)
|
||||
fi
|
||||
;;
|
||||
alpha*-*-linux*)
|
||||
machdep="alpha_mach_dep.lo"
|
||||
;;
|
||||
i?86-*-solaris2.[[89]] | i?86-*-solaris2.1?)
|
||||
AC_DEFINE(SOLARIS25_PROC_VDB_BUG_FIXED)
|
||||
;;
|
||||
mipstx39-*-elf*)
|
||||
machdep="mips_ultrix_mach_dep.lo"
|
||||
AC_DEFINE(STACKBASE, __stackbase)
|
||||
AC_DEFINE(DATASTART_IS_ETEXT)
|
||||
;;
|
||||
mips-dec-ultrix*)
|
||||
machdep="mips_ultrix_mach-dep.lo"
|
||||
;;
|
||||
mips-nec-sysv*|mips-unknown-sysv*)
|
||||
;;
|
||||
mips*-*-linux*)
|
||||
;;
|
||||
mips-*-*)
|
||||
machdep="mips_sgi_mach_dep.lo"
|
||||
AC_DEFINE(NO_EXECUTE_PERMISSION)
|
||||
;;
|
||||
sparc-*-netbsd*)
|
||||
machdep="sparc_netbsd_mach_dep.lo"
|
||||
;;
|
||||
sparc-sun-solaris2.3)
|
||||
machdep="sparc_mach_dep.lo"
|
||||
AC_DEFINE(SUNOS53_SHARED_LIB)
|
||||
;;
|
||||
sparc*-sun-solaris2.*)
|
||||
machdep="sparc_mach_dep.lo"
|
||||
;;
|
||||
ia64-*-*)
|
||||
machdep="mach_dep.lo ia64_save_regs_in_stack.lo"
|
||||
target_ia64=true
|
||||
;;
|
||||
*-*-nacl*)
|
||||
AC_DEFINE(NO_EXECUTE_PERMISSION)
|
||||
;;
|
||||
esac
|
||||
if test x"$machdep" = x; then
|
||||
AC_MSG_RESULT($machdep)
|
||||
machdep="mach_dep.lo"
|
||||
fi
|
||||
addobjs="$addobjs $machdep"
|
||||
#
|
||||
# Adding object files directly to _LIBADD breaks -j builds, so we need to add the sources
|
||||
# instead, but _SOURCES can't contain autoconf substitutions, so add them using automake
|
||||
# conditionals.
|
||||
#
|
||||
#AC_SUBST(addobjs)
|
||||
AC_SUBST(addincludes)
|
||||
AC_SUBST(addlibs)
|
||||
AC_SUBST(addtests)
|
||||
|
||||
AM_CONDITIONAL(TARGET_IA64,test x$target_ia64 = xtrue)
|
||||
|
||||
AC_PROG_LIBTOOL
|
||||
# Use dolt (http://dolt.freedesktop.org/) instead of libtool for building.
|
||||
DOLT
|
||||
|
||||
#
|
||||
# Check for AViiON Machines running DGUX
|
||||
#
|
||||
ac_is_dgux=no
|
||||
AC_CHECK_HEADER(sys/dg_sys_info.h,
|
||||
[ac_is_dgux=yes;])
|
||||
|
||||
## :GOTCHA: we do not check anything but sys/dg_sys_info.h
|
||||
if test $ac_is_dgux = yes; then
|
||||
if test "$enable_full_debug" = "yes"; then
|
||||
CFLAGS="-g -mstandard -DDGUX -D_DGUX_SOURCE -Di386 -mno-legend -O2"
|
||||
CXXFLAGS="-g -mstandard -DDGUX -D_DGUX_SOURCE -Di386 -mno-legend -O2"
|
||||
else
|
||||
CFLAGS="-DDGUX -D_DGUX_SOURCE -Di386 -mno-legend -O2"
|
||||
CXXFLAGS="-DDGUX -D_DGUX_SOURCE -Di386 -mno-legend -O2"
|
||||
fi
|
||||
AC_SUBST(CFLAGS)
|
||||
AC_SUBST(CXXFLAGS)
|
||||
fi
|
||||
|
||||
dnl We use these options to decide which functions to include.
|
||||
AC_ARG_WITH(target-subdir,
|
||||
[ --with-target-subdir=SUBDIR
|
||||
configuring with a cross compiler])
|
||||
AC_ARG_WITH(cross-host,
|
||||
[ --with-cross-host=HOST configuring with a cross compiler])
|
||||
|
||||
# automake wants to see AC_EXEEXT. But we don't need it. And having
|
||||
# it is actually a problem, because the compiler we're passed can't
|
||||
# necessarily do a full link. So we fool automake here.
|
||||
if false; then
|
||||
# autoconf 2.50 runs AC_EXEEXT by default, and the macro expands
|
||||
# to nothing, so nothing would remain between `then' and `fi' if it
|
||||
# were not for the `:' below.
|
||||
:
|
||||
AC_EXEEXT
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([for threads package to use])
|
||||
AC_MSG_RESULT($THREADS)
|
||||
|
||||
dnl As of 4.13a2, the collector will not properly work on Solaris when
|
||||
dnl built with gcc and -O. So we remove -O in the appropriate case.
|
||||
dnl Not needed anymore on Solaris.
|
||||
AC_MSG_CHECKING(whether Solaris gcc optimization fix is necessary)
|
||||
case "$host" in
|
||||
*aix*)
|
||||
if test "$GCC" = yes; then
|
||||
AC_MSG_RESULT(yes)
|
||||
new_CFLAGS=
|
||||
for i in $CFLAGS; do
|
||||
case "$i" in
|
||||
-O*)
|
||||
;;
|
||||
*)
|
||||
new_CFLAGS="$new_CFLAGS $i"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
CFLAGS="$new_CFLAGS"
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
;;
|
||||
*) AC_MSG_RESULT(no) ;;
|
||||
esac
|
||||
|
||||
dnl We need to override the top-level CFLAGS. This is how we do it.
|
||||
MY_CFLAGS="$CFLAGS"
|
||||
AC_SUBST(MY_CFLAGS)
|
||||
|
||||
dnl Include defines that have become de facto standard.
|
||||
dnl ALL_INTERIOR_POINTERS can be overridden in startup code.
|
||||
AC_DEFINE(SILENT)
|
||||
AC_DEFINE(NO_SIGNALS)
|
||||
AC_DEFINE(NO_EXECUTE_PERMISSION)
|
||||
dnl AC_DEFINE(ALL_INTERIOR_POINTERS)
|
||||
|
||||
dnl By default, make the library as general as possible.
|
||||
AC_DEFINE(JAVA_FINALIZATION)
|
||||
AC_DEFINE(GC_GCJ_SUPPORT)
|
||||
AC_DEFINE(ATOMIC_UNCOLLECTABLE)
|
||||
|
||||
dnl This is something of a hack. When cross-compiling we turn off
|
||||
dnl some functionality. We also enable the "small" configuration.
|
||||
dnl These is only correct when targetting an embedded system. FIXME.
|
||||
if test -n "${with_cross_host}"; then
|
||||
AC_DEFINE(NO_SIGSET)
|
||||
AC_DEFINE(NO_CLOCK)
|
||||
AC_DEFINE(SMALL_CONFIG)
|
||||
AC_DEFINE(NO_DEBUGGING)
|
||||
fi
|
||||
|
||||
UNWINDLIBS=
|
||||
AC_ARG_ENABLE(full-debug,
|
||||
[ --enable-full-debug include full support for pointer backtracing etc.],
|
||||
[ if test "$enable_full_debug" = "yes"; then
|
||||
AC_MSG_WARN("Should define GC_DEBUG and use debug alloc. in clients.")
|
||||
AC_DEFINE(KEEP_BACK_PTRS)
|
||||
AC_DEFINE(DBG_HDRS_ALL)
|
||||
case $host in
|
||||
ia64-*-linux* )
|
||||
AC_DEFINE(MAKE_BACK_GRAPH)
|
||||
AC_DEFINE(SAVE_CALL_COUNT, 8)
|
||||
AC_CHECK_LIB(unwind, backtrace, [
|
||||
AC_DEFINE(GC_HAVE_BUILTIN_BACKTRACE)
|
||||
UNWINDLIBS=-lunwind
|
||||
AC_MSG_WARN("Client code may need to link against libunwind.")
|
||||
])
|
||||
;;
|
||||
x86-*-linux* | i586-*-linux* | i686-*-linux* | x86_64-*-linux* )
|
||||
AC_DEFINE(MAKE_BACK_GRAPH)
|
||||
AC_MSG_WARN("Client must not use -fomit-frame-pointer.")
|
||||
AC_DEFINE(SAVE_CALL_COUNT, 8)
|
||||
;;
|
||||
i[3456]86-*-dgux*)
|
||||
AC_DEFINE(MAKE_BACK_GRAPH)
|
||||
;;
|
||||
esac ]
|
||||
fi)
|
||||
|
||||
AC_SUBST(UNWINDLIBS)
|
||||
|
||||
AC_ARG_ENABLE(redirect-malloc,
|
||||
[ --enable-redirect-malloc redirect malloc and friends to GC routines])
|
||||
|
||||
if test "${enable_redirect_malloc}" = yes; then
|
||||
if test "${enable_full_debug}" = yes; then
|
||||
AC_DEFINE(REDIRECT_MALLOC, GC_debug_malloc_replacement)
|
||||
AC_DEFINE(REDIRECT_REALLOC, GC_debug_realloc_replacement)
|
||||
AC_DEFINE(REDIRECT_FREE, GC_debug_free)
|
||||
else
|
||||
AC_DEFINE(REDIRECT_MALLOC, GC_malloc)
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_DEFINE(_IN_LIBGC)
|
||||
|
||||
AC_ARG_ENABLE(gc-assertions,
|
||||
[ --enable-gc-assertions collector-internal assertion checking])
|
||||
if test "${enable_gc_assertions}" = yes; then
|
||||
AC_DEFINE(GC_ASSERTIONS)
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(quiet-build, [ --enable-quiet-build Enable quiet libgc build (on by default)], enable_quiet_build=$enableval, enable_quiet_build=yes)
|
||||
AM_CONDITIONAL(USE_LIBDIR, test -z "$with_cross_host")
|
||||
|
||||
AC_ARG_ENABLE(werror, [ --enable-werror Pass -Werror to the C compiler], werror_flag=$enableval, werror_flag=no)
|
||||
if test x$werror_flag = xyes; then
|
||||
WERROR_CFLAGS="-Werror"
|
||||
fi
|
||||
AC_SUBST([WERROR_CFLAGS])
|
||||
|
||||
if test "${multilib}" = "yes"; then
|
||||
multilib_arg="--enable-multilib"
|
||||
else
|
||||
multilib_arg=
|
||||
fi
|
||||
|
||||
AC_OUTPUT(Makefile
|
||||
m4/Makefile
|
||||
include/Makefile
|
||||
include/private/Makefile
|
||||
doc/Makefile,,
|
||||
srcdir=${srcdir}
|
||||
host=${host}
|
||||
CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
|
||||
CC="${CC}"
|
||||
DEFS="$DEFS"
|
||||
)
|
||||
@@ -0,0 +1,550 @@
|
||||
# Copyright (c) 1999-2001 by Red Hat, Inc. All rights reserved.
|
||||
#
|
||||
# THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
|
||||
# OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
|
||||
#
|
||||
# Permission is hereby granted to use or copy this program
|
||||
# for any purpose, provided the above notices are retained on all copies.
|
||||
# Permission to modify the code and to distribute modified code is granted,
|
||||
# provided the above notices are retained, and a notice that the code was
|
||||
# modified is included with the above copyright notice.
|
||||
#
|
||||
# Original author: Tom Tromey
|
||||
# Modified by: Grzegorz Jakacki <jakacki at acm dot org>
|
||||
|
||||
dnl Process this file with autoconf to produce configure.
|
||||
|
||||
AC_PREREQ([2.53])
|
||||
AC_INIT([libgc-mono], [6.6], [[email protected]])
|
||||
|
||||
AM_INIT_AUTOMAKE([1.9 no-define foreign])
|
||||
AC_CONFIG_SRCDIR(gcj_mlc.c)
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
AC_SUBST(PACKAGE)
|
||||
AC_SUBST(GC_VERSION)
|
||||
|
||||
AC_PROG_CC
|
||||
AC_PROG_CXX
|
||||
|
||||
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
||||
|
||||
dnl automake 1.6 and later need the AM_PROG_AS macro.
|
||||
ifdef([AM_PROG_AS],[AM_PROG_AS],[])
|
||||
AC_CHECK_TOOL(AR, ar)
|
||||
AC_CHECK_TOOL(RANLIB, ranlib, :) # :)
|
||||
|
||||
AC_PROG_INSTALL
|
||||
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
. [$]{srcdir}/configure.host
|
||||
|
||||
# We use a separate variable to pass down CPPFLAGS and CFLAGS from the main mono
|
||||
# configure, because of autoconf brokeness
|
||||
if test "x$CPPFLAGS_FOR_LIBGC" != "x"; then
|
||||
CPPFLAGS=$CPPFLAGS_FOR_LIBGC
|
||||
fi
|
||||
if test "x$CFLAGS_FOR_LIBGC" != "x"; then
|
||||
CFLAGS=$CFLAGS_FOR_LIBGC
|
||||
fi
|
||||
|
||||
GC_CFLAGS=${gc_cflags}
|
||||
AC_SUBST(GC_CFLAGS)
|
||||
|
||||
case $enable_embed_check in
|
||||
no) ;;
|
||||
*) AC_MSG_ERROR([This module is now part of 'mono' and cannot be built as a stand-alone module any longer.]) ;;
|
||||
esac
|
||||
|
||||
THREADS=$with_libgc_threads
|
||||
|
||||
AC_ARG_ENABLE(win32-dllmain,
|
||||
[ --enable-win32-dllmain Define the DllMain function in win32_threads.c even if the collector is not built as a dll],
|
||||
)
|
||||
|
||||
AC_ARG_ENABLE(parallel-mark,
|
||||
[ --enable-parallel-mark parallelize marking and free list construction],
|
||||
[case "$THREADS" in
|
||||
no | none | single)
|
||||
AC_MSG_ERROR([Parallel mark requires --enable-threads=x spec])
|
||||
;;
|
||||
esac]
|
||||
)
|
||||
|
||||
AC_ARG_ENABLE(cplusplus,
|
||||
[ --enable-cplusplus install C++ support],
|
||||
)
|
||||
|
||||
AM_CPPFLAGS=-I${srcdir}/include
|
||||
THREADDLLIBS=
|
||||
## Libraries needed to support dynamic loading and/or threads.
|
||||
case "$THREADS" in
|
||||
no | none | single)
|
||||
THREADS=none
|
||||
;;
|
||||
posix | pthreads)
|
||||
THREADS=posix
|
||||
AC_CHECK_LIB(pthread, pthread_self, THREADDLLIBS="-lpthread",,)
|
||||
case "$host" in
|
||||
x86-*-linux* | ia64-*-linux* | i386-*-linux* | i486-*-linux* | i586-*-linux* | i686-*-linux* | x86_64-*-linux* | alpha*-*-linux* | s390*-*-linux* | sparc*-*-linux* | powerpc-*-linux*)
|
||||
AC_DEFINE(GC_LINUX_THREADS)
|
||||
AC_DEFINE(_REENTRANT)
|
||||
if test "${enable_parallel_mark}" = yes; then
|
||||
AC_DEFINE(PARALLEL_MARK)
|
||||
fi
|
||||
AC_DEFINE(THREAD_LOCAL_ALLOC)
|
||||
;;
|
||||
*-*-linux* | *-*-nacl*)
|
||||
AC_DEFINE(GC_LINUX_THREADS)
|
||||
AC_DEFINE(_REENTRANT)
|
||||
;;
|
||||
*-*-aix*)
|
||||
AC_DEFINE(GC_AIX_THREADS)
|
||||
AC_DEFINE(_REENTRANT)
|
||||
;;
|
||||
*-*-hpux*)
|
||||
AC_MSG_WARN("Only HP/UX 11 threads are supported.")
|
||||
AC_DEFINE(GC_HPUX_THREADS)
|
||||
AC_DEFINE(_POSIX_C_SOURCE,199506L)
|
||||
if test "${enable_parallel_mark}" = yes; then
|
||||
AC_DEFINE(PARALLEL_MARK)
|
||||
fi
|
||||
AC_DEFINE(THREAD_LOCAL_ALLOC)
|
||||
THREADDLLIBS="-lpthread -lrt"
|
||||
;;
|
||||
*-*-freebsd*)
|
||||
AC_DEFINE(GC_FREEBSD_THREADS)
|
||||
if test "x$PTHREAD_CFLAGS" != "x"; then
|
||||
AM_CPPFLAGS="$AM_CPPFLAGS $PTHREAD_CFLAGS"
|
||||
fi
|
||||
if test "x$PTHREAD_LIBS" = "x"; then
|
||||
THREADDLLIBS=-pthread
|
||||
else
|
||||
THREADDLLIBS="$PTHREAD_LIBS"
|
||||
fi
|
||||
AC_DEFINE(THREAD_LOCAL_ALLOC)
|
||||
;;
|
||||
*-*-solaris*)
|
||||
AC_DEFINE(GC_SOLARIS_THREADS)
|
||||
AC_DEFINE(GC_SOLARIS_PTHREADS)
|
||||
;;
|
||||
*-*-irix*)
|
||||
AC_DEFINE(GC_IRIX_THREADS)
|
||||
;;
|
||||
*-*-cygwin*)
|
||||
AC_DEFINE(GC_WIN32_THREADS)
|
||||
;;
|
||||
*-*-darwin*)
|
||||
AC_DEFINE(GC_DARWIN_THREADS)
|
||||
AC_DEFINE(THREAD_LOCAL_ALLOC)
|
||||
if test "${enable_parallel_mark}" = yes; then
|
||||
AC_DEFINE(PARALLEL_MARK)
|
||||
fi
|
||||
;;
|
||||
*-*-netbsd*)
|
||||
AC_DEFINE(GC_NETBSD_THREADS)
|
||||
if test "${enable_parallel_mark}" = yes; then
|
||||
AC_DEFINE(PARALLEL_MARK)
|
||||
fi
|
||||
AC_DEFINE(THREAD_LOCAL_ALLOC)
|
||||
;;
|
||||
*-*-openbsd*)
|
||||
AC_DEFINE(GC_OPENBSD_THREADS)
|
||||
if test "${enable_parallel_mark}" = yes; then
|
||||
AC_DEFINE(PARALLEL_MARK)
|
||||
fi
|
||||
AC_DEFINE(THREAD_LOCAL_ALLOC)
|
||||
;;
|
||||
*-*-osf*)
|
||||
AC_DEFINE(GC_OSF1_THREADS)
|
||||
if test "${enable_parallel_mark}" = yes; then
|
||||
AC_DEFINE(PARALLEL_MARK)
|
||||
AC_DEFINE(THREAD_LOCAL_ALLOC)
|
||||
# May want to enable it in other cases, too.
|
||||
# Measurements havent yet been done.
|
||||
fi
|
||||
AM_CPPFLAGS="$AM_CPPFLAGS -pthread"
|
||||
THREADDLLIBS="-lpthread -lrt"
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR("Pthreads not supported by the GC on this platform.")
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
win32)
|
||||
AC_DEFINE(GC_WIN32_THREADS)
|
||||
dnl Wine getenv may not return NULL for missing entry
|
||||
AC_DEFINE(NO_GETENV)
|
||||
if test "${enable_win32_dllmain}" = yes; then
|
||||
AC_DEFINE(GC_INSIDE_DLL)
|
||||
fi
|
||||
;;
|
||||
dgux386)
|
||||
THREADS=dgux386
|
||||
AC_MSG_RESULT($THREADDLLIBS)
|
||||
# Use pthread GCC switch
|
||||
THREADDLLIBS=-pthread
|
||||
if test "${enable_parallel_mark}" = yes; then
|
||||
AC_DEFINE(PARALLEL_MARK)
|
||||
fi
|
||||
AC_DEFINE(THREAD_LOCAL_ALLOC)
|
||||
AC_DEFINE(GC_DGUX386_THREADS)
|
||||
AC_DEFINE(DGUX_THREADS)
|
||||
# Enable _POSIX4A_DRAFT10_SOURCE with flag -pthread
|
||||
AM_CPPFLAGS="-pthread $AM_CPPFLAGS"
|
||||
;;
|
||||
aix)
|
||||
THREADS=posix
|
||||
THREADDLLIBS=-lpthread
|
||||
AC_DEFINE(GC_AIX_THREADS)
|
||||
AC_DEFINE(_REENTRANT)
|
||||
;;
|
||||
decosf1 | irix | mach | os2 | solaris | dce | vxworks)
|
||||
AC_MSG_ERROR(thread package $THREADS not yet supported)
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR($THREADS is an unknown thread package)
|
||||
;;
|
||||
esac
|
||||
AC_SUBST(THREADDLLIBS)
|
||||
|
||||
case "$host" in
|
||||
powerpc-*-darwin*)
|
||||
powerpc_darwin=true
|
||||
;;
|
||||
esac
|
||||
AM_CONDITIONAL(POWERPC_DARWIN,test x$powerpc_darwin = xtrue)
|
||||
|
||||
# Check if the GCC builtin __sync_bool_compare_and_swap is available.
|
||||
# It is preferred in gc_locks.h for PPC as GCC 4.4 has a problem with the inline assembly there.
|
||||
AC_MSG_CHECKING(for __sync_bool_compare_and_swap)
|
||||
AC_TRY_COMPILE([],[
|
||||
volatile unsigned int foo = 0;
|
||||
int main(int argc, char** argv) {
|
||||
unsigned int r1 = __sync_bool_compare_and_swap(&foo, 0, 1);
|
||||
return 0;
|
||||
}
|
||||
], [
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAS___SYNC_BOOL_COMPARE_AND_SWAP)
|
||||
], [
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
|
||||
AC_MSG_CHECKING(for xlc)
|
||||
AC_TRY_COMPILE([],[
|
||||
#ifndef __xlC__
|
||||
# error
|
||||
#endif
|
||||
], [compiler_xlc=yes], [compiler_xlc=no])
|
||||
AC_MSG_RESULT($compiler_xlc)
|
||||
AM_CONDITIONAL(COMPILER_XLC,test $compiler_xlc = yes)
|
||||
if test $compiler_xlc = yes -a "$powerpc_darwin" = true; then
|
||||
# the darwin stack-frame-walking code is completely broken on xlc
|
||||
AC_DEFINE(DARWIN_DONT_PARSE_STACK)
|
||||
fi
|
||||
|
||||
# We never want libdl on darwin. It is a fake libdl that just ends up making
|
||||
# dyld calls anyway
|
||||
case "$host" in
|
||||
*-*-darwin*) ;;
|
||||
*)
|
||||
AC_CHECK_LIB(dl, dlopen, THREADDLLIBS="$THREADDLLIBS -ldl")
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_SUBST(EXTRA_TEST_LIBS)
|
||||
|
||||
target_all=libgc.la
|
||||
AC_SUBST(target_all)
|
||||
|
||||
dnl If the target is an eCos system, use the appropriate eCos
|
||||
dnl I/O routines.
|
||||
dnl FIXME: this should not be a local option but a global target
|
||||
dnl system; at present there is no eCos target.
|
||||
TARGET_ECOS="no"
|
||||
AC_ARG_WITH(ecos,
|
||||
[ --with-ecos enable runtime eCos target support],
|
||||
TARGET_ECOS="$with_ecos"
|
||||
)
|
||||
|
||||
addobjs=
|
||||
addlibs=
|
||||
addincludes=
|
||||
addtests=
|
||||
CXXAM_CPPFLAGS=
|
||||
case "$TARGET_ECOS" in
|
||||
no)
|
||||
;;
|
||||
*)
|
||||
AC_DEFINE(ECOS)
|
||||
CXXINCLUDES="-I${TARGET_ECOS}/include"
|
||||
addobjs="$addobjs ecos.lo"
|
||||
;;
|
||||
esac
|
||||
|
||||
if test "${enable_cplusplus}" = yes; then
|
||||
addincludes="$addincludes include/gc_cpp.h include/gc_allocator.h"
|
||||
addtests="$addtests test_cpp"
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(CPLUSPLUS, test "${enable_cplusplus}" = yes)
|
||||
|
||||
AC_SUBST(CXX)
|
||||
|
||||
AC_SUBST(AM_CPPFLAGS)
|
||||
AC_SUBST(CXXINCLUDES)
|
||||
|
||||
# Configuration of shared libraries
|
||||
#
|
||||
AC_MSG_CHECKING(whether to build shared libraries)
|
||||
AC_ENABLE_SHARED
|
||||
|
||||
case "$host" in
|
||||
alpha-*-openbsd*)
|
||||
enable_shared=no
|
||||
AC_MSG_RESULT(no)
|
||||
;;
|
||||
*)
|
||||
AC_MSG_RESULT(yes)
|
||||
;;
|
||||
esac
|
||||
|
||||
# Configuration of machine-dependent code
|
||||
#
|
||||
AC_MSG_CHECKING(which machine-dependent code should be used)
|
||||
machdep=
|
||||
case "$host" in
|
||||
alpha-*-openbsd*)
|
||||
machdep="alpha_mach_dep.lo"
|
||||
if test x"${ac_cv_lib_dl_dlopen}" != xyes ; then
|
||||
AC_MSG_WARN(OpenBSD/Alpha without dlopen(). Shared library support is disabled)
|
||||
fi
|
||||
;;
|
||||
alpha*-*-linux*)
|
||||
machdep="alpha_mach_dep.lo"
|
||||
;;
|
||||
i?86-*-solaris2.[[89]] | i?86-*-solaris2.1?)
|
||||
AC_DEFINE(SOLARIS25_PROC_VDB_BUG_FIXED)
|
||||
;;
|
||||
mipstx39-*-elf*)
|
||||
machdep="mips_ultrix_mach_dep.lo"
|
||||
AC_DEFINE(STACKBASE, __stackbase)
|
||||
AC_DEFINE(DATASTART_IS_ETEXT)
|
||||
;;
|
||||
mips-dec-ultrix*)
|
||||
machdep="mips_ultrix_mach-dep.lo"
|
||||
;;
|
||||
mips-nec-sysv*|mips-unknown-sysv*)
|
||||
;;
|
||||
mips*-*-linux*)
|
||||
;;
|
||||
mips-*-*)
|
||||
machdep="mips_sgi_mach_dep.lo"
|
||||
AC_DEFINE(NO_EXECUTE_PERMISSION)
|
||||
;;
|
||||
sparc-*-netbsd*)
|
||||
machdep="sparc_netbsd_mach_dep.lo"
|
||||
;;
|
||||
sparc-sun-solaris2.3)
|
||||
machdep="sparc_mach_dep.lo"
|
||||
AC_DEFINE(SUNOS53_SHARED_LIB)
|
||||
;;
|
||||
sparc*-sun-solaris2.*)
|
||||
machdep="sparc_mach_dep.lo"
|
||||
;;
|
||||
ia64-*-*)
|
||||
machdep="mach_dep.lo ia64_save_regs_in_stack.lo"
|
||||
target_ia64=true
|
||||
;;
|
||||
*-*-nacl*)
|
||||
AC_DEFINE(NO_EXECUTE_PERMISSION)
|
||||
;;
|
||||
esac
|
||||
if test x"$machdep" = x; then
|
||||
AC_MSG_RESULT($machdep)
|
||||
machdep="mach_dep.lo"
|
||||
fi
|
||||
addobjs="$addobjs $machdep"
|
||||
#
|
||||
# Adding object files directly to _LIBADD breaks -j builds, so we need to add the sources
|
||||
# instead, but _SOURCES can't contain autoconf substitutions, so add them using automake
|
||||
# conditionals.
|
||||
#
|
||||
#AC_SUBST(addobjs)
|
||||
AC_SUBST(addincludes)
|
||||
AC_SUBST(addlibs)
|
||||
AC_SUBST(addtests)
|
||||
|
||||
AM_CONDITIONAL(TARGET_IA64,test x$target_ia64 = xtrue)
|
||||
|
||||
AC_PROG_LIBTOOL
|
||||
# Use dolt (http://dolt.freedesktop.org/) instead of libtool for building.
|
||||
DOLT
|
||||
|
||||
#
|
||||
# Check for AViiON Machines running DGUX
|
||||
#
|
||||
ac_is_dgux=no
|
||||
AC_CHECK_HEADER(sys/dg_sys_info.h,
|
||||
[ac_is_dgux=yes;])
|
||||
|
||||
## :GOTCHA: we do not check anything but sys/dg_sys_info.h
|
||||
if test $ac_is_dgux = yes; then
|
||||
if test "$enable_full_debug" = "yes"; then
|
||||
CFLAGS="-g -mstandard -DDGUX -D_DGUX_SOURCE -Di386 -mno-legend -O2"
|
||||
CXXFLAGS="-g -mstandard -DDGUX -D_DGUX_SOURCE -Di386 -mno-legend -O2"
|
||||
else
|
||||
CFLAGS="-DDGUX -D_DGUX_SOURCE -Di386 -mno-legend -O2"
|
||||
CXXFLAGS="-DDGUX -D_DGUX_SOURCE -Di386 -mno-legend -O2"
|
||||
fi
|
||||
AC_SUBST(CFLAGS)
|
||||
AC_SUBST(CXXFLAGS)
|
||||
fi
|
||||
|
||||
dnl We use these options to decide which functions to include.
|
||||
AC_ARG_WITH(target-subdir,
|
||||
[ --with-target-subdir=SUBDIR
|
||||
configuring with a cross compiler])
|
||||
AC_ARG_WITH(cross-host,
|
||||
[ --with-cross-host=HOST configuring with a cross compiler])
|
||||
|
||||
# automake wants to see AC_EXEEXT. But we don't need it. And having
|
||||
# it is actually a problem, because the compiler we're passed can't
|
||||
# necessarily do a full link. So we fool automake here.
|
||||
if false; then
|
||||
# autoconf 2.50 runs AC_EXEEXT by default, and the macro expands
|
||||
# to nothing, so nothing would remain between `then' and `fi' if it
|
||||
# were not for the `:' below.
|
||||
:
|
||||
AC_EXEEXT
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([for threads package to use])
|
||||
AC_MSG_RESULT($THREADS)
|
||||
|
||||
dnl As of 4.13a2, the collector will not properly work on Solaris when
|
||||
dnl built with gcc and -O. So we remove -O in the appropriate case.
|
||||
dnl Not needed anymore on Solaris.
|
||||
AC_MSG_CHECKING(whether Solaris gcc optimization fix is necessary)
|
||||
case "$host" in
|
||||
*aix*)
|
||||
if test "$GCC" = yes; then
|
||||
AC_MSG_RESULT(yes)
|
||||
new_CFLAGS=
|
||||
for i in $CFLAGS; do
|
||||
case "$i" in
|
||||
-O*)
|
||||
;;
|
||||
*)
|
||||
new_CFLAGS="$new_CFLAGS $i"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
CFLAGS="$new_CFLAGS"
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
;;
|
||||
*) AC_MSG_RESULT(no) ;;
|
||||
esac
|
||||
|
||||
dnl We need to override the top-level CFLAGS. This is how we do it.
|
||||
MY_CFLAGS="$CFLAGS"
|
||||
AC_SUBST(MY_CFLAGS)
|
||||
|
||||
dnl Include defines that have become de facto standard.
|
||||
dnl ALL_INTERIOR_POINTERS can be overridden in startup code.
|
||||
AC_DEFINE(SILENT)
|
||||
AC_DEFINE(NO_SIGNALS)
|
||||
AC_DEFINE(NO_EXECUTE_PERMISSION)
|
||||
dnl AC_DEFINE(ALL_INTERIOR_POINTERS)
|
||||
|
||||
dnl By default, make the library as general as possible.
|
||||
AC_DEFINE(JAVA_FINALIZATION)
|
||||
AC_DEFINE(GC_GCJ_SUPPORT)
|
||||
AC_DEFINE(ATOMIC_UNCOLLECTABLE)
|
||||
|
||||
dnl This is something of a hack. When cross-compiling we turn off
|
||||
dnl some functionality. We also enable the "small" configuration.
|
||||
dnl These is only correct when targetting an embedded system. FIXME.
|
||||
if test -n "${with_cross_host}"; then
|
||||
AC_DEFINE(NO_SIGSET)
|
||||
AC_DEFINE(NO_CLOCK)
|
||||
AC_DEFINE(SMALL_CONFIG)
|
||||
AC_DEFINE(NO_DEBUGGING)
|
||||
fi
|
||||
|
||||
UNWINDLIBS=
|
||||
AC_ARG_ENABLE(full-debug,
|
||||
[ --enable-full-debug include full support for pointer backtracing etc.],
|
||||
[ if test "$enable_full_debug" = "yes"; then
|
||||
AC_MSG_WARN("Should define GC_DEBUG and use debug alloc. in clients.")
|
||||
AC_DEFINE(KEEP_BACK_PTRS)
|
||||
AC_DEFINE(DBG_HDRS_ALL)
|
||||
case $host in
|
||||
ia64-*-linux* )
|
||||
AC_DEFINE(MAKE_BACK_GRAPH)
|
||||
AC_DEFINE(SAVE_CALL_COUNT, 8)
|
||||
AC_CHECK_LIB(unwind, backtrace, [
|
||||
AC_DEFINE(GC_HAVE_BUILTIN_BACKTRACE)
|
||||
UNWINDLIBS=-lunwind
|
||||
AC_MSG_WARN("Client code may need to link against libunwind.")
|
||||
])
|
||||
;;
|
||||
x86-*-linux* | i586-*-linux* | i686-*-linux* | x86_64-*-linux* )
|
||||
AC_DEFINE(MAKE_BACK_GRAPH)
|
||||
AC_MSG_WARN("Client must not use -fomit-frame-pointer.")
|
||||
AC_DEFINE(SAVE_CALL_COUNT, 8)
|
||||
;;
|
||||
i[3456]86-*-dgux*)
|
||||
AC_DEFINE(MAKE_BACK_GRAPH)
|
||||
;;
|
||||
esac ]
|
||||
fi)
|
||||
|
||||
AC_SUBST(UNWINDLIBS)
|
||||
|
||||
AC_ARG_ENABLE(redirect-malloc,
|
||||
[ --enable-redirect-malloc redirect malloc and friends to GC routines])
|
||||
|
||||
if test "${enable_redirect_malloc}" = yes; then
|
||||
if test "${enable_full_debug}" = yes; then
|
||||
AC_DEFINE(REDIRECT_MALLOC, GC_debug_malloc_replacement)
|
||||
AC_DEFINE(REDIRECT_REALLOC, GC_debug_realloc_replacement)
|
||||
AC_DEFINE(REDIRECT_FREE, GC_debug_free)
|
||||
else
|
||||
AC_DEFINE(REDIRECT_MALLOC, GC_malloc)
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_DEFINE(_IN_LIBGC)
|
||||
|
||||
AC_ARG_ENABLE(gc-assertions,
|
||||
[ --enable-gc-assertions collector-internal assertion checking])
|
||||
if test "${enable_gc_assertions}" = yes; then
|
||||
AC_DEFINE(GC_ASSERTIONS)
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(quiet-build, [ --enable-quiet-build Enable quiet libgc build (on by default)], enable_quiet_build=$enableval, enable_quiet_build=yes)
|
||||
AM_CONDITIONAL(USE_LIBDIR, test -z "$with_cross_host")
|
||||
|
||||
if test "${multilib}" = "yes"; then
|
||||
multilib_arg="--enable-multilib"
|
||||
else
|
||||
multilib_arg=
|
||||
fi
|
||||
|
||||
AC_OUTPUT(Makefile
|
||||
m4/Makefile
|
||||
include/Makefile
|
||||
include/private/Makefile
|
||||
doc/Makefile,,
|
||||
srcdir=${srcdir}
|
||||
host=${host}
|
||||
CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
|
||||
CC="${CC}"
|
||||
DEFS="$DEFS"
|
||||
)
|
||||
@@ -5,6 +5,10 @@
|
||||
#include <AvailabilityMacros.h>
|
||||
#include "mono/utils/mono-compiler.h"
|
||||
|
||||
#ifdef MONO_DEBUGGER_SUPPORTED
|
||||
#include "include/libgc-mono-debugger.h"
|
||||
#endif
|
||||
|
||||
/* From "Inside Mac OS X - Mach-O Runtime Architecture" published by Apple
|
||||
Page 49:
|
||||
"The space beneath the stack pointer, where a new stack frame would normally
|
||||
@@ -580,7 +584,6 @@ void GC_stop_world()
|
||||
|
||||
if (GC_notify_event)
|
||||
GC_notify_event (GC_EVENT_PRE_STOP_WORLD);
|
||||
GC_process_togglerefs ();
|
||||
|
||||
# if DEBUG_THREADS
|
||||
GC_printf1("Stopping the world from 0x%lx\n", mach_thread_self());
|
||||
@@ -733,4 +736,17 @@ void GC_darwin_register_mach_handler_thread(mach_port_t thread) {
|
||||
GC_use_mach_handler_thread = 1;
|
||||
}
|
||||
|
||||
#ifdef MONO_DEBUGGER_SUPPORTED
|
||||
GCThreadFunctions *gc_thread_vtable = NULL;
|
||||
|
||||
void *
|
||||
GC_mono_debugger_get_stack_ptr (void)
|
||||
{
|
||||
GC_thread me;
|
||||
|
||||
me = GC_lookup_thread (pthread_self ());
|
||||
return &me->stop_info.stack_ptr;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
+1
-1
@@ -6,7 +6,7 @@ Copyright (c) 1999-2004 Hewlett-Packard Development Company, L.P.
|
||||
The file linux_threads.c is also
|
||||
Copyright (c) 1998 by Fergus Henderson. All rights reserved.
|
||||
|
||||
The files Makefile.am, and configure.ac are
|
||||
The files Makefile.am, and configure.in are
|
||||
Copyright (c) 2001 by Red Hat Inc. All rights reserved.
|
||||
|
||||
Several files supporting GNU-style builds are copyrighted by the Free
|
||||
|
||||
@@ -1269,7 +1269,7 @@ Since 6.0alpha6:
|
||||
many places. (Thanks to Benjamin Lerman.)
|
||||
- Made win32_threads.c more tolerant of detaching a thread that it didn't
|
||||
know about. (Thanks to Paul Nash.)
|
||||
- Added Makefile.am and configure.ac from gcc to the distribution, with
|
||||
- Added Makefile.am and configure.in from gcc to the distribution, with
|
||||
minimal changes. For the moment, those are just placeholders. In the
|
||||
future, we're planning to switch to a GNU-style build environment for
|
||||
Un*x-like systems, though the old Makefile will remain as a backup.
|
||||
@@ -1491,7 +1491,7 @@ Since 6.1alpha3:
|
||||
- Fixed a formatting error in dbg_mlc.c. Added prototype to GC_abort()
|
||||
declaration. (Thanks to Michael Smith.)
|
||||
- Removed "source" argument to GC_find_start(). Eliminate GC_FIND_START().
|
||||
- Added win32 recognition code in configure.ac. Changed some of the
|
||||
- Added win32 recognition code in configure.in. Changed some of the
|
||||
dllimport/export defines in gc.h. (Thanks to Adam Megacz.)
|
||||
- GC_malloc_many didn't set hb_last_reclaimed when it called
|
||||
GC_reclaim_generic. (I'm not sure this matters much, but ...)
|
||||
@@ -1629,7 +1629,7 @@ Since 6.1alpha4:
|
||||
|
||||
Since 6.1alpha5:
|
||||
- Added GC_MAXIMUM_HEAP_SIZE environment variable.
|
||||
- Fix configure.ac for MIPS/LINUX. (Thanks to H.J. Lu.)
|
||||
- Fix configure.in for MIPS/LINUX. (Thanks to H.J. Lu.)
|
||||
- Double page hash table size for -DLARGE_CONFIG.
|
||||
- Integrated Bo Thorsen's X86-64 support.
|
||||
- STACKBOTTOM definition for LINUX/MIPS was partially changed back.
|
||||
@@ -1942,7 +1942,7 @@ Since 6.3alpha1:
|
||||
There is also still some code duplication with pthread_support.c.
|
||||
(Thread descriptors did become much smaller, since Ben Hutchings
|
||||
removed the thread context from them.)
|
||||
- Integrated a Solaris configure.ac patch from Rainer Orth.
|
||||
- Integrated a Solaris configure.in patch from Rainer Orth.
|
||||
- Added GC_IGNORE_FB and associated warning to very partially address
|
||||
the issue of the collector treating a mapped frame buffer as part
|
||||
of the root set. (Thanks to David Peroutka for providing some
|
||||
@@ -2151,7 +2151,7 @@ Since 6.3:
|
||||
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.)
|
||||
- Have configure.ac generate an error if it is asked to support
|
||||
- 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
|
||||
|
||||
+2
-2
@@ -26,7 +26,7 @@
|
||||
* None of this is safe with dlclose and incremental collection.
|
||||
* But then not much of anything is safe in the presence of dlclose.
|
||||
*/
|
||||
#if (defined(__linux__) || defined(__GLIBC__) || defined(__native_client__)) && !defined(_GNU_SOURCE)
|
||||
#if (defined(__linux__) || defined(__native_client__)) && !defined(_GNU_SOURCE)
|
||||
/* Can't test LINUX, since this must be define before other includes */
|
||||
# define _GNU_SOURCE
|
||||
#endif
|
||||
@@ -394,7 +394,7 @@ GC_bool GC_register_main_static_data()
|
||||
/* For glibc 2.2.4+. Unfortunately, it doesn't work for older */
|
||||
/* versions. Thanks to Jakub Jelinek for most of the code. */
|
||||
|
||||
# if (defined(LINUX) || defined (__GLIBC__) || defined(NACL)) /* Are others OK here, too? */ \
|
||||
# if (defined(LINUX) || defined(NACL)) /* Are others OK here, too? */ \
|
||||
&& (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \
|
||||
|| (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG)))
|
||||
|
||||
|
||||
+1
-175
@@ -307,172 +307,6 @@ out:
|
||||
return(0);
|
||||
}
|
||||
|
||||
/* toggleref support */
|
||||
typedef struct {
|
||||
GC_PTR strong_ref;
|
||||
GC_hidden_pointer weak_ref;
|
||||
} GCToggleRef;
|
||||
|
||||
static int (*GC_toggleref_callback) (GC_PTR obj);
|
||||
static GCToggleRef *GC_toggleref_array;
|
||||
static int GC_toggleref_array_size;
|
||||
static int GC_toggleref_array_capacity;
|
||||
|
||||
|
||||
void
|
||||
GC_process_togglerefs (void)
|
||||
{
|
||||
int i, w;
|
||||
int toggle_ref_counts [3] = { 0, 0, 0 };
|
||||
|
||||
for (i = w = 0; i < GC_toggleref_array_size; ++i) {
|
||||
int res;
|
||||
GCToggleRef r = GC_toggleref_array [i];
|
||||
|
||||
GC_PTR obj;
|
||||
|
||||
if (r.strong_ref)
|
||||
obj = r.strong_ref;
|
||||
else if (r.weak_ref)
|
||||
obj = REVEAL_POINTER (r.weak_ref);
|
||||
else
|
||||
continue;
|
||||
|
||||
res = GC_toggleref_callback (obj);
|
||||
++toggle_ref_counts [res];
|
||||
switch (res) {
|
||||
case 0:
|
||||
break;
|
||||
case 1:
|
||||
GC_toggleref_array [w].strong_ref = obj;
|
||||
GC_toggleref_array [w].weak_ref = (GC_hidden_pointer)NULL;
|
||||
++w;
|
||||
break;
|
||||
case 2:
|
||||
GC_toggleref_array [w].strong_ref = NULL;
|
||||
GC_toggleref_array [w].weak_ref = HIDE_POINTER (obj);
|
||||
++w;
|
||||
break;
|
||||
default:
|
||||
ABORT("Invalid callback result");
|
||||
}
|
||||
}
|
||||
|
||||
for (i = w; i < GC_toggleref_array_size; ++i) {
|
||||
GC_toggleref_array [w].strong_ref = NULL;
|
||||
GC_toggleref_array [w].weak_ref = (GC_hidden_pointer)NULL;
|
||||
}
|
||||
|
||||
GC_toggleref_array_size = w;
|
||||
}
|
||||
|
||||
/* Finalizer proc support */
|
||||
static void (*GC_object_finalized_proc) (GC_PTR obj);
|
||||
|
||||
void
|
||||
GC_set_finalizer_notify_proc (void (*proc) (GC_PTR obj))
|
||||
{
|
||||
GC_object_finalized_proc = proc;
|
||||
}
|
||||
|
||||
|
||||
static void push_and_mark_object (GC_PTR p)
|
||||
{
|
||||
hdr * hhdr = HDR(p);
|
||||
|
||||
PUSH_OBJ((word *)p, hhdr, GC_mark_stack_top,
|
||||
&(GC_mark_stack[GC_mark_stack_size]));
|
||||
|
||||
while (!GC_mark_stack_empty()) MARK_FROM_MARK_STACK();
|
||||
GC_set_mark_bit (p);
|
||||
if (GC_mark_state != MS_NONE)
|
||||
while (!GC_mark_some((ptr_t)0)) {}
|
||||
}
|
||||
|
||||
static void GC_mark_togglerefs ()
|
||||
{
|
||||
int i;
|
||||
if (!GC_toggleref_array)
|
||||
return;
|
||||
|
||||
GC_set_mark_bit ((GC_PTR)GC_toggleref_array);
|
||||
for (i = 0; i < GC_toggleref_array_size; ++i) {
|
||||
if (GC_toggleref_array [i].strong_ref) {
|
||||
GC_PTR object = GC_toggleref_array [i].strong_ref;
|
||||
|
||||
push_and_mark_object (object);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void GC_clear_togglerefs ()
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < GC_toggleref_array_size; ++i) {
|
||||
if (GC_toggleref_array [i].weak_ref) {
|
||||
GC_PTR object = REVEAL_POINTER (GC_toggleref_array [i].weak_ref);
|
||||
|
||||
if (!GC_is_marked (object)) {
|
||||
GC_toggleref_array [i].weak_ref = (GC_hidden_pointer)NULL; /* We defer compaction to only happen on the callback step. */
|
||||
} else {
|
||||
/*No need to copy, boehm is non-moving */
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void GC_toggleref_register_callback(int (*proccess_toggleref) (GC_PTR obj))
|
||||
{
|
||||
GC_toggleref_callback = proccess_toggleref;
|
||||
}
|
||||
|
||||
static void
|
||||
ensure_toggleref_capacity (int capacity)
|
||||
{
|
||||
if (!GC_toggleref_array) {
|
||||
GC_toggleref_array_capacity = 32;
|
||||
GC_toggleref_array = (GCToggleRef *) GC_INTERNAL_MALLOC_IGNORE_OFF_PAGE (GC_toggleref_array_capacity * sizeof (GCToggleRef), NORMAL);
|
||||
}
|
||||
if (GC_toggleref_array_size + capacity >= GC_toggleref_array_capacity) {
|
||||
GCToggleRef *tmp;
|
||||
int old_capacity = GC_toggleref_array_capacity;
|
||||
while (GC_toggleref_array_capacity < GC_toggleref_array_size + capacity)
|
||||
GC_toggleref_array_capacity *= 2;
|
||||
|
||||
tmp = (GCToggleRef *) GC_INTERNAL_MALLOC_IGNORE_OFF_PAGE (GC_toggleref_array_capacity * sizeof (GCToggleRef), NORMAL);
|
||||
memcpy (tmp, GC_toggleref_array, GC_toggleref_array_size * sizeof (GCToggleRef));
|
||||
GC_INTERNAL_FREE (GC_toggleref_array);
|
||||
GC_toggleref_array = tmp;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
GC_toggleref_add (GC_PTR object, int strong_ref)
|
||||
{
|
||||
DCL_LOCK_STATE;
|
||||
# ifdef THREADS
|
||||
DISABLE_SIGNALS();
|
||||
LOCK();
|
||||
# endif
|
||||
|
||||
if (!GC_toggleref_callback)
|
||||
goto end;
|
||||
|
||||
ensure_toggleref_capacity (1);
|
||||
GC_toggleref_array [GC_toggleref_array_size].strong_ref = strong_ref ? object : NULL;
|
||||
GC_toggleref_array [GC_toggleref_array_size].weak_ref = strong_ref ? (GC_hidden_pointer)NULL : HIDE_POINTER (object);
|
||||
++GC_toggleref_array_size;
|
||||
|
||||
end:
|
||||
# ifdef THREADS
|
||||
UNLOCK();
|
||||
ENABLE_SIGNALS();
|
||||
# endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
# if defined(__STDC__) || defined(__cplusplus)
|
||||
int GC_register_long_link(GC_PTR * link, GC_PTR obj)
|
||||
@@ -845,9 +679,7 @@ void GC_finalize()
|
||||
ptr_t real_ptr;
|
||||
register int i;
|
||||
int fo_size = (log_fo_table_size == -1 ) ? 0 : (1 << log_fo_table_size);
|
||||
|
||||
GC_mark_togglerefs();
|
||||
|
||||
|
||||
/* Make non-tracking disappearing links disappear */
|
||||
GC_make_disappearing_links_disappear(&GC_dl_hashtbl);
|
||||
|
||||
@@ -886,10 +718,6 @@ void GC_finalize()
|
||||
fo_set_next(prev_fo, next_fo);
|
||||
}
|
||||
GC_fo_entries--;
|
||||
|
||||
if (GC_object_finalized_proc)
|
||||
GC_object_finalized_proc (real_ptr);
|
||||
|
||||
/* Add to list of objects awaiting finalization. */
|
||||
fo_set_next(curr_fo, GC_finalize_now);
|
||||
GC_finalize_now = curr_fo;
|
||||
@@ -927,8 +755,6 @@ void GC_finalize()
|
||||
/* Remove dangling disappearing links. */
|
||||
GC_remove_dangling_disappearing_links(&GC_dl_hashtbl);
|
||||
|
||||
GC_clear_togglerefs ();
|
||||
|
||||
/* Make long links disappear and remove dangling ones. */
|
||||
GC_make_disappearing_links_disappear(&GC_ll_hashtbl);
|
||||
GC_remove_dangling_disappearing_links(&GC_ll_hashtbl);
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
noinst_HEADERS = libgc-mono-debugger.h
|
||||
|
||||
EXTRA_DIST = $(srcdir)/*.h
|
||||
|
||||
SUBDIRS = private
|
||||
+1
-14
@@ -429,10 +429,6 @@ GC_API size_t GC_get_total_bytes GC_PROTO((void));
|
||||
/* Return -1 otherwise. */
|
||||
int GC_get_suspend_signal GC_PROTO((void));
|
||||
|
||||
/* Return the signal used by the gc to resume threads on posix platforms. */
|
||||
/* Return -1 otherwise. */
|
||||
int GC_get_restart_signal GC_PROTO((void));
|
||||
|
||||
/* Disable garbage collection. Even GC_gcollect calls will be */
|
||||
/* ineffective. */
|
||||
GC_API void GC_disable GC_PROTO((void));
|
||||
@@ -497,7 +493,7 @@ GC_API GC_PTR GC_malloc_atomic_ignore_off_page GC_PROTO((size_t lb));
|
||||
# define GC_RETURN_ADDR (GC_word)__return_address
|
||||
#endif
|
||||
|
||||
#if defined(__linux__) || defined(__GLIBC__)
|
||||
#ifdef __linux__
|
||||
# include <features.h>
|
||||
# if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
|
||||
&& !defined(__ia64__)
|
||||
@@ -773,15 +769,6 @@ GC_API int GC_unregister_disappearing_link GC_PROTO((GC_PTR * /* link */));
|
||||
GC_API int GC_register_long_link GC_PROTO((GC_PTR * /* link */, GC_PTR obj));
|
||||
GC_API int GC_unregister_long_link GC_PROTO((GC_PTR * /* link */));
|
||||
|
||||
|
||||
/* toggleref support */
|
||||
GC_API void GC_toggleref_register_callback GC_PROTO((int (*proccess_toggleref) (GC_PTR obj)));
|
||||
GC_API void GC_toggleref_add (GC_PTR object, int strong_ref);
|
||||
|
||||
/* finalizer callback support */
|
||||
GC_API void GC_set_finalizer_notify_proc GC_PROTO((void (*object_finalized) (GC_PTR obj)));
|
||||
|
||||
|
||||
/* Returns !=0 if GC_invoke_finalizers has something to do. */
|
||||
GC_API int GC_should_invoke_finalizers GC_PROTO((void));
|
||||
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
#ifndef LIBGC_MONO_DEBUGGER_H
|
||||
#define LIBGC_MONO_DEBUGGER_H
|
||||
|
||||
#if defined(_IN_LIBGC) || defined(_IN_THE_MONO_DEBUGGER)
|
||||
|
||||
typedef struct
|
||||
{
|
||||
void (* initialize) (void);
|
||||
|
||||
void (* thread_created) (pthread_t tid, void *stack_ptr);
|
||||
void (* thread_exited) (pthread_t tid, void *stack_ptr);
|
||||
|
||||
void (* stop_world) (void);
|
||||
void (* start_world) (void);
|
||||
} GCThreadFunctions;
|
||||
|
||||
extern GCThreadFunctions *gc_thread_vtable;
|
||||
|
||||
extern void *
|
||||
GC_mono_debugger_get_stack_ptr (void);
|
||||
|
||||
#else
|
||||
#error "This header is only intended to be used by the Mono Debugger"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1454,10 +1454,6 @@ GC_bool GC_is_tmp_root GC_PROTO((ptr_t p));
|
||||
void GC_register_dynamic_libraries GC_PROTO((void));
|
||||
/* Add dynamic library data sections to the root set. */
|
||||
|
||||
void GC_cond_register_dynamic_libraries GC_PROTO((void));
|
||||
/* Remove and reregister dynamic libraries if we're */
|
||||
/* configured to do that at each GC. */
|
||||
|
||||
GC_bool GC_register_main_static_data GC_PROTO((void));
|
||||
/* We need to register the main data segment. Returns */
|
||||
/* TRUE unless this is done implicitly as part of */
|
||||
@@ -1692,9 +1688,6 @@ void GC_finalize GC_PROTO((void));
|
||||
/* for processing by GC_invoke_finalizers. */
|
||||
/* Invoked with lock. */
|
||||
|
||||
void GC_process_togglerefs (void);
|
||||
/*Process the togglerefs before GC starts */
|
||||
|
||||
void GC_notify_or_invoke_finalizers GC_PROTO((void));
|
||||
/* If GC_finalize_on_demand is not set, invoke */
|
||||
/* eligible finalizers. Otherwise: */
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
# endif
|
||||
|
||||
/* And one for FreeBSD: */
|
||||
# if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__)) && !defined(FREEBSD)
|
||||
# if defined(__FreeBSD__) && !defined(FREEBSD)
|
||||
# define FREEBSD
|
||||
# endif
|
||||
|
||||
@@ -1371,15 +1371,8 @@
|
||||
# ifndef GC_FREEBSD_THREADS
|
||||
# define MPROTECT_VDB
|
||||
# endif
|
||||
# ifdef __GLIBC__
|
||||
# define SIG_SUSPEND (32+6)
|
||||
# define SIG_THR_RESTART (32+5)
|
||||
extern int _end[];
|
||||
# define DATAEND (_end)
|
||||
# else
|
||||
# define SIG_SUSPEND SIGTSTP
|
||||
# define SIG_THR_RESTART SIGCONT
|
||||
# endif
|
||||
# define SIG_SUSPEND SIGTSTP
|
||||
# define SIG_THR_RESTART SIGCONT
|
||||
# define FREEBSD_STACKBOTTOM
|
||||
# ifdef __ELF__
|
||||
# define DYNAMIC_LOADING
|
||||
@@ -2139,15 +2132,8 @@
|
||||
# ifndef GC_FREEBSD_THREADS
|
||||
# define MPROTECT_VDB
|
||||
# endif
|
||||
# ifdef __GLIBC__
|
||||
# define SIG_SUSPEND (32+6)
|
||||
# define SIG_THR_RESTART (32+5)
|
||||
extern int _end[];
|
||||
# define DATAEND (_end)
|
||||
# else
|
||||
# define SIG_SUSPEND SIGUSR1
|
||||
# define SIG_THR_RESTART SIGUSR2
|
||||
# endif
|
||||
# define SIG_SUSPEND SIGTSTP
|
||||
# define SIG_THR_RESTART SIGCONT
|
||||
# define NEED_FIND_LIMIT
|
||||
# define FREEBSD_STACKBOTTOM
|
||||
# ifdef __ELF__
|
||||
@@ -2244,7 +2230,7 @@
|
||||
# define SUNOS5SIGS
|
||||
# endif
|
||||
|
||||
# if defined(FREEBSD) && ((__FreeBSD__ >= 4) || (__FreeBSD_kernel__ >= 4))
|
||||
# if defined(FREEBSD) && (__FreeBSD__ >= 4)
|
||||
# define SUNOS5SIGS
|
||||
# endif
|
||||
|
||||
@@ -2307,7 +2293,7 @@
|
||||
# define CACHE_LINE_SIZE 32 /* Wild guess */
|
||||
# endif
|
||||
|
||||
# if defined(LINUX) || defined(__GLIBC__)
|
||||
# ifdef LINUX
|
||||
# define REGISTER_LIBRARIES_EARLY
|
||||
/* We sometimes use dl_iterate_phdr, which may acquire an internal */
|
||||
/* lock. This isn't safe after the world has stopped. So we must */
|
||||
@@ -2388,7 +2374,7 @@
|
||||
#if defined(SPARC)
|
||||
# define CAN_SAVE_CALL_ARGS
|
||||
#endif
|
||||
#if (defined(I386) || defined(X86_64)) && (defined(LINUX) || defined(__GLIBC__))
|
||||
#if (defined(I386) || defined(X86_64)) && defined(LINUX)
|
||||
/* SAVE_CALL_CHAIN is supported if the code is compiled to save */
|
||||
/* frame pointers by default, i.e. no -fomit-frame-pointer flag. */
|
||||
# define CAN_SAVE_CALL_ARGS
|
||||
|
||||
@@ -375,15 +375,8 @@ ptr_t GC_approx_sp()
|
||||
/* doing something wrong. */
|
||||
# ifdef _MSC_VER
|
||||
# pragma warning(disable:4172)
|
||||
# endif
|
||||
# if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 408)
|
||||
# pragma GCC diagnostic push
|
||||
# pragma GCC diagnostic ignored "-Wreturn-local-addr"
|
||||
# endif
|
||||
return((ptr_t)(&dummy));
|
||||
# if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 408)
|
||||
# pragma GCC diagnostic pop
|
||||
# endif
|
||||
# ifdef _MSC_VER
|
||||
# pragma warning(default:4172)
|
||||
# endif
|
||||
|
||||
@@ -480,17 +480,6 @@ int GC_get_suspend_signal GC_PROTO(())
|
||||
#endif
|
||||
}
|
||||
|
||||
int GC_get_restart_signal GC_PROTO(())
|
||||
{
|
||||
#if defined(SIG_THR_RESTART) && defined(GC_PTHREADS) && !defined(GC_MACOSX_THREADS) && !defined(GC_OPENBSD_THREADS)
|
||||
return SIG_THR_RESTART;
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
GC_bool GC_is_initialized = FALSE;
|
||||
|
||||
void GC_init()
|
||||
|
||||
@@ -19,6 +19,10 @@
|
||||
#undef PACKAGE_VERSION
|
||||
#include "mono/utils/mono-compiler.h"
|
||||
|
||||
#ifdef MONO_DEBUGGER_SUPPORTED
|
||||
#include "include/libgc-mono-debugger.h"
|
||||
#endif
|
||||
|
||||
#ifdef NACL
|
||||
volatile int __nacl_thread_suspension_needed = 0;
|
||||
pthread_t nacl_thread_parker = -1;
|
||||
@@ -611,7 +615,6 @@ void GC_stop_world()
|
||||
{
|
||||
if (GC_notify_event)
|
||||
GC_notify_event (GC_EVENT_PRE_STOP_WORLD);
|
||||
GC_process_togglerefs ();
|
||||
/* 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, */
|
||||
@@ -622,6 +625,11 @@ void GC_stop_world()
|
||||
/* We should have previously waited for it to become zero. */
|
||||
# endif /* PARALLEL_MARK */
|
||||
++GC_stop_count;
|
||||
#ifdef MONO_DEBUGGER_SUPPORTED
|
||||
if (gc_thread_vtable && gc_thread_vtable->stop_world)
|
||||
gc_thread_vtable->stop_world ();
|
||||
else
|
||||
#endif
|
||||
pthread_stop_world ();
|
||||
# ifdef PARALLEL_MARK
|
||||
GC_release_mark_lock();
|
||||
@@ -709,6 +717,11 @@ static void pthread_start_world()
|
||||
|
||||
void GC_start_world()
|
||||
{
|
||||
#ifdef MONO_DEBUGGER_SUPPORTED
|
||||
if (gc_thread_vtable && gc_thread_vtable->start_world)
|
||||
gc_thread_vtable->start_world();
|
||||
else
|
||||
#endif
|
||||
pthread_start_world ();
|
||||
}
|
||||
|
||||
@@ -760,7 +773,27 @@ static void pthread_stop_init() {
|
||||
/* We hold the allocation lock. */
|
||||
void GC_stop_init()
|
||||
{
|
||||
#ifdef MONO_DEBUGGER_SUPPORTED
|
||||
if (gc_thread_vtable && gc_thread_vtable->initialize)
|
||||
gc_thread_vtable->initialize ();
|
||||
else
|
||||
#endif
|
||||
pthread_stop_init ();
|
||||
}
|
||||
|
||||
#ifdef MONO_DEBUGGER_SUPPORTED
|
||||
|
||||
GCThreadFunctions *gc_thread_vtable = NULL;
|
||||
|
||||
void *
|
||||
GC_mono_debugger_get_stack_ptr (void)
|
||||
{
|
||||
GC_thread me;
|
||||
|
||||
me = GC_lookup_thread (pthread_self ());
|
||||
return &me->stop_info.stack_ptr;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -222,6 +222,10 @@ static int GC_setspecific (GC_key_t key, void *value) {
|
||||
|
||||
static GC_bool keys_initialized;
|
||||
|
||||
#ifdef MONO_DEBUGGER_SUPPORTED
|
||||
#include "include/libgc-mono-debugger.h"
|
||||
#endif
|
||||
|
||||
/* Recover the contents of the freelist array fl into the global one gfl.*/
|
||||
/* Note that the indexing scheme differs, in that gfl has finer size */
|
||||
/* resolution, even if not all entries are used. */
|
||||
@@ -800,6 +804,10 @@ void GC_delete_thread(pthread_t id)
|
||||
} else {
|
||||
prev -> next = p -> next;
|
||||
}
|
||||
#ifdef MONO_DEBUGGER_SUPPORTED
|
||||
if (gc_thread_vtable && gc_thread_vtable->thread_exited)
|
||||
gc_thread_vtable->thread_exited (id, &p->stop_info.stack_ptr);
|
||||
#endif
|
||||
|
||||
#ifdef GC_DARWIN_THREADS
|
||||
mach_port_deallocate(mach_task_self(), p->stop_info.mach_thread);
|
||||
@@ -1116,6 +1124,14 @@ void GC_thr_init()
|
||||
t -> stop_info.stack_ptr = (ptr_t)(&dummy);
|
||||
# endif
|
||||
t -> flags = DETACHED | MAIN_THREAD;
|
||||
#ifdef MONO_DEBUGGER_SUPPORTED
|
||||
if (gc_thread_vtable && gc_thread_vtable->thread_created)
|
||||
# ifdef GC_DARWIN_THREADS
|
||||
gc_thread_vtable->thread_created (mach_thread_self (), &t->stop_info.stack_ptr);
|
||||
# else
|
||||
gc_thread_vtable->thread_created (pthread_self (), &t->stop_info.stack_ptr);
|
||||
# endif
|
||||
#endif
|
||||
if (pthread_self () == main_pthread_self) {
|
||||
t->stack = main_stack;
|
||||
t->stack_size = main_stack_size;
|
||||
@@ -1445,6 +1461,14 @@ void * GC_start_routine_head(void * arg, void *base_addr,
|
||||
/* This is also < 100% convincing. We should also read this */
|
||||
/* from /proc, but the hook to do so isn't there yet. */
|
||||
# endif /* IA64 */
|
||||
#ifdef MONO_DEBUGGER_SUPPORTED
|
||||
if (gc_thread_vtable && gc_thread_vtable->thread_created)
|
||||
# ifdef GC_DARWIN_THREADS
|
||||
gc_thread_vtable->thread_created (mach_thread_self(), &me->stop_info.stack_ptr);
|
||||
# else
|
||||
gc_thread_vtable->thread_created (my_pthread, &me->stop_info.stack_ptr);
|
||||
# endif
|
||||
#endif
|
||||
UNLOCK();
|
||||
|
||||
if (start) *start = si -> start_routine;
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
/* The version here should match that in configure/configure.ac */
|
||||
/* The version here should match that in configure/configure.in */
|
||||
/* Eventually this one may become unnecessary. For now we need */
|
||||
/* it to keep the old-style build process working. */
|
||||
#define GC_TMP_VERSION_MAJOR 6
|
||||
@@ -14,7 +14,7 @@
|
||||
GC_TMP_VERSION_MINOR != GC_VERSION_MINOR || \
|
||||
defined(GC_ALPHA_VERSION) != (GC_TMP_ALPHA_VERSION != GC_NOT_ALPHA) || \
|
||||
defined(GC_ALPHA_VERSION) && GC_TMP_ALPHA_VERSION != GC_ALPHA_VERSION
|
||||
# error Inconsistent version info. Check README, version.h, and configure.ac.
|
||||
# error Inconsistent version info. Check README, version.h, and configure.in.
|
||||
# endif
|
||||
#else
|
||||
# define GC_VERSION_MAJOR GC_TMP_VERSION_MAJOR
|
||||
|
||||
@@ -24,7 +24,7 @@ AC_DEFUN([AM_PO_SUBDIRS],
|
||||
[
|
||||
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
|
||||
AC_REQUIRE([AC_PROG_INSTALL])dnl
|
||||
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
|
||||
AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
|
||||
AC_REQUIRE([AM_NLS])dnl
|
||||
|
||||
dnl Release version of the gettext macros. This is used to ensure that
|
||||
|
||||
+18
-45
@@ -265,12 +265,6 @@ instructs the Mono runtime to start debugging in server mode, where Mono
|
||||
actively waits for the debugger front end to connect to the Mono process.
|
||||
Mono will print out to stdout the IP address and port where it is listening.
|
||||
.TP
|
||||
.I setpgid=[y/n]
|
||||
If set to yes, Mono will call \fBsetpgid(0, 0)\fB on startup, if that function
|
||||
is available on the system. This is useful for ensuring that signals delivered
|
||||
to a process that is executing the debuggee are not propagated to the debuggee,
|
||||
e.g. when Ctrl-C sends \fBSIGINT\fB to the \fBsdb\fB tool.
|
||||
.TP
|
||||
.I suspend=[y/n]
|
||||
Defaults to yes, with the default option Mono will suspend the vm on startup
|
||||
until it connects successfully to a debugger front end. If you set it to 'n', in
|
||||
@@ -937,11 +931,11 @@ Override the automatic cpu detection mechanism. Currently used only on arm.
|
||||
The format of the value is as follows:
|
||||
.nf
|
||||
|
||||
"armvV [thumb[2]]"
|
||||
"armvV [thumb]"
|
||||
|
||||
.fi
|
||||
where V is the architecture number 4, 5, 6, 7 and the options can be currently be
|
||||
"thumb" or "thumb2". Example:
|
||||
"thunb". Example:
|
||||
.nf
|
||||
|
||||
MONO_CPU_ARCH="armv4 thumb" mono ...
|
||||
@@ -1075,10 +1069,19 @@ first generation (of two). A larger nursery will usually speed up the
|
||||
program but will obviously use more memory. The default nursery size
|
||||
4 MB.
|
||||
.TP
|
||||
\fBmajor=\fIcollector\fR Specifies which major collector to use.
|
||||
Options are `marksweep' for the Mark&Sweep collector, and
|
||||
`marksweep-conc' for concurrent Mark&Sweep. The non-concurrent
|
||||
Mark&Sweep collector is the default.
|
||||
\fBmajor=\fIcollector\fR
|
||||
Specifies which major collector to use. Options are `marksweep' for
|
||||
the Mark&Sweep collector, `marksweep-conc' for concurrent Mark&Sweep,
|
||||
`marksweep-par' for parallel Mark&Sweep, `marksweep-fixed' for
|
||||
Mark&Sweep with a fixed heap, and `marksweep-fixed-par' for parallel
|
||||
Mark&Sweep with a fixed heap. The Mark&Sweep collector is the default.
|
||||
.TP
|
||||
\fBmajor-heap-size=\fIsize\fR
|
||||
Sets the size of the major heap (not including the large object space)
|
||||
for the fixed-heap Mark&Sweep collector (i.e. `marksweep-fixed' and
|
||||
`marksweep-fixed-par'). The size is in bytes, with optional suffixes
|
||||
`k', `m' and `g' to specify kilo-, mega- and gigabytes, respectively.
|
||||
The default is 512 megabytes.
|
||||
.TP
|
||||
\fBsoft-heap-limit=\fIsize\fR
|
||||
Once the heap size gets larger than this size, ignore what the default
|
||||
@@ -1207,17 +1210,6 @@ is used.
|
||||
Performs a check to make sure that no references are left to an
|
||||
unloaded AppDomain.
|
||||
.TP
|
||||
\fBclear-at-tlab-creation\fR
|
||||
Clears the nursery incrementally when the thread local allocation
|
||||
buffers (TLAB) are created. The default setting clears the whole
|
||||
nursery at GC time.
|
||||
.TP
|
||||
\fBdebug-clear-at-tlab-creation\fR
|
||||
Clears the nursery incrementally when the thread local allocation
|
||||
buffers (TLAB) are created, but at GC time fills it with the byte
|
||||
`0xff`, which should result in a crash more quickly if
|
||||
`clear-at-tlab-creation` doesn't work properly.
|
||||
.TP
|
||||
\fBclear-at-gc\fR
|
||||
This clears the nursery at GC time instead of doing it when the thread
|
||||
local allocation buffer (TLAB) is created. The default is to clear
|
||||
@@ -1257,11 +1249,6 @@ work, Mono needs to be compiled with the BINARY_PROTOCOL define on
|
||||
sgen-gc.c. You can then use this command to explore the output
|
||||
.nf
|
||||
sgen-grep-binprot 0x1234 0x5678 < file
|
||||
.TP
|
||||
\fBnursery-canaries\fR
|
||||
If set, objects allocated in the nursery are suffixed with a canary (guard)
|
||||
word, which is checked on each minor collection. Can be used to detect/debug
|
||||
heap corruption issues.
|
||||
.fi
|
||||
.ne
|
||||
.RE
|
||||
@@ -1363,8 +1350,6 @@ loader in subtle ways.
|
||||
Directories are separated by the platform path separator (colons on unix). Example:
|
||||
.B /home/username/lib:/usr/local/mono/lib
|
||||
.Sp
|
||||
Relative paths are resolved based on the launch-time current directory.
|
||||
.Sp
|
||||
Alternative solutions to MONO_PATH include: installing libraries into
|
||||
the Global Assembly Cache (see gacutil(1)) or having the dependent
|
||||
libraries side-by-side with the main executable.
|
||||
@@ -1426,9 +1411,9 @@ small embedded systems.
|
||||
The default is 180 seconds.
|
||||
.TP
|
||||
\fBMONO_THREADS_PER_CPU\fR
|
||||
The minimum number of threads in the general threadpool will be
|
||||
MONO_THREADS_PER_CPU * number of CPUs. The default value for this
|
||||
variable is 1.
|
||||
The maximum number of threads in the general threadpool will be
|
||||
20 + (MONO_THREADS_PER_CPU * number of CPUs). The default value for this
|
||||
variable is 10.
|
||||
.TP
|
||||
\fBMONO_XMLSERIALIZER_THS\fR
|
||||
Controls the threshold for the XmlSerializer to produce a custom
|
||||
@@ -1543,12 +1528,6 @@ after a SIGSEGV or SIGABRT in unmanaged code.
|
||||
This option will suspend the program when a native SIGSEGV is received.
|
||||
This is useful for debugging crashes which do not happen under gdb,
|
||||
since a live process contains more information than a core file.
|
||||
.TP
|
||||
\fBcheck-pinvoke-callconv\fR
|
||||
This option causes the runtime to check for calling convention
|
||||
mismatches when using pinvoke, i.e. mixing cdecl/stdcall. It only
|
||||
works on windows. If a mismatch is detected, an
|
||||
ExecutionEngineException is thrown.
|
||||
.ne
|
||||
.RE
|
||||
.TP
|
||||
@@ -1653,12 +1632,6 @@ method.
|
||||
\fBMONO_VERBOSE_HWCAP\fR
|
||||
If set, makes the JIT output information about detected CPU features
|
||||
(such as SSE, CMOV, FCMOV, etc) to stdout.
|
||||
.TP
|
||||
\fBMONO_CONSERVATIVE_HWCAP\fR
|
||||
If set, the JIT will not perform any hardware capability detection. This
|
||||
may be useful to pinpoint the cause of JIT issues. This is the default
|
||||
when Mono is built as an AOT cross compiler, so that the generated code
|
||||
will run on most hardware.
|
||||
.SH VALGRIND
|
||||
If you want to use Valgrind, you will find the file `mono.supp'
|
||||
useful, it contains the suppressions for the GC which trigger
|
||||
|
||||
@@ -211,15 +211,6 @@ The following commands are available:
|
||||
.IP \[bu] 2
|
||||
\f[I]heapshot\f[]: perform a heapshot as soon as possible
|
||||
.RE
|
||||
.IP \[bu] 2
|
||||
\f[I]counters\f[]: sample counters values every 1 second. This allow
|
||||
a really lightweight way to have insight in some of the runtime key
|
||||
metrics. Counters displayed in non verbose mode are : Methods from AOT,
|
||||
Methods JITted using mono JIT, Methods JITted using LLVM, Total time
|
||||
spent JITting (sec), User Time, System Time, Total Time, Working Set,
|
||||
Private Bytes, Virtual Bytes, Page Faults and CPU Load Average (1min,
|
||||
5min and 15min).
|
||||
.RE
|
||||
.SS Analyzing the profile data
|
||||
.PP
|
||||
Currently there is a command line program (\f[I]mprof-report\f[])
|
||||
@@ -293,16 +284,6 @@ where \f[I]MODE\f[] can be:
|
||||
.IP \[bu] 2
|
||||
\f[I]bytes\f[]: the total number of bytes used by objects of the
|
||||
given type
|
||||
.PP
|
||||
To change the sort order of counters, use the option:
|
||||
.PP
|
||||
\f[B]--counters-sort=MODE\f[]
|
||||
.PP
|
||||
where \f[I]MODE\f[] can be:
|
||||
.IP \[bu] 2
|
||||
\f[I]time\f[]: sort values by time then category
|
||||
.IP \[bu] 2
|
||||
\f[I]category\f[]: sort values by category then time
|
||||
.SS Selecting what data to report
|
||||
.PP
|
||||
The profiler by default collects data about many runtime subsystems
|
||||
@@ -338,8 +319,6 @@ version
|
||||
\f[I]thread\f[]: thread information
|
||||
.IP \[bu] 2
|
||||
\f[I]heapshot\f[]: live heap usage at heap shots
|
||||
.IP \[bu] 2
|
||||
\f[I]counters\f[]: counters samples
|
||||
.PP
|
||||
It is possible to limit some of the data displayed to a timeframe
|
||||
of the program execution with the option:
|
||||
|
||||
+3
-8
@@ -10,13 +10,10 @@ net_2_0_SUBDIRS := build class nunit24 ilasm tools tests errors docs
|
||||
monodroid_SUBDIRS := build class
|
||||
monotouch_SUBDIRS := build class
|
||||
monotouch_runtime_SUBDIRS := build class
|
||||
xammac_SUBDIRS := build class
|
||||
mobile_SUBDIRS := build class
|
||||
mobile_static_SUBDIRS := build class
|
||||
net_3_5_SUBDIRS := build class tools/xbuild
|
||||
net_4_0_SUBDIRS := build class
|
||||
net_4_5_SUBDIRS := build mcs class nunit24 ilasm tools tests errors docs
|
||||
xbuild_12_SUBDIRS := build class tools/xbuild
|
||||
|
||||
# List of test subdirs that should pass 100%
|
||||
centum_tests := \
|
||||
@@ -25,6 +22,7 @@ centum_tests := \
|
||||
class/System.XML \
|
||||
class/Commons.Xml.Relaxng \
|
||||
class/Cscompmgd \
|
||||
class/Microsoft.JScript \
|
||||
class/Mono.Posix \
|
||||
class/Mono.Security \
|
||||
class/System.Design \
|
||||
@@ -83,11 +81,11 @@ all-local $(STD_TARGETS:=-local):
|
||||
@:
|
||||
|
||||
dir-check:
|
||||
@if [ "$(NO_DIR_CHECK)" = "" -a "$(PROFILE)" != "basic" ]; then $(MAKE) -C ../runtime; fi
|
||||
@if [ "$(NO_DIR_CHECK)" = "" -a "$(PROFILE)" != "basic" ]; then make -C ../runtime; fi
|
||||
|
||||
# fun specialty targets
|
||||
|
||||
PROFILES = net_2_0 net_3_5 net_4_0 net_4_5 xbuild_12
|
||||
PROFILES = net_2_0 net_3_5 net_4_0 net_4_5
|
||||
|
||||
.PHONY: all-profiles $(STD_TARGETS:=-profiles)
|
||||
all-profiles $(STD_TARGETS:=-profiles): %-profiles: profiles-do--%
|
||||
@@ -106,16 +104,13 @@ profiles-do--run-test:
|
||||
|
||||
# Orchestrate the bootstrap here.
|
||||
_boot_ = all clean install
|
||||
$(_boot_:%=profile-do--xbuild_12--%): profile-do--xbuild_12--%: profile-do--net_4_5--%
|
||||
$(_boot_:%=profile-do--net_4_5--%): profile-do--net_4_5--%: profile-do--build--%
|
||||
$(_boot_:%=profile-do--net_4_0--%): profile-do--net_4_0--%: profile-do--build--%
|
||||
$(_boot_:%=profile-do--net_3_5--%): profile-do--net_3_5--%: profile-do--net_2_0--%
|
||||
$(_boot_:%=profile-do--monodroid--%): profile-do--monodroid--%: profile-do--build--%
|
||||
$(_boot_:%=profile-do--monotouch--%): profile-do--monotouch--%: profile-do--build--%
|
||||
$(_boot_:%=profile-do--monotouch_runtime--%): profile-do--monotouch_runtime--%: profile-do--build--%
|
||||
$(_boot_:%=profile-do--xammac--%): profile-do--xammac--%: profile-do--build--%
|
||||
$(_boot_:%=profile-do--mobile--%): profile-do--mobile--%: profile-do--build--%
|
||||
$(_boot_:%=profile-do--mobile_static--%): profile-do--mobile_static--%: profile-do--build--%
|
||||
$(_boot_:%=profile-do--net_2_0--%): profile-do--net_2_0--%: profile-do--build--%
|
||||
$(_boot_:%=profile-do--build--%): profile-do--build--%: profile-do--basic--%
|
||||
|
||||
|
||||
+1
-2
@@ -21,8 +21,7 @@ PROFILES = \
|
||||
net_2_0 \
|
||||
net_3_5 \
|
||||
net_4_0 \
|
||||
net_4_5 \
|
||||
xbuild_12
|
||||
net_4_5
|
||||
|
||||
COMMON_SRCS = \
|
||||
Consts.cs.in \
|
||||
|
||||
@@ -119,9 +119,7 @@ static class Consts
|
||||
public const string WindowsBase_3_0 = "WindowsBase, Version=3.0.0.0, PublicKeyToken=31bf3856ad364e35";
|
||||
public const string AssemblyWindowsBase = "WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";
|
||||
public const string AssemblyPresentationCore_3_5 = "PresentationCore, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";
|
||||
public const string AssemblyPresentationCore_4_0 = "PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";
|
||||
public const string AssemblyPresentationFramework_3_5 = "PresentationFramework, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";
|
||||
public const string AssemblySystemServiceModel_3_0 = "System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
|
||||
#elif NET_2_1
|
||||
public const string AssemblySystem_Core = "System.Core, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b77a5c561934e089";
|
||||
#elif NET_2_0
|
||||
|
||||
+7
-19
@@ -61,24 +61,10 @@ lib_dir = lib
|
||||
endif
|
||||
|
||||
ifdef LIBRARY_SUBDIR
|
||||
the_libdir_base = $(topdir)/class/$(lib_dir)/$(PROFILE)/$(LIBRARY_SUBDIR)/
|
||||
the_libdir = $(topdir)/class/$(lib_dir)/$(PROFILE)/$(LIBRARY_SUBDIR)/
|
||||
else
|
||||
the_libdir_base = $(topdir)/class/$(lib_dir)/$(PROFILE)/
|
||||
the_libdir = $(topdir)/class/$(lib_dir)/$(PROFILE)/
|
||||
endif
|
||||
|
||||
#
|
||||
# The bare directory contains the plain versions of System and System.Xml
|
||||
#
|
||||
bare_libdir = $(the_libdir_base)bare
|
||||
|
||||
#
|
||||
# The secxml directory contains the System version that depends on
|
||||
# System.Xml and Mono.Security
|
||||
#
|
||||
secxml_libdir = $(the_libdir_base)secxml
|
||||
|
||||
the_libdir = $(the_libdir_base)$(intermediate)
|
||||
|
||||
ifdef LIBRARY_NEEDS_POSTPROCESSING
|
||||
build_libdir = fixup/$(PROFILE)/
|
||||
else
|
||||
@@ -124,9 +110,11 @@ endif
|
||||
|
||||
csproj-local: csproj-library csproj-test
|
||||
|
||||
intermediate_clean=$(subst /,-,$(intermediate))
|
||||
csproj-library:
|
||||
config_file=`basename $(LIBRARY) .dll`-$(intermediate_clean)$(PROFILE).input; \
|
||||
# to overcome the issues with circular dependencies, we'll create csprojs with a counter increment.
|
||||
# This is more amenable for use in VS solutions to reference projects rather than transient dll files in the build process.
|
||||
csproj-library:
|
||||
config_file=`basename $(LIBRARY) .dll`-$(PROFILE).input; \
|
||||
for counter in 1 2 3 4 5 ; do if test -f $(topdir)/../msvc/scripts/inputs/$$config_file ; then config_file=`basename $(LIBRARY) .dll`-$(PROFILE)-$$counter.input; fi ; done ;\
|
||||
echo $(thisdir):$$config_file >> $(topdir)/../msvc/scripts/order; \
|
||||
(echo $(is_boot); \
|
||||
echo $(USE_MCS_FLAGS) $(LIBRARY_FLAGS) $(LIB_MCS_FLAGS); \
|
||||
|
||||
@@ -65,7 +65,7 @@ do-profile-check: $(depsdir)/.stamp
|
||||
$(MAKE) -s do-profile-check-monolite ; \
|
||||
else \
|
||||
echo "*** The compiler '$(BOOTSTRAP_MCS)' doesn't appear to be usable." 1>&2; \
|
||||
echo "*** You need Mono version 2.10 or better installed to build MCS" 1>&2 ; \
|
||||
echo "*** You need Mono version 2.4 or better installed to build MCS" 1>&2 ; \
|
||||
echo "*** Check mono README for information on how to bootstrap a Mono installation." 1>&2 ; \
|
||||
exit 1; fi; fi
|
||||
|
||||
|
||||
@@ -12,22 +12,7 @@ profile-check:
|
||||
@:
|
||||
|
||||
DEFAULT_REFERENCES = -r:mscorlib.dll
|
||||
|
||||
PROFILE_MCS_FLAGS = \
|
||||
-d:NET_1_1 \
|
||||
-d:NET_2_0 \
|
||||
-d:NET_2_1 \
|
||||
-d:MOBILE \
|
||||
-d:MOBILE_DYNAMIC \
|
||||
-d:NET_3_5 \
|
||||
-d:NET_4_0 \
|
||||
-d:NET_4_5 \
|
||||
-nowarn:1699 \
|
||||
-nostdlib \
|
||||
-lib:$(topdir)/class/lib/$(PROFILE) \
|
||||
$(DEFAULT_REFERENCES) \
|
||||
$(PLATFORM_DEBUG_FLAGS)
|
||||
|
||||
PROFILE_MCS_FLAGS = -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:MOBILE -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -nowarn:1699 -nostdlib -lib:$(topdir)/class/lib/$(PROFILE) $(DEFAULT_REFERENCES) $(PLATFORM_DEBUG_FLAGS)
|
||||
FRAMEWORK_VERSION = 2.1
|
||||
|
||||
NO_INSTALL = yes
|
||||
Loaded 100 of 11831 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user