Compare commits

..
191 Commits
Author SHA1 Message Date
Daniel J Sell 5d600522ed [asp.net] Fix for bug #653192. making MasterPageFile handle relative paths
MasterPageFile should be relative to the file being parsed, not the
request path
2010-11-12 11:24:41 +01:00
Gonzalo Paniagua Javier 2427b2b861 Don't cache child nodes when security trimming is enabled.
When SecurityTrimmingEnabled is set to true for the node, the cached children
collection also depends on the IPrincipal set for the current context.

Fixes bug #641449.
2010-11-11 21:19:43 -05:00
Marek Habersack 11aeecfa3a [corlib] Fix for bug #652807. Handle RegistryValueKind.QWord in Win32RegistryApi.{Get,Set}Value 2010-11-11 01:59:17 +01:00
Zoltan Varga e27b81a652 When single stepping from a exception throw site, single step to the catch site. Fixes #652590. 2010-11-10 18:27:01 +01:00
Zoltan Varga 8f3f18568c Fix a typo in process_breakpoint_inner which doesn't break our tests for some reason. 2010-11-08 20:23:34 +01:00
Zoltan Varga f886d89ef7 Enlarge try-finally blocks preceeded by a Monitor.Enter () call to include the call itself, to avoid races inherent in such code. Fixes #651546. 2010-11-05 19:12:35 +01:00
Zoltan Varga 44ea00024a Fix DISABLE_REFLECTION_EMIT build. 2010-11-05 16:30:40 +01:00
Marek Habersack 4aabcf3455 [asp.net,routing] Fix for bug #651593. Don't match all-literal routes for URLs with excessive segments. 2010-11-05 11:37:55 +01:00
Zoltan Varga a22f24834e Fix a bug introduced by the previous change to mono_jit_walk_stack_from_ctx_in_thread (). 2010-11-05 07:46:12 +01:00
Zoltan Varga cea5d2223b Fix crashes in the debugger stack walk code if a gshared method calls another using a managed-to-native translation. 2010-11-05 06:54:06 +01:00
Zoltan Varga bc1373c0d8 Fix more gshared problems in the soft debugger. 2010-11-05 06:38:19 +01:00
Zoltan Varga c8d96f618a Fix gshared support in the soft debugger. Fixes #651251. 2010-11-05 05:33:57 +01:00
Martin Baulig c530931921 Add mono_register_symfile_for_assembly() for bundles.
2010-11-03  Martin Baulig  <[email protected]>

	* mono-debug.c (mono_register_symfile_for_assembly): New method.
	This is used together with mono_register_bundled_assemblies() and
	mono_register_config_for_assembly() to support bundles.
2010-11-03 20:42:41 +01:00
Zoltan Varga e373b1cf49 Fix encoding of large strings in the soft debugger api. Fixes #648832. 2010-11-03 19:17:27 +01:00
Gonzalo Paniagua Javier ba5de9d036 Revert change in FromBinary 2010-11-02 18:58:16 -04:00
Andrew Jorgensen a51e35bbec Map libcups for mac
Fixes bnc#649994
2010-11-02 15:18:54 -06:00
Gonzalo Paniagua Javier 681aff17d2 Renaming a dangling symlink works now
Ditto.

	Fixes bug #650779.
2010-11-02 14:50:58 -04:00
Marek Habersack d1703c40ef [asp.net] 4.0-only types don't need the NET_4_0 ifdef and should be in net_4_0_System.Web.dll.sources 2010-11-02 11:31:55 +01:00
Marek Habersack c53bce8e0a [asp.net] ObjectStateFormatter.{De}serialize methods taking stream use a magic value to mark the stream. 2010-11-02 11:23:35 +01:00
Sebastien Pouliot 3aad88e828 Fix (likely copy-paste) typo on FormsAuthPasswordFormat
* System.Web.Security/FormsAuthentication.cs: Fix typo (MD5->SHA1).
I suspect the later is not used very much by mono users

* Test/System.Web.Security/FormsAuthenticationTest.cs: Small change to
make sure the hash name is not case sensitive
2010-11-02 11:22:45 +01:00
Sebastien Pouliot 2037a51576 Adjust System.Web.Extensions[_1.0].dll.sources wrt MachineKeySectionUtils.cs move 2010-11-02 11:22:23 +01:00
Sebastien Pouliot 8d8cae9016 A few moves/changes following previous patch review
* Makefile: Compile tests with TEST defined (to include System.Web.Util.
MachineKeySectionUtils unit tests)
* System.Web.dll.sources: Move MachineKeySectionUtils.cs from System.
Web.Configuration_2.0 to System.Web.Util
* System.Web_test.dll.sources: Move MachineKeySectionUtilsTest.cs from
System.Web.Configuration_2.0 to System.Web.Util

* System.Web.Configuration_2.0/MachineKeySection.cs: Adjust using
clauses. Uncomment some code. Fix TripleDES versus 3DES for Validation
under NET_4_0. Remove 'private' on fields/methods.
* System.Web.Handlers/AssemblyResourceLoader.cs: Adjust using clauses
* System.Web.Security/MembershipHelper.cs: Adjust using clauses
* System.Web.Security/RolePrincipal.cs: Adjust using clauses
* System.Web.SessionState_2.0/SessionId.cs: Adjust using clauses
* System.Web.UI/LosFormatter.cs: Adjust using clauses.
* System.Web.Util/MachineKeySectionUtils.cs: Moved from System.Web.
Configuration_2.0. Rename namespace and remove 'internal' on type
declaration

* Test/System.Web.Util/MachineKeySectionUtilsTest.cs: Moved from Test/
System.Web.Configuration/MachineKeySectionTest.cs. Add test case for
TripleDES versus 3DES
2010-11-02 11:22:06 +01:00
Sebastien Pouliot 4106e07cca Normalization of cryptographic uses in asp.net
* System.Web.Configuration_2.0/MachineKeyRegistryStorage.cs:
Remove key length check and generic key generation.

* System.Web.Configuration_2.0/MachineKeySection.cs: Add support for 4.0
ValidationAlgorithm and the use of custom algorithms (validation and
decryption). Allow the use of any, valid, key length (based on the
algorithm). Let each algorithm creates its own key (e.g. special needs,
default length...)

* System.Web.Configuration_2.0/MachineKeySectionUtils.cs: Remove key
generation (from random) code and 192bits key length hack (won't work
with custom algorithms). Add support for new (4.0) algorithms, including
custom ones. Provide uniform/shared code to Encrypt/Decrypt, Sign/Verify
and EncryptSign/VerifyDecrypt using MachineKeySection data.

* System.Web.Configuration_2.0/MachineKeyValidation.cs: Add new (4.0)
values.

* System.Web.Configuration_2.0/MachineKeyValidationConverter.cs: Add
support for new (4.0) algorithms.

* System.Web.Handlers/AssemblyResourceLoader.cs: Use the new common
cryptographic code and base64 the encrypted data.

* System.Web.Security/FormsAuthentication.cs: Use the new common
cryptographic code and base64 the signed and/or encrypted data.

* System.Web.Security/MembershipHelper.cs: Use the new common
cryptographic code - this should be 100% compatible with existing data.

* System.Web.Security/RolePrincipal.cs: Use the new common cryptographic
code.

* System.Web.Security/SqliteMembershipProvider.cs: Adapt code for
internal API change.

* System.Web.UI/LosFormatter.cs: Adapt code for internal API change.
Fix some small behaviro changes wrt NET_4_0

* System.Web.UI/ObjectStateFormatter.cs: Use the new common cryptographic
code.

* System.Web.UI/Page.cs: Remove code that is now unneeded (with the new
common cryptogrraphic code).

* System.Web.Configuration_2.0/MachineKeyCompatibilityMode.cs: New.

* Test/System.Web.Configuration/MachineKeyValidationConverterTest.cs:
Add more, mostly 4.0, test cases.

* Test/System.Web.Security/FormsAuthenticationTest.cs: Add test case to
ensure HashPasswordForStoringInConfigFile is not case sensitive.

* Test/System.Web.UI/LosFormatterTest.cs: Add some rountrip test cases
with the different ctors
2010-11-02 11:16:12 +01:00
Marek Habersack 963f28f38b [runtime] mono_cfg_set_exception is not present in 2.8. Fixes the build. 2010-11-02 11:09:52 +01:00
Gonzalo Paniagua Javier bd045fc008 Avoid killing the thread if socket already null
In some weird cases socket is null when we try to close it.
2010-11-01 18:53:53 -04:00
Marek Safar cff2890d8d Set correct result type for chained folded enum subtraction 2010-11-01 11:42:35 +00:00
Zoltan Varga 101eaf3215 Cache the array of classes in find_typespec_for_class (). 2010-11-01 00:44:58 +01:00
Zoltan Varga 5cfa597a30 Avoid asserts if a forced inline fails. Fix typos. Fixes #650407. 2010-11-01 00:44:43 +01:00
Brian Luczkiewicz 84be0b20e5 Enable --aot (but not --aot=full) on osx/x86 2010-10-31 21:48:41 +01:00
Miguel de Icaza e7de26c774 Expose some of our internals to the Mono.Winforms assembly 2010-10-31 15:59:51 -04:00
Miguel de Icaza 8a31a4b263 Fix broken patch 2010-10-31 15:54:41 -04:00
Miguel de Icaza 06e2e82bb0 Allow this file to expose its types as public if needed 2010-10-31 15:51:38 -04:00
Zoltan Varga 47429fb521 Fix the generation of GenericEqualityComparer () instances in AOT. 2010-10-31 02:57:30 +02:00
Geoff Norton 42459678e9 Fix the build 2010-10-30 18:22:49 -04:00
Geoff Norton 44dc98ddd1 [OSX] Reintroduce Cocoa System.Drawing support
The old Cocoa backend for System.Drawing appears to still work.  You must
pass in a NSView.Handle while in the DrawRect method, or with lockFocus
called to prepare the NSGraphicsContext.
2010-10-30 14:53:18 -04:00
Marek Habersack 32832e39bb [asp.net] Fix for bug #649551. The LosFormatter (bool, string) constructor does not expect a base64-encoded string.
Telerik controls pass the string "string" as the macKeyModifier parameter to the constructor. Tests show that .NET
accepts such input without throwing an error. The passed string is now converted into a byte array and passed to
the LosFormatter (bool, byte[]) constructor.

This is a backport of 19e5207189
2010-10-29 16:18:53 +02:00
Marek Habersack de60018067 [asp.net] Fix for bug #649034. Control.FindControl continues to search for controls above itself if it's a naming container.
When a control is a naming container and an attempt to find a control with non-segmented id (e.g. 'myControl') is made,
the search continues to the control's naming container if pathOffset is 0, that is we're at the start of the search.
2010-10-29 14:49:52 +02:00
Geoff Norton 06e3b0379b [OSX] Fix debug=casts on OSX (Bug: 639172)
mono --debug=casts requires fast tls access and the jit tls intrinsic.
We already had support for OP_TLS_GET on darwin/x86, but we did not
expose the "tls offset (pthread_key_t)" from mini to the intrinsic,
instead falling back on the io-layer keys.  We now store mono_lmf_addr
in a pthread_key for darwin/x86 so that we can do fast-tls in the jit
and fix this feature.  X86 only for now.

r: kumpera
2010-10-28 19:52:58 -04:00
Marek Safar 2626e53a2e [646997] Correctly emit platform ILOnly flag 2010-10-27 13:40:46 +01:00
Rodrigo Kumpera 5015ec260b Fix some counters under 32bits. 2010-10-26 23:26:01 -02:00
Marek Habersack 91f700f9d4 [asp.net] HttpRuntime.AppDomainAppPath may be null during tests, check it before using. 2010-10-26 02:02:21 +02:00
Marek Habersack 63f589c152 [asp.net,routing] Fix for bug #648901. Matching engine must ignore trailing slash in the URLs. 2010-10-26 02:01:44 +02:00
Zoltan Varga c223d5999b Disable catchpoints when the DISABLE_BREAKPOINTS flag is used during an invoke. Fixes #632224. 2010-10-25 18:09:32 +02:00
Marek Habersack 6d8bafaa07 [asp.net] Better handling of application's AppDomain restart
* HttpRuntime.cs: disable filesystem watchers on appdomain shutdown and refuse to process
  requests while the current AppDomain is unloading
* HttpApplicationFactory.cs: if the current AppDomain is unloading, ignore FileSystemWatcher
  notifications
* WebConfigurationManager.cs: work around a deadlock issue when entering a ReaderWriterLockSlim
  upgradeable read lock very early during ASP.NET runtime/AppDomain initialization. Every few runs
  the attempt would lock up and since adding a section to cache is not a critical operation we can
  afford timing the lock out in this case. The lockup is probably due to the fact that RWLS is using
  thread local storage to store the current thread's lock status and it may happen that the TLS is
  not cleared during thread object finalization (see metadata/threads.c, the start_wrapper function)
2010-10-25 14:30:35 +02:00
Zoltan Varga 5625f3afe8 Use int 3 as G_BREAKPOINT on x86-64 too. Hopefully fixes #648838. 2010-10-23 20:38:59 +02:00
Zoltan Varga 59959cefb2 Fix another regression in the Array.Sort () methods, allow keys and items to be of different length. Fixes #648828. 2010-10-23 16:48:11 +02:00
Zoltan Varga 217ec2ce11 Implement memory barriers for amd64/x86. Fixes #648831. 2010-10-23 16:31:09 +02:00
Zoltan Varga 4f47316df0 Emit GenericEqualityComparer<T> instances for each EqualityComparer<T> instance in AOT, the former is created dynamically by the latter. 2010-10-22 17:58:08 +02:00
Zoltan Varga 589a83dfa4 Use locale_charset() from iconv which will use nl_langinfo (CODESET) anyways but it will
do canonicalization so we will get the correct charset name, because nl_langinfo (CODESET)
can return different things on different systems. This at least fixes OpenBSD.
2010-10-22 17:28:47 +02:00
Marek Habersack b54ac46230 [asp.net] Part of fix for bug #579837. AuthorizationRule.SerializeElement will not process unmodified elements.
* AuthorizationRule.cs: if the configuration save is not Full, SerializeElement checks whether the rule being
  serialized is modified. If it isn't, validation and serialization are not performed.
* AuthorizationRuleCollection.cs: there is no element name for the collection.
2010-10-22 15:48:14 +02:00
Marek Habersack 7c22cb0135 [configuration] Part of fix for bug #579837. CommaDelimitedStringCollection must properly note that it was modified.
When one manipulates the collection as an instance of StringCollection, the 'modified' field will not
be set (Add, Remove etc. from the underlying StringCollection type will be used). To work around it
a check has to be performed in IsModified whether the contents of the collection changed. It is done
by comparing string hash codes of the original vs current string.
CommaDelimitedStringCollectionConverter forces string hash code update on the new collection, so that IsModified
works correctly on collections converted from comma-delimited strings.
2010-10-22 15:47:57 +02:00
Paolo Molaro 8e890a3bf8 Search for dllimported shared libs in the base directory, not cwd.
* loader.c: we don't search the current directory anymore for shared
libraries referenced in DllImport attributes, as it has a slight
security risk. We search in the same directory where the referencing
image was loaded from, instead. Fixes bug# 641915.
2010-10-22 10:51:15 +02:00
Gonzalo Paniagua Javier b80ffc9882 Replace EnumProcesses with OpenProcess
namedmutex_prewait was (partially) listing the running processes and
	then searching through them. Now we use OpenProcess to verify the owner
	of the mutex is still alive.

	Fixes bug #648133 (note that you need MONO_ENABLE_SHM for this to work)
2010-10-21 18:58:45 -04:00
Ankit Jain 61c8b99b3f [xbuild] Fix bug #646941. Add explicit System.Core for >=3.5 projects.
For projects targeting TargetFrameworkVersion >= 3.5, automatically
add a reference to System.Core . This can be controlled via two
properties:

 $(AddAdditionalExplicitAssemblyReferences) and
 $(AdditionalExplicitAssemblyReferences) .

This is used only for projects built with ToolsVersion=4.0 .
2010-10-22 02:57:07 +05:30
Ankit Jain 4a60b3f3fa [xbuild] Set default TargetFrameworkVersion=4.0 for ToolsVersion=4.0 2010-10-22 02:57:07 +05:30
Ankit Jain d2bb6fe8e1 [xbuild] Add ResolveAssemblyReferencesDependsOn .
Add GetFrameworkPaths and PrepareForBuild as dependencies for
the ResolveAssemblyReferences target. This is required when it is
invoked directly from MD.

Patch from Michael Hutchinson ([email protected]).
2010-10-22 02:57:06 +05:30
Ankit Jain 9f384277cd [xbuild] Reset cache of built targets, on a new project build.
All targets that get built are tracked by the engine, to avoid
unnecessary builds of targets. This should be reset on engine.Build,
unless it is explicitly requested *not to* reset it, via BuildFlags.
2010-10-22 02:57:06 +05:30
Ankit Jain 10b7c361bb [xbuild] Reset ConsoleLogger when a build finishes.
MSBuild hosts like monodevelop, which use the same logger
for multiple builds, get errors/warnings from older builds.
So, reset them whenever the BuildFinished event is raised.

ILogger.Shutdown () is invoked when the host is about to quit,
according to msdn, so can't use that.
2010-10-22 02:57:05 +05:30
Ankit Jain 1e535e61d3 [xbuild] Log TaskFinished even when task fails to initialize. 2010-10-22 02:57:05 +05:30
Ankit Jain fb42e1e12b [xbuild] Update regex to not require EndProject in a sln file.
In a solution file, a Project might not have a corresponding
EndProject. This seems to be supported by VS, so updating xbuild
to support that too. Updated the regex.
2010-10-22 02:57:05 +05:30
Ankit Jain 7358969934 [xbuild] Use files referenced by resx for dependency check.
For .resx resource files, check files referenced by the resx
file also, to determine whether to resgen it or not.

IsResgenRequired () has been taken from MonoDevelop
(main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MD1/MD1DotNetProjectHandler.cs)
2010-10-22 02:57:04 +05:30
Ankit Jain 89c7bb82d4 [xbuild] Fix case sensitive environment variables for ToolTask.
Use ProcessStringDictionary in ToolTask for EnvironmentVariables,
as this retains the original case of the keys. Without this
environment vars would all be passed as lowercase!

This was removed in a previous patch by mistake.
2010-10-22 02:57:04 +05:30
Ankit Jain c28b4ea9d7 [xbuild] Add ToolTask.EnvironmentVariables property.
* class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolTask.cs
	(EnvironmentVariables): New.
	(ExecuteTool): Merge EnvironmentVariables with
	EnvironmentOverride
	* class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/GenerateResource.cs
	(Resgen.Execute): Use EnvironmentVariables to set MONO_IOMAP=drive .
2010-10-22 02:57:03 +05:30
Ankit Jain b80d1ca6eb [xbuild] Fix a race condition in ToolTask.
* class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolTask.cs
 (ExecuteTool): When StartProcess returns, the process has already .Start()'ed
 If we subscribe to the output events after that, then for processes that
 finish executing before we can subscribe, we won't get the output/error
 events at all! So, pass the handlers to StartProcess itself, so that
 they get added before the process is started.
2010-10-22 02:57:03 +05:30
Ankit Jain 5f80fd9448 [xbuild] Fix handling of tool output.
The *StreamChanged event for ProcessWrapper may get parts of
long lines, so process the complete ones that we have (for matching
error/warning), and save rest for processing when the rest of it
is received.

Also, don't ignore empty lines.

* class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolTask.cs
2010-10-22 02:57:02 +05:30
Ankit Jain e53a4c3776 [xbuild] Fix ConsoleLogger's output, extra blank lines etc. 2010-10-22 02:57:02 +05:30
Ankit Jain 69a95ff53d [xbuild] Reduce ConsoleLogger's unnecessary output.
ConsoleLogger was emitting target names, even if they didn't have
any useful output, which resulted in lots of "Target foo:" in the
output, with no other related msgs.

 Target Foo:
 Target Bar:
 Target Xyz:

Emit project/target/task headers only if they result in a message,
error or warning. This results in much cleaner output.
2010-10-22 02:57:01 +05:30
Ankit Jain 5025f28490 [xbuild] Log default msg for TargetSkipped if @reason is null or empty. 2010-10-22 02:57:01 +05:30
Gonzalo Paniagua Javier e3c340f1c1 FromBinary does not need ToLocalTime
When converting to DateTime from a long, we don't need ToLocalTime().
	Setting the kind to Local is enough.
	Patch from Mig.

	Fixes bug #648252.
2010-10-21 16:02:43 -04:00
Zoltan Varga 2fdbdc2bc0 Fix building the logging profiler. 2010-10-21 21:57:45 +02:00
Miguel de Icaza 2875496241 Document server option to --debugger-agent 2010-10-21 14:13:45 -04:00
Andrew Jorgensen f98dc57542 Bump version to 2.8.1 2010-10-21 11:54:30 -06:00
Zoltan Varga 905e43efe2 Fix an assert in the LLVM backend if a long value was passed to 'localloc'. 2010-10-21 19:01:55 +02:00
Rodrigo Kumpera b6a25dfdd2 Disable cardtable unde 64bits as it is broken for 2.8. 2010-10-21 14:40:59 -02:00
Geoff Norton 16c125bc9b Fix a crash when using the embedding api
error_msg is null when passed into this function from a few places, so
lets not do a null deref here.
2010-10-21 12:29:02 -04:00
Michael Hutchinson 33d466d421 [Embedding] Make mono-dl-fallback.h public-safe 2010-10-21 12:29:01 -04:00
Miguel de Icaza 4b0101dd80 Do not install sample header, add to EXTRA_DIST 2010-10-21 12:29:01 -04:00
Miguel de Icaza 84e9b39b17 [Embedded] Add new fallback API to allow hooking up to the P/Invoke lookup system
This patch allows a developer to register a fallback for P/Invoke when
embedding Mono.   Typically this is done when you statically link all of your
libraries in some embedded systems and you need to dynamically resolve symbol
names.

There is a *sample* API included (but not compiled into Mono itself) called
mono-embed.c that shows a layman use of the API.   A full implementation would
mandate sorted tables, and would use a bsearch or a hashtable instead of having
linear searches.
2010-10-21 12:29:00 -04:00
Gonzalo Paniagua Javier 8a5647b1d6 Allow ordinal entry points in windows.
Windows allows entry point names like "#10" which refer to the Nth
	function (n > 1 and less than the highest ordinal value in the .def
	file).

	Fixes bug #636966.
2010-10-21 12:24:53 -04:00
Gonzalo Paniagua Javier 733d3f45d1 Linux /proc/mounts might have escaped characters
Translate escaped characters in mount paths.

	Fixes bug #637078.
2010-10-21 12:24:43 -04:00
Gonzalo Paniagua Javier 29ffd5258c Use UTF8 instead of ASCII when reading mount info
This allows for mount points with UTF8 characters in them.
2010-10-21 12:24:27 -04:00
Gonzalo Paniagua Javier e845f96a79 Fixed GetLogicalDriveString
When calling GetLogicalDriveString, icall.c was passing the
	length in the wrong units.

	GetLogicalDriveString now translates any octal sequence found
	into its corresponding byte. Use the UTF16 length
	('items_written') instead of the UTF8 input string length
	('items_read') when computing the total size.
2010-10-21 12:24:02 -04:00
Gonzalo Paniagua Javier 51e0ca445a Fix return value of items_read
items_read was not being initialized and it was not being set in the
	fast common case of g_utf8_to_utf16().
2010-10-21 12:23:43 -04:00
Gonzalo Paniagua Javier f95ed5726f UDP sockets allow connections to Any
UDP sockets that call Connect() to set a default address for datagrams
	sent, can call Connect() again with IPv6Any or Any to 'disconnect'.

	Fixes bug #639098.
2010-10-21 12:22:05 -04:00
Gonzalo Paniagua Javier 03af9e4c5d GetProcessById now works on the Mac too
Ditto.
	This should fix MD problems when SHM is disabled.
2010-10-21 12:21:16 -04:00
Gonzalo Paniagua Javier 921a0951d8 Map SO_EXCLUSIVEADDRUSE to !SO_REUSEADDR
This will make windows app that use that property work on *nix.
	Fixes bug #643475.
2010-10-21 12:18:04 -04:00
Gonzalo Paniagua Javier c6ee6980ce Fix the collision handling code
After the fix for bug #605092, inserting timers with an equal due time
	was failing because searching in the list was also using a reference
	comparison. Now, when adding a new timer, we search using just the due
	time.
	Fixes bug #648130.
2010-10-21 11:36:52 -04:00
Zoltan Varga 429c26b022 Avoid caching stuff in socket-io.c in static variables, since the socket assembly can be unloaded, cache them in MonoDomain instead. 2010-10-21 16:17:50 +02:00
Marek Habersack 5b4ab167be [asp.net,wcf] WCF proxies are generated using a slightly different mode of operation.
WCF proxies don't include full namespace of the contract.
2010-10-21 10:29:16 +02:00
Marek Habersack 58e8a395c4 [wcf] make /js and /jsdebug dispatchers work.
There were several issues here:

- The IChannelDispatcherBoundListener was defined twice, in two different namespaces, and it caused code in
  ChannelDispatcher.Attach not to set its associated listener's ChannelDispatcher property to the correct value.
  This, in turn, caused incorrect HttpListenerManagerTable operation, where it would put the "/js" and "/jsdebug"
  dispatchers in separate HttpListenerManagers, instead of in the main (base) service's one.
- After fixing the above, it turned out that SvcHttpHandler selected the manager based on the host's base address,
  when it should first try to find one whose URL matches the current request exactly.
2010-10-21 10:28:58 +02:00
Marek Habersack 0e93173683 [asp.net] make sure the string we pass to DecryptAssemblyResource is a valid Base64 string 2010-10-21 10:27:21 +02:00
Marek Habersack 20f6a72044 [wcf] ServiceHost directive can span several lines. 2010-10-21 10:27:07 +02:00
Marek Habersack 552a1f5c7e [wcf] Don't close HTTP response prematurely.
Service is invoked in the context of the System.Web pipeline and closing the response before the final
output stream flush causes the generated response not to ever reach the client. This patch makes sure
the System.Web pipeline takes care of all the response housekeeping.
2010-10-21 10:26:53 +02:00
Atsushi Eno d3b4997ff1 Remove extra call to HttpResponse.Flush() which would crash. 2010-10-21 10:26:39 +02:00
Gonzalo Paniagua Javier 722e143cc0 Set have_response
Set have_response to true when there's a protocol error or a previous
	exception for POST/PUT.
	Patch by Bassam Tabbara.
2010-10-20 13:57:25 -04:00
Gonzalo Paniagua Javier 0875d61ca2 Add support for EnableSsl in smtp config.
Ditto.
	Fixes bug #644816.
2010-10-20 13:57:24 -04:00
Gonzalo Paniagua Javier 0d8e8f7df9 Handle special case when disposing a socket.
When disposing a socket that has more than one asynchronous read/write
	pending, one of the callbacks could call DisposeAllOnClose() while
	another one is waiting on the lock. Once the lock is acquired,
	queue.Count will be 0 and Dequeue would fail.
	This is fixed now.

	Fixes bug #645675.
2010-10-20 13:57:23 -04:00
Gonzalo Paniagua Javier 135e5eb0df Able to read MS serialized nullable<primitive>
Handle boxed primitive types for nullable fields.
	Fixes bug #646556.
2010-10-20 01:37:26 -04:00
Zoltan Varga b2ba1f46f7 Avoid trying to read the gc name in the AOT runtime from older AOT images. Fixes #647918. 2010-10-20 05:10:30 +02:00
Tak 15e954d508 [Fix] Ensure that exceptions are propagated when embedding
* metadata/object.c:
* mini/mini.c:
Ensure that exceptions get propagated back to the caller
when mono is being embedded.
License: MIT/X11
2010-10-19 14:20:20 +02:00
Zoltan Varga 86bc7170e5 Avoid calling sem_post on a uninitialized semaphore during thread attach, it works under linux, but fails under *bsd. Fixes #647248. 2010-10-18 01:57:05 +02:00
Gonzalo Paniagua Javier 3779a70dcc [ThreadPool] Clear the thread state
Clear the thread state after finishing a work item. We were only
	resetting the background state.
2010-10-14 16:49:46 -04:00
Zoltan Varga 160cf6a24e Fix crashes in the AOT compiler when the loaded LLVM module is used. Fixes #646314. 2010-10-14 22:20:06 +02:00
Zoltan Varga 1cd68dd08c Update the IMT thunk creation code on sparc to support net 4.0. 2010-10-14 21:57:28 +02:00
Zoltan Varga 0ee4f2dbd1 Avoid a crash in g_convert () if iconv_open () fails. 2010-10-14 21:56:33 +02:00
Jb Evain 44d00f87d5 Add pretty print support for null values in JsonObjects 2010-10-14 14:23:37 +02:00
Jb Evain b214e1e693 Allow null values in JsonObjects 2010-10-14 14:23:19 +02:00
Marek Safar cda5880b42 [646298] Compile multiple interface event declarators 2010-10-14 10:57:25 +01:00
Robert Nagy e97de6b450 merge from head 2010-10-14 02:23:20 +02:00
Marek Safar d8034534d0 [642975] Fix initializer of partially static multidimensional arrays 2010-10-08 12:36:34 -04:00
Gonzalo Paniagua Javier b49c845d35 X509Chain always uses the LM store
X509Chain will now add the LM store certificates always, even when the
	CU store is selected.
2010-10-08 02:08:21 -04:00
Zoltan Varga b6a60964d8 Fix the sparc build. 2010-10-08 05:16:34 +02:00
Geoff Norton 3b5c655c05 Fix the build on windows 2010-10-05 15:59:29 -04:00
Michael Hutchinson 3b6f5c3308 [io-layer] Cope with pids > 16 bits
Fixes an issue in Process where "pseudo-handles" for processes with
pids > 16 bits would overflow and start getting treated as normal
handles. This would frequently segfault MonoDevelop on MacOS.
2010-10-05 13:38:52 -04:00
Geoff Norton 579a0ca72b Its possible that we're calling Process_free_internal on a pseudo-handle.
When we are not using SHM we use psuedo handles to return processes from pids,
however we dont guard against pseudo-handles in CloseProcess, which could lead to
calling unref on a fake handle.
2010-10-05 13:02:07 -04:00
Marek Habersack 577dfd5d78 [asp.net] Fix for bug #643298. A typo prevented the EnableViewStateMac from being recognized in the Page directive. 2010-10-05 08:04:46 +02:00
Miguel de Icaza 57dae7a311 Retval is not a reserved keyword, fixes 643345 2010-10-03 12:31:14 -04:00
Zoltan Varga a21c08a924 Check the debugger_thread_exited condition in a loop to guard against spurious wakeups. Fixes #642780. 2010-10-01 23:53:09 +02:00
Zoltan Varga e763cd5010 Fix code buffer reallocation check for OP_SWITCH on arm. 2010-10-01 16:27:51 +02:00
Zoltan Varga 964d3433d8 Fix a deadlock introduced by 5c2e3bf7 by using a separate low level lock to procect access to the file_share_hash hash table. Fixes #642985. 2010-10-01 10:03:27 +02:00
Gonzalo Paniagua Javier 89f92560a1 Invoke the callback in separate threads
The callbacks need to be invoked in different threads to avoid clogging
	the IO pool.

	Fixes bug #639656.
2010-09-30 01:41:22 -04:00
Marek Safar b1752875e8 [642437] Nested types have to check type arguments only and not full class 2010-09-29 09:06:09 -06:00
Alan McGovern 2a308efd0a [System.ServiceModel] Fix a few potential exceptions in background threads
Pass the listener as it's own async state so that we avoid potential null derefs in the callback. Also wrap the BeginAccept and EndAccept calls in their own try/catches in case they throw an exception.
2010-09-29 08:46:52 -06:00
Jérémie Laval bff2b8d6c4 [ReaderWriterLockSlim] Fix state corruption and race in a special interleaving.
Fix possible state corruption in the case where Upgradeable wasn't reactivating its read bit after a downgrade and set events accordingly. Fix possible race where a write process wannabe could step in the middle of Upgradeable actually upgrading to write mode.

Conflicts:

	mcs/class/System.Core/System.Threading/ReaderWriterLockSlim.cs
2010-09-29 15:45:21 +01:00
Marek Habersack 9f2d34d689 [asp.net] Remove lock recursion in Cache.ExpireItems 2010-09-28 22:36:04 +02:00
Atsushi Eno 37edaa18f7 TCP channel listener: remove extra complication (threads) in the previous change. 2010-09-28 10:57:39 -06:00
Atsushi Eno 77d12442c4 Rework TCP listening model, and fix AcceptTcpClient() to not drop timed out requests that actually steals next requests in the air. 2010-09-28 10:57:38 -06:00
Jérémie Laval 3ad4bb8e3d Turn Is*LockHeld properties into thread-specific values in ReaderWriterLockSlim. Add corresponding unit tests. 2010-09-28 13:24:25 +01:00
Marek Habersack 67c7faf279 [asp.net] Get rid of a possible (although unlikely) race condition when acquiring locks
The patch removes a small race condition where a boolean flag is set after acquiring a lock to
indicate to code executing in the finally {} block that it should release the lock. The boolean
variable is now removed and the lock is released unconditionally. It carries a potential to
throw an exception when the lock is not held, but it's better than to fail to release it and
lead the application to a deadlock.
2010-09-28 13:32:15 +02:00
Jackson Harper 7757931e8e On 64bit this is turning into a 16 byte struct, this works around the issue. 2010-09-24 00:26:29 -04:00
Andrew Jorgensen 5a55034e93 move DynamicData to mvc because it depends on Extensions 2010-09-23 14:18:16 -06:00
Gonzalo Paniagua Javier bab18ab6d2 epoll_ctl takes an int, not IntPtr
Ditto.
2010-09-23 15:02:32 -04:00
Gonzalo Paniagua Javier 4c601b8522 EpollEvent size adjustment
EpollEvent has to be one uint32 plus one int64, i.e. 12 bytes long.
	Manos libres now.
2010-09-22 18:15:57 -04:00
Jérémie Laval 36e827b0be Also set readerDoneEvent when exiting an upgradeable lock and reader condition is correct.
It could cause a deadlock when a writer tested the rwlock value before RwRead was removed and another Upgradeable operation happened at the same time.
2010-09-22 11:10:56 +01:00
Marek Safar e137468dc6 [640722] Consider delegate parameters when checking member hiding 2010-09-21 10:22:11 -06:00
Marek Safar aa92238b98 [640709] Don't reuse method parameters for base proxy, they can be hoisted 2010-09-21 10:21:46 -06:00
Marek Safar 093a537205 [640699] Reduced compound expressions need explicit conversion too. 2010-09-21 10:09:36 -06:00
Andrew Jorgensen fe1653eae0 put the x11 devel package back in buildrequires and a couple other spec fixes 2010-09-20 17:25:14 -06:00
Rodrigo Kumpera 58f029f2d1 Report the broken type name instead of assembly's. 2010-09-20 14:54:25 -03:00
Rodrigo Kumpera f16036819a Use List<Exception> instead of ArrayList to make things prettier. 2010-09-20 14:44:56 -03:00
Rodrigo Kumpera 784d21f5fd Fix AssemblyBuilder::GetTypes () with unfinished types.
* AssemblyBuilder.cs (GetTypes): Raise ReflectionTypeLoadException
	if any type was not finished.

	* AssemblyBuilderTest.cs: Add test for GetTypes () and incomplete
	TypeBuilders'.

	Fixes #640288
2010-09-20 14:36:41 -03:00
Andrew Jorgensen c101a18be3 errant file 2010-09-17 12:20:56 -06:00
Marek Safar f038e86294 [639603] Don't emit statements as expressions when they don't support it. 2010-09-17 12:09:26 -06:00
Gonzalo Paniagua Javier ef47ac3d22 Revert my last patch
Not only it didn't fix anything but it broke a test.
2010-09-17 09:48:59 -06:00
Atsushi Eno 95617646ba Add working .svc handler in 4.0 web.config. 2010-09-17 09:47:46 -06:00
Atsushi Eno 652ff412d2 (merge master 3a7d8b3) Avoid crash for use of deprecated InstallTrackingHandler in Snow Leopard. 2010-09-17 12:42:08 +09:00
Andrew Jorgensen 8ca77a27fa More .spec reorgs 2010-09-16 17:12:57 -06:00
Gonzalo Paniagua Javier 3b8eeb54d3 Fix typo. It has been there for 4 years.
Why on earth this wasn't found earlier? $20 reward to whoever gives a
	plausible explanation.
2010-09-16 15:10:58 -04:00
Marek Safar 6e23108f39 [639407] Clean up more static stuff to fix repl instances. 2010-09-16 12:06:42 -06:00
Miguel de Icaza 052fd53f21 Revert 2010-09-15 17:18:41 -04:00
Rodrigo Kumpera 164ba0d204 Fix a sgen shutdown crash.
* threads.c (mono_thread_suspend_all_other_threads): wait_data
	must not be malloc'd since it holds managed pointers. Alloc
	it on stack since the struct is about 512/1024 bytes long.

	* threads.c (mono_thread_manage): Ditto.

	* threads.c (mono_threads_request_thread_dump): Ditto.
2010-09-15 17:39:44 -03:00
Marek Safar 8853b1acb3 [637935] Fixed 3.5 version of msbuild dlls to reference 3.5 version of the engine
MONO_PATH does not work for subsequent dlls, so have to workaround it by
using full path for dlls in 3.5 profile which does not have it's own
mscorlib
2010-09-15 13:07:21 -06:00
Miguel de Icaza d2bc3285b1 Make the thread-id field be of the proper size on 64 bit machines.
This error was found by Gonzalo when he was looking at another problem
when thread IDs overflowed ints.

Currently we use gpointers in the io-layer for the threadid, but we were
only exposing the value as an int32.   The good news is that the code is
not really used right now, but could cause problems in the future as we
extend Process.
2010-09-15 14:28:58 -04:00
Ankit Jain 019cca88ce [xbuild] Fix references to Microsoft.Build.* assemblies for 3.5 . 2010-09-15 12:15:10 -06:00
Andrew Jorgensen b2ac405dbb mono-configuration-crypto is a 4.0 assembly, not 2.0 2010-09-15 10:39:11 -06:00
Rodrigo Kumpera 24ef405181 Fix monotouch bootstrap.
* Type.cs (GetTypeCodeImpl): If the type is a TypeBuilder
	call into specific code.

	* TypeBuilder.cs (GetTypeCodeInternal): New method that
	handles enums correctly.

	This change is required because calling into the runtime
	with incomplete TypeBuilders cause the runtime to crash.
2010-09-15 12:26:12 -04:00
Geoff Norton e2aecacc87 Fix the embedded mono on OSX code to support a symlinked mono into the framework.
The embedding code looks at the executable name, and builds the embedding profile
from that, however the default install has a /usr/bin/mono symlink pointing to
/Library/Frameworks/Mono.framework.  We now resolve the symlink before allowing
the embedding code to proceed.
2010-09-15 12:25:57 -04:00
Marek Safar d6038fc397 [639403] Fixes the endless recursion with hacked EOF 2010-09-15 09:07:12 -06:00
Gonzalo Paniagua Javier 0d7b33cbc9 GetProcessById now works on the Mac too
Ditto.
	This should fix MD problems when SHM is disabled.
2010-09-14 18:25:36 -04:00
Marek Safar f40fc6829d Initialize all core types 2010-09-14 16:15:39 -06:00
Gonzalo Paniagua Javier eb12be05d9 From master 2010-09-14 16:00:04 -04:00
Jérémie Laval f68a0cd137 Allow recursive Write + n * Read lock pattern for ReaderWriterLockSlim and add corresponding unit test 2010-09-14 16:00:04 -04:00
Jérémie Laval 815ec755b4 Generalize ThreadLockState to include recursive count informations and update them accordingly in the different Enter/Exit methods 2010-09-14 16:00:04 -04:00
Jérémie Laval f751095363 Split ReaderWriterLockSlim helper classes into their own files 2010-09-14 16:00:04 -04:00
Marek Safar 30f3260cc1 Finish predefined attributes instance access to allow compile time dynamic support in repl.
Fixes 639010
2010-09-14 11:27:01 -06:00
Geoff Norton 50a2d76b29 Fix a typo in my last commit 2010-09-13 19:59:19 -04:00
Geoff Norton 006d9f248d The tid is passed around internally as a unsigned value.
We were having a crash on OSX due to thread->tid not equalling the
passed tid due to a signedness issue.
2010-09-13 18:43:36 -04:00
Geoff Norton f16e13ead3 Mono 2.8 has a few more usages of the old type 2010-09-13 18:38:09 -04:00
Zoltan Varga 904b7563aa Bump minor version to 2 to be compatible with the runtime. 2010-09-13 15:32:28 -06:00
Geoff Norton 05378ccef9 Fix the build when compiling without shared handle support entirely
The wapi init functions call this even when shared is compiled out,
lets just return FALSE to get into the right codepaths.
2010-09-13 14:46:11 -04:00
Geoff Norton 911929eed1 Rename major -> major_collector and drop unguarded usage of ucontext_t.
Android defines a variable called "major" in its headers, lets rename
major -> major_collector to work around the conflict.

Not every architecture/platform has ucontext_t, so lets not strongly
type our contexts to that and let the macros do their job.
2010-09-13 14:45:55 -04:00
Zoltan Varga ae557e488d Avoid freeing the allocated monitors on shutdown, it seems to cause crashes
when running with SGEN, since SGEN writes to those arrays in:

==29095==    at 0x6844E5: add_or_remove_disappearing_link (sgen-gc.c:4143)
==29095==    by 0x6845F8: mono_gc_register_disappearing_link (sgen-gc.c:4167)
==29095==    by 0x67DE35: clear_domain_process_object (sgen-gc.c:1384)
==29095==    by 0x67DEA3: clear_domain_process_major_object_callback (sgen-gc.c:1400)
==29095==    by 0x6DE2DC: major_iterate_objects (sgen-marksweep.c:692)
==29095==    by 0x67E00B: mono_gc_clear_domain (sgen-gc.c:1459)
2010-09-10 16:58:05 -06:00
Geoff Norton d88e223dd4 Forward port this change for MonoVS 2010-09-10 14:55:45 -06:00
Geoff Norton 1867fd1486 fix typo
svn path=/branches/mono-2-6/mono/; revision=148851
2010-09-10 14:55:43 -06:00
Geoff Norton 1f42b9026c 2009-12-14 Geoff Norton <[email protected]>
* debugger-agent.c: The end_runtime_invoke guard isn't working
        on AMD64 as __builtin_frame_address (1) returns NULL.  Disable the
        behaviour by default, and make it runtime configurable.

svn path=/branches/mono-2-6/mono/; revision=148421
2010-09-10 14:55:41 -06:00
Miguel de Icaza 4b649e0805 [Fix] Correct fix for the g_shell_parse_argv bug
Simplifies the code a little bit by eliminating the in_quote variable,
but also fixes the rules to follow the requirements from the
"Shell Command Language" specification on the Unix03 site:

http://opengroup.org/onlinepubs/007908775/xcu/chap2.html#tag_001_002

In particular, the interpretation of the backslash inside double quotes
is limited to a handful of characters.   Notice that this differs from
the glib implementation which is not correct either.
2010-09-10 01:04:15 -04:00
Miguel de Icaza 2ce8ebda5f [Fix] Allow escape characters inside quoted text, and do not let nested quote reset the quoting state
This should fix #637680
2010-09-09 19:48:41 -04:00
Andrew Jorgensen 3b7c1f8741 Various cleanup and addition 2010-09-09 09:57:59 -06:00
Zoltan Varga faa1dd5646 Add a few more remaps. 2010-09-07 15:50:00 -06:00
Zoltan Varga 21b9ee9deb Remap g_strdupv too. 2010-09-07 15:49:59 -06:00
Marek Habersack db99cebd57 [asp.net] Fix for bug #636709. ClientID must be reset when ID is assigned. 2010-09-07 23:21:26 +02:00
Marek Habersack a8c3708337 [asp.net] Fix for bug #636475. A typo caused ads not to be matched in ChooseAd
The second loop over the ads hashtable must not reject an app if the keyword filter is empty.
2010-09-07 22:11:41 +02:00
Gonzalo Paniagua Javier b40cb0cc14 Add wsdl help generator to the 4.0 files
Ditto.

	Fixes bug #636841.
2010-09-07 14:32:44 -04:00
Gonzalo Paniagua Javier 5640b0a889 Remove Content-Length header when not needed
If we are redirecting to a GET from a POST, the Content-Length header
	might have stale data and it will be sent. Some servers, instead of
	ignoring it, keep waiting for the data to be sent (for a GET!).

	Fixes bug #636219.
2010-09-01 16:07:04 -06:00
Gonzalo Paniagua Javier 693cbe7207 Use the request itself as the key for the cache.
We were usign teh URL, but that might not be unique among several
	requests that need to be authenticated using NTLM. This led to
	different requests sharing the same authentication session which fails
	miserably.

	Bug #631315 fixed.
2010-09-01 16:07:03 -06:00
Gonzalo Paniagua Javier 93d6cc3bf9 Avoid sending data in the challenge phase of NTLM
If there's a POST/PUT request that gets a NTLM 401, we save the data
	and don't send it again until after the challenge phase. Ie, instead of
	sending all the data 3 times, we only send it at most twice.
2010-09-01 16:07:02 -06:00
Ankit Jain 0474947f86 [xbuild] Update man page to add "/tv:" option.
Add option to specify toolsversion from the command line,
to the man page.
2010-09-01 15:34:14 -06:00
Ankit Jain 0013378bfa [xbuild] Unsubscribe events on ConsoleLogger.Shutdown ()
Reported by Lluis Sanchez.
2010-09-01 15:34:03 -06:00
Geoff Norton 0e5aff05c4 Fix build of mono-basic on ppc64
OP_BREAK can take up to 40 bytes on ppc64
2010-09-01 12:15:25 -06:00
Jonathan Pryor 38a79cb7b8 [mdoc-update] Only check for duplicate elements, not duplicate nodes.
The duplicate-element checking algorithm wasn't restricted to just elements;
consequently, an 'invalid token' exception was generated from XPath because we
were trying to call XmlNode.SelectNodes("#text"), and '#' isn't valid.  Oops.

Fixes building gendarme from mono-tools.
2010-09-01 09:12:12 -06:00
Andrew Jorgensen fc767570a8 Version 2.8 2010-08-31 16:38:26 -06:00
5166 changed files with 169583 additions and 271510 deletions

No files matched your search

-2
View File
@@ -6,7 +6,6 @@ configure.in crlf=input
*.h crlf
*.cs crlf
*.sh crlf
*.il crlf
.gitattributes crlf
ChangeLog crlf
@@ -17,7 +16,6 @@ ChangeLog crlf
*.bat -crlf
*.sln -crlf
*.*proj* -crlf
*.xml -crlf
# CRLF Handling
# -------------
-1
View File
@@ -35,4 +35,3 @@
/ltsugar.m4
/lt~obsolete.m4
/ltversion.m4
*~
+3093
View File
File diff suppressed because it is too large. Load diff
+1 -7
View File
@@ -11,13 +11,7 @@ The Boehm licensing information is in the libgc directory
The SGen Garbage Collector is under the terms of the MIT X11
license
The class libraries under mono/mcs are unless otherwise stated
under the MIT X11 license.
Open source Microsoft code is licensed under the original terms
which is either MS-PL for older components, or dual licensed
MS-PL/Apache2 licensed.
GNU LIBRARY GENERAL PUBLIC LICENSE
Version 2, June 1991
-7
View File
@@ -98,13 +98,6 @@ For comments, corrections and updates, please contact [email protected]
ICSharpCode.SharpZipLib, GPL with exceptions.
See: mcs/class/ICSharpCode.SharpZipLib/README
** mcs/class/System.Core/System/TimeZoneInfo.Android.cs
This is a port of Apache 2.0-licensed Android code, and thus is
licensed under the Apache 2.0 license:
http://www.apache.org/licenses/LICENSE-2.0
** mcs/tools
+13 -32
View File
@@ -1,34 +1,25 @@
AUTOMAKE_OPTIONS = foreign
ACLOCAL_AMFLAGS = -I .
MOONLIGHT_SUBDIRS = $(libgc_dir) eglib/src mono
MOONLIGHT_SUBDIRS = $(libgc_dir) eglib mono $(ikvm_native_dir) data
if CROSS_COMPILING
SUBDIRS = po $(libgc_dir) eglib mono $(ikvm_native_dir) data runtime scripts man samples msvc $(docs_dir)
SUBDIRS = po $(libgc_dir) eglib mono $(ikvm_native_dir) data runtime scripts man samples web msvc $(docs_dir)
# Keep in sync with SUBDIRS
## 'tools' is not normally built
DIST_SUBDIRS = po libgc eglib mono ikvm-native data runtime scripts man samples tools msvc docs
DIST_SUBDIRS = po libgc eglib mono ikvm-native data runtime scripts man samples web tools msvc docs
else
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)
SUBDIRS = po $(libgc_dir) eglib mono $(ikvm_native_dir) support data runtime scripts man samples web msvc $(docs_dir)
# Keep in sync with SUBDIRS
## 'tools' is not normally built
DIST_SUBDIRS = po libgc eglib mono ikvm-native support data runtime scripts man samples tools msvc docs
DIST_SUBDIRS = po libgc eglib mono ikvm-native support data runtime scripts man samples web tools msvc docs
endif
endif
EXTRA_DIST= \
LICENSE \
autogen.sh \
build-mingw32.sh \
mkinstalldirs \
mono-uninstalled.pc.in \
nls.m4 \
po.m4 \
progtest.m4 \
winconfig.h
EXTRA_DIST= nls.m4 po.m4 progtest.m4 mono-uninstalled.pc.in build-mingw32.sh LICENSE mkinstalldirs autogen.sh
DISTCHECK_CONFIGURE_FLAGS = EXTERNAL_MCS=false EXTERNAL_RUNTIME=false
@@ -46,8 +37,7 @@ DISTCLEANFILES= mono-uninstalled.pc
# building with monolite
mcslib = $(mcs_topdir)/class/lib
monolite = $(mcslib)/monolite
mono_corlib_version = $(shell sed -n "s/\#define MONO_CORLIB_VERSION //p" $(srcdir)/mono/metadata/appdomain.c)
monolite_url = http://mono.ximian.com/daily/monolite-$(mono_corlib_version)-latest.tar.gz
monolite_url = http://mono.ximian.com/daily/monolite-latest.tar.gz
.PHONY: get-monolite-latest
get-monolite-latest:
-rm -fr $(mcslib)/monolite-*
@@ -82,26 +72,17 @@ bootstrap-world: compiler-tests
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); \
echo "Making all in $$subdir"; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) all); \
done;
(cd runtime && $(MAKE) $(AM_MAKEFLAGS) moon-do-build)
cd $(mcs_topdir) && NO_DIR_CHECK=1 $(MAKE) PROFILE=moonlight_raw all
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); \
echo "Making clean in $$subdir"; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) clean); \
done;
(cd runtime && $(MAKE) $(AM_MAKEFLAGS) moon-do-clean)
cd $(mcs_topdir) && NO_DIR_CHECK=1 $(MAKE) PROFILE=moonlight_raw clean
endif
win32getdeps:
+22 -40
View File
@@ -11,6 +11,16 @@ This is Mono.
a. Build Requirements
---------------------
To build Mono, you will need the following components:
* pkg-config
Available from: http://www.freedesktop.org/Software/pkgconfig
* glib 2.4
Available from: http://www.gtk.org/
On Itanium, you must obtain libunwind:
http://www.hpl.hp.com/research/linux/libunwind/download.php4
@@ -25,15 +35,7 @@ This is Mono.
* 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/
Libgdiplus.
* libzlib
@@ -72,18 +74,15 @@ This is Mono.
make V=1
c. Building the software from GIT
c. Building the software from SVN
---------------------------------
If you are building the software from GIT, make sure that you
If you are building the software from SVN, 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
svn co svn+ssh://[email protected]/source/trunk/mono
svn co svn+ssh://[email protected]/source/trunk/mcs
Then, go into the mono directory, and configure:
@@ -130,16 +129,16 @@ This is Mono.
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
make
And that will use the files downloaded by 'make get-monolite-latest.
To ensure that you're using the 'monolite' distribution, you can
also try passing EXTERNAL_MCS=false on the make command-line.
Testing and Installation
------------------------
@@ -165,13 +164,10 @@ This is Mono.
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
------------------------
d. Common Configuration Options
-------------------------------
The following are the configuration options that someone
building Mono might want to use:
@@ -305,21 +301,6 @@ This is Mono.
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
@@ -586,3 +567,4 @@ This is Mono.
same prefix than this module gets.
+41 -104
View File
@@ -2,7 +2,7 @@
CURDIR="`pwd`"
MINGW=i386-mingw32msvc
CROSS_DIR=/opt/cross/$MINGW
EXTRA_CROSS_DIR=
COPY_DLLS="libgio*.dll libglib*.dll libgmodule*.dll libgthread*.dll libgobject*.dll"
INSTALL_DESTDIR="$CURDIR/mono-win32"
PROFILES="default net_2_0 net_3_5 net_4_0 moonlight"
TEMPORARY_PKG_CONFIG_DIR=/tmp/$RANDOM-pkg-config-$RANDOM
@@ -17,119 +17,62 @@ function cleanup ()
fi
}
function check_pkg_config_dir ()
{
local DIR="$1"
local DIR_PREFIX="$2"
if [ ! -d "$DIR" ]; then
return
fi
install -d -m 755 "$TEMPORARY_PKG_CONFIG_DIR"
for pc in "$DIR"/*.pc; do
if [ -f $pc ]; then
pcname="`basename $pc`"
sed -e "s;^prefix=.*;prefix=$DIR_PREFIX;g" < $pc > "$TEMPORARY_PKG_CONFIG_DIR"/$pcname
fi;
done
if [ -z "$CROSS_PKG_CONFIG_DIR" ]; then
CROSS_PKG_CONFIG_DIR="$TEMPORARY_PKG_CONFIG_DIR"
fi
}
function show_build_info ()
{
cat <<EOF
Installation prefix: $MONO_PREFIX
CPPFLAGS: ${CPPFLAGS:=not set}
LDFLAGS: ${LDFLAGS:=not set}
MONO_PATH: ${MONO_PATH:=not set}
EOF
}
function setup ()
{
local pcname
CROSS_BIN_DIR="$CROSS_DIR/bin"
CROSS_DLL_DIR="$CROSS_DIR/bin"
CROSS_PKG_CONFIG_DIR=$CROSS_DIR/lib/pkgconfig
PATH=$CROSS_BIN_DIR:$PATH
MONO_VERSION=`grep AM_INIT_AUTOMAKE configure.in | cut -d ',' -f 2|tr -d '\)'`
if [ -d ./.git ]; then
MONO_GIT_COMMIT="`git log -1 --format=format:%t`"
MONO_GIT_BRANCH="`git branch|grep '\*'|cut -d ' ' -f 2`"
MONO_RELEASE="$MONO_VERSION-$MONO_GIT_BRANCH-$MONO_GIT_COMMIT"
export PATH
if [ -d ./.git/svn ]; then
SVN_INFO='git svn info'
elif [ -d ./.svn ]; then
SVN_INFO='svn info'
else
MONO_RELEASE="$MONO_VERSION"
SVN_INFO=""
fi
MONO_PREFIX="$MONO_PREFIX/mono-$MONO_RELEASE"
if [ -n "$SVN_INFO" ]; then
MONO_SVN_REVISION=`$SVN_INFO | grep Revision | sed 's/.*: //'`
MONO_BRANCH=`$SVN_INFO | grep URL | sed -e 's;.*source/;;g' -e 's;/mono;;g'`
else
MONO_SVN_REVISION="rUNKNOWN"
MONO_BRANCH="tarball"
fi
MONO_VERSION=`grep AM_INIT_AUTOMAKE configure.in | cut -d ',' -f 2|tr -d '\)'`
MONO_RELEASE="$MONO_VERSION-$MONO_BRANCH-r$MONO_SVN_REVISION"
MONO_PREFIX="/mono-$MONO_RELEASE"
NOCONFIGURE=yes
export NOCONFIGURE
check_pkg_config_dir "$CROSS_DIR/lib/pkgconfig" "$CROSS_DIR"
if [ -n "$EXTRA_CROSS_DIR" -a -d "$EXTRA_CROSS_DIR" ]; then
if [ -d "$EXTRA_CROSS_DIR/bin" ]; then
PATH="$EXTRA_CROSS_DIR/bin":$PATH
fi
check_pkg_config_dir "$EXTRA_CROSS_DIR/lib/pkgconfig" "$EXTRA_CROSS_DIR"
if [ -d "$EXTRA_CROSS_DIR/include" ]; then
if [ -z "$CPPFLAGS" ]; then
CPPFLAGS="-I \"$EXTRA_CROSS_DIR/include\""
else
CPPFLAGS="-I \"$EXTRA_CROSS_DIR/include\" $CFLAGS"
fi
fi
if [ -d "$EXTRA_CROSS_DIR/lib" ]; then
if [ -z "$LDFLAGS" ]; then
LDFLAGS="-I \"$EXTRA_CROSS_DIR/lib\""
else
LDFLAGS="-I \"$EXTRA_CROSS_DIR/lib\" $LDFLAGS"
fi
fi
if [ -d "$EXTRA_CROSS_DIR/share/aclocal" ]; then
if [ -z "$MONO_PATH" ]; then
MONO_PATH="\"$EXTRA_CROSS_DIR\""
else
MONO_PATH="\"$EXTRA_CROSS_DIR\":$MONO_PATH"
fi
fi
if [ -d "$CROSS_PKG_CONFIG_DIR" ]; then
install -d -m 755 "$TEMPORARY_PKG_CONFIG_DIR"
for pc in "$CROSS_PKG_CONFIG_DIR"/*.pc; do
pcname="`basename $pc`"
sed -e "s;^prefix=.*;prefix=$CROSS_DIR;g" < $pc > "$TEMPORARY_PKG_CONFIG_DIR"/$pcname
done
CROSS_PKG_CONFIG_DIR="$TEMPORARY_PKG_CONFIG_DIR"
fi
export PATH MONO_PATH CPPFLAGS
show_build_info
echo Mono Win32 installation prefix: $MONO_PREFIX
}
function build ()
{
if [ -f ./Makefile ]; then
make distclean
fi
if [ -d ./autom4te.cache ]; then
rm -rf ./autom4te.cache
fi
if [ -f ./config.status ]; then
for f in `find -name config.status -type f`; do
rm $f
done
fi
./autogen.sh
BUILD="`./config.guess`"
if [ -f ./Makefile ]; then
make distclean
rm -rf autom4te.cache
fi
if [ ! -d "$CURDIR/build-cross-windows" ]; then
mkdir "$CURDIR/build-cross-windows"
fi
@@ -162,28 +105,27 @@ function doinstall ()
cd "$CURDIR/build-cross-windows"
make DESTDIR="$INSTALL_DESTDIR" USE_BATCH_FILES=yes install
if test -d $CURDIR/mcs; then
mcsdir=$CURDIR/mcs
else
mcsdir=$CURDIR/../mcs
fi
cd "$CURDIR/../mcs/mcs"
cd "$mcsdir/mcs"
for p in $PROFILES; do
make DESTDIR="$INSTALL_DESTDIR" PROFILE=$p install || echo "mcs profile $p installation failed"
done
cd "$mcsdir/class"
cd "$CURDIR/../mcs/class"
for p in $PROFILES; do
make DESTDIR="$INSTALL_DESTDIR" PROFILE=$p install || echo "class library profile $p installation failed"
done
cd "$mcsdir/tools"
cd "$CURDIR/../mcs/tools"
for p in $PROFILES; do
make DESTDIR="$INSTALL_DESTDIR" PROFILE=$p install || echo "tools profile $p installation failed"
done
cd "$CURDIR/mono-win32"
for dll in $COPY_DLLS; do
cp -ap "$CROSS_DLL_DIR"/$dll "$INSTALL_DESTDIR/$MONO_PREFIX/bin"
done
rm -f "$CURDIR/mono-win32-$MONO_RELEASE".zip
zip -9r "$CURDIR/mono-win32-$MONO_RELEASE".zip .
@@ -197,9 +139,7 @@ Usage: build-mingw32.sh [OPTIONS]
where OPTIONS are:
-d DIR Sets the location of directory where MINGW is installed [$CROSS_DIR]
-e DIR Sets the location of directory where additional cross develoment packages are installed [${EXTRA_CROSS_DIR:=none}]
-m MINGW Sets the MINGW target name to be passed to configure [$MINGW]
-p PREFIX Prefix at which Mono is to be installed. Build will append the 'mono-X.Y' string to that path
EOF
exit 1
@@ -209,12 +149,10 @@ trap cleanup 0
pushd . > /dev/null
while getopts "d:m:e:p:" opt; do
while getopts "d:m:h" opt; do
case "$opt" in
d) CROSS_DIR="$OPTARG" ;;
m) MINGW="$OPTARG" ;;
e) EXTRA_CROSS_DIR="$OPTARG" ;;
p) MONO_PREFIX="$OPTARG" ;;
*) usage ;;
esac
done
@@ -222,6 +160,5 @@ done
setup
build
doinstall
show_build_info
popd > /dev/null
+55 -239
View File
@@ -6,7 +6,7 @@ AC_CANONICAL_SYSTEM
m4_ifdef([_A][M_PROG_TAR],[_A][M_SET_OPTION([tar-ustar])])
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(mono,2.10.3)
AM_INIT_AUTOMAKE(mono,2.8.1)
AM_MAINTAINER_MODE
API_VER=2.0
@@ -78,7 +78,6 @@ esac
host_win32=no
target_win32=no
platform_android=no
case "$host" in
*-mingw*|*-*-cygwin*)
AC_DEFINE(HOST_WIN32,1,[Host Platform is Win32])
@@ -87,7 +86,7 @@ case "$host" in
host_win32=yes
if test "x$cross_compiling" = "xno"; then
target_win32=yes
if test "x$host" == "x$build"; then
if test "x$host" == "x$target"; then
AC_DEFINE(TARGET_WIN32,1,[Target OS is Win32])
fi
CC="gcc -mno-cygwin -g"
@@ -95,7 +94,6 @@ case "$host" in
# So libgc configure gets -mno-cygwin
export CC
export CXX
CFLAGS_FOR_EGLIB="$CFLAGS_FOR_EGLIB -mno-cygwin"
else
target_win32=yes
AC_DEFINE(TARGET_WIN32,1,[Target OS is Win32/MinGW])
@@ -173,41 +171,6 @@ case "$host" in
with_sigaltstack=no
use_sigposix=yes
;;
*-*-linux-android*)
host_win32=no
platform_android=yes
AC_DEFINE(PLATFORM_ANDROID,1,[Targeting the Android platform])
AC_DEFINE(TARGET_ANDROID,1,[Targeting the Android platform])
CPPFLAGS="$CPPFLAGS -DGC_LINUX_THREADS -D_GNU_SOURCE -D_REENTRANT -DUSE_MMAP"
if test "x$disable_munmap" != "xyes"; then
CPPFLAGS="$CPPFLAGS -DUSE_MUNMAP"
fi
libmono_cflags="-D_REENTRANT"
libdl="-ldl"
libgc_threads=pthreads
use_sigposix=yes
with_tls=pthread
with_sigaltstack=no
with_static_mono=no
# Android doesn't support boehm, as it's missing <link.h>
support_boehm=no
with_gc=sgen
# isinf(3) requires -lm; see isinf check below
LDFLAGS="$LDFLAGS -lm"
# Bionic's <pthread.h> sets PTHREAD_STACK_MIN=2*PAGE_SIZE; doesn't define
# PAGE_SIZE; breaks mono/io-layer/collection.c
# Bionic doesn't provide S_IWRITE; breaks io-layer/io.c
CFLAGS="$CFLAGS -DPAGE_SIZE=4096 -DS_IWRITE=S_IWUSR"
CXXFLAGS="$CXXFLAGS -DPAGE_SIZE=4096 -DS_IWRITE=S_IWUSR"
# to bypass the underscore linker check, can't work when cross-compiling
mono_cv_uscore=yes
;;
*-*-linux*)
host_win32=no
CPPFLAGS="$CPPFLAGS -DGC_LINUX_THREADS -D_GNU_SOURCE -D_REENTRANT -DUSE_MMAP"
@@ -217,6 +180,7 @@ case "$host" in
libmono_cflags="-D_REENTRANT"
libdl="-ldl"
libgc_threads=pthreads
AOT_SUPPORTED="yes"
use_sigposix=yes
;;
*-*-nacl*)
@@ -228,11 +192,11 @@ case "$host" in
libmono_cflags="-D_REENTRANT"
libdl=
libgc_threads=pthreads
AOT_SUPPORTED="yes"
gc_default=boehm
use_sigposix=yes
ikvm_native=no
AC_DEFINE(DISABLE_SOCKETS,1,[Disable sockets support])
AC_DEFINE(DISABLE_ATTACH, 1, [Disable agent attach support])
;;
*-*-hpux*)
host_win32=no
@@ -284,12 +248,12 @@ case "$host" in
if test "x$cross_compiling" = "xyes"; then
has_broken_apple_cpp=yes
fi
dnl Snow Leopard is horribly broken -- it reports itself as i386-apple-darwin*, but
dnl Snow Leopard is horribly broken -- it reports itself as i386-apple-darwin10.0.0, but
dnl its gcc defaults to 64-bit mode. They have also deprecated the usage of ucontext
dnl we need to set some flags to build our 32-bit binaries on 10.6 properly
case "$host" in
dnl Snow Leopard and newer config.guess reports as this
i*86-*-darwin*)
dnl Snow Leopard config.guess reports as this
i*86-*-darwin10*)
BROKEN_DARWIN_FLAGS="-arch i386 -D_XOPEN_SOURCE -mmacosx-version-min=10.5"
CPPFLAGS="$CPPFLAGS $BROKEN_DARWIN_FLAGS"
CFLAGS="$CFLAGS $BROKEN_DARWIN_FLAGS"
@@ -330,7 +294,6 @@ AM_CONDITIONAL(TARGET_WIN32, test x$target_win32 = xyes)
AM_CONDITIONAL(PLATFORM_LINUX, echo x$target_os | grep -q linux)
AM_CONDITIONAL(PLATFORM_DARWIN, test x$platform_darwin = xyes)
AM_CONDITIONAL(PLATFORM_SIGPOSIX, test x$use_sigposix = xyes)
AM_CONDITIONAL(PLATFORM_ANDROID, test x$platform_android = xyes)
AC_CHECK_TOOL(CC, gcc, gcc)
AC_PROG_CC
@@ -416,15 +379,15 @@ AC_CHECK_HEADERS(sys/user.h, [], [],
AC_CHECK_HEADER(zlib.h, [have_zlib=yes], [have_zlib=no])
if test x$have_zlib = xyes; then
AC_TRY_COMPILE([#include <zlib.h>], [
void main () {
#if defined(ZLIB_VERNUM) && (ZLIB_VERNUM >= 0x1230)
return 0;
}
#else
#error No good zlib found
#endif
],[
AC_MSG_RESULT(Using system zlib)
zlib_msg="system zlib"
AC_DEFINE(HAVE_SYS_ZLIB,1,[Have system zlib])
],[
AC_MSG_RESULT(Using embedded zlib)
have_zlib=no
@@ -480,20 +443,6 @@ if test x"$GCC" = xyes; then
AC_MSG_RESULT(no)
CFLAGS=$ORIG_CFLAGS
])
ORIG_CFLAGS=$CFLAGS
# Check for the normal version, since gcc ignores unknown -Wno options
CFLAGS="$CFLAGS -Wunused-but-set-variable"
AC_MSG_CHECKING(for -Wno-unused-but-set-variable option to gcc)
AC_TRY_COMPILE([], [
void main () { }
], [
AC_MSG_RESULT(yes)
CFLAGS="$ORIG_CFLAGS -Wno-unused-but-set-variable"
], [
AC_MSG_RESULT(no)
CFLAGS=$ORIG_CFLAGS
])
else
# The Sun Forte compiler complains about inline functions that access static variables
# so disable all inlining.
@@ -642,6 +591,27 @@ AC_SUBST(GMODULE_LIBS)
AC_SUBST(BUILD_GLIB_CFLAGS)
AC_SUBST(BUILD_GLIB_LIBS)
if test x$cross_compiling$host_win32 = xnoyes; then
AC_MSG_CHECKING(for cygwin glib2-dev package)
if [ cygcheck --f /usr/lib/libglib-2.0.dll.a | grep -q glib2-devel ]; then
AC_MSG_RESULT(found)
AC_MSG_ERROR([Mono cannot be built with the cygwin glib2-devel package installed, because that package doesn't work with -mno-cygwin. Please uninstall it then re-run configure.])
else
AC_MSG_RESULT(not found, ok)
fi
AC_MSG_CHECKING(for broken gwin32.h)
glib_include=`$PKG_CONFIG --cflags-only-I glib-2.0 | sed -e 's/ -I.*//g' | sed -e 's/-I//g'`
if test -f $glib_include/glib/gwin32.h; then
if [ grep ftruncate $glib_include/glib/gwin32.h | grep -q define ]; then
AC_MSG_RESULT(failed)
hashmark='#'
AC_MSG_ERROR([Your version of gwin32.h is broken and will cause compilation errors when building mono. Please fix it by deleting the line: '$hashmark define ftruncate...' from '$glib_include/glib/gwin32.h' then re-run configure.])
fi
fi
AC_MSG_RESULT(ok)
fi
AC_ARG_WITH(gc, [ --with-gc=boehm,included,none Controls the Boehm GC config, default=included],[gc=$with_gc],[gc=$gc_default])
# Enable support for fast thread-local storage
@@ -653,27 +623,17 @@ AC_ARG_WITH(tls, [ --with-tls=__thread,pthread select Thread Local Storage i
AC_ARG_WITH(sigaltstack, [ --with-sigaltstack=yes,no enable/disable support for sigaltstack (defaults to yes)],[],[with_sigaltstack=yes])
AC_ARG_WITH(static_mono, [ --with-static_mono=yes,no link mono statically to libmono (faster) (defaults to yes)],[],[with_static_mono=yes])
AC_ARG_WITH(shared_mono, [ --with-shared_mono=yes,no build a shared libmono library (defaults to yes)],[],[with_shared_mono=yes])
if test "x$enable_static" = "xno"; then
with_static_mono=no
fi
if test "x$enable_shared" = "xno"; then
with_shared_mono=no
fi
case $host in
*nacl* ) with_shared_mono=yes;;
esac
if test "x$host_win32" = "xyes"; then
# Boehm GC requires the runtime to be in its own dll
with_static_mono=no
fi
AM_CONDITIONAL(STATIC_MONO, test x$with_static_mono != xno)
AM_CONDITIONAL(SHARED_MONO, test x$with_shared_mono != xno)
AC_ARG_ENABLE(mcs-build, [ --disable-mcs-build disable the build of the mcs directory], try_mcs_build=$enableval, enable_mcs_build=yes)
AC_ARG_WITH(xen_opt, [ --with-xen_opt=yes,no Enable Xen-specific behaviour (defaults to yes)],[],[with_xen_opt=yes])
@@ -702,19 +662,23 @@ if test x$enable_small_config = xyes; then
CFLAGS_FOR_LIBGC="$CFLAGS_FOR_LIBGC -DSMALL_CONFIG"
fi
AC_ARG_ENABLE(system-aot, [ --enable-system-aot Enable the Ahead-Of-Time compilation of system assemblies during the build (on by default on some platforms)], enable_system_aot=$enableval, enable_system_aot=default)
if test x$AOT_SUPPORTED != xyes; then
AOT_SUPPORTED=no
fi
AC_ARG_ENABLE(system-aot, [ --enable-system-aot Enable the Ahead-Of-Time compilation of system assemblies during the build (on by default on some platforms)], enable_system_aot=$enableval, enable_system_aot=$AOT_SUPPORTED)
DISABLED_FEATURES=none
AC_ARG_ENABLE(minimal, [ --enable-minimal=LIST drop support for LIST subsystems.
LIST is a comma-separated list from: aot, profiler, decimal, pinvoke, debug,
reflection_emit, reflection_emit_save, large_code, logging, com, ssa, generics, attach, jit, simd, soft_debug, normalization, assembly_remapping, shared_perfcounters.],
reflection_emit, reflection_emit_save, large_code, logging, com, ssa, generics, attach, jit, simd, soft_debug, normalization.],
[
for feature in `echo "$enable_minimal" | sed -e "s/,/ /g"`; do
eval "mono_feature_disable_$feature='yes'"
done
DISABLED_FEATURES=$enable_minimal
disabled="Disabled: $enable_minimal"
disabled="Disabled: $enable_minimal"
],[])
AC_DEFINE_UNQUOTED(DISABLED_FEATURES, "$DISABLED_FEATURES", [String of disabled features])
@@ -828,16 +792,6 @@ if test "x$mono_feature_disable_normalization" = "xyes"; then
AC_MSG_NOTICE([Disabled String normalization support.])
fi
if test "x$mono_feature_disable_assembly_remapping" = "xyes"; then
AC_DEFINE(DISABLE_ASSEMBLY_REMAPPING, 1, [Disable assembly remapping.])
AC_MSG_NOTICE([Disabled Assembly remapping.])
fi
if test "x$mono_feature_disable_shared_perfcounters" = "xyes"; then
AC_DEFINE(DISABLE_SHARED_PERFCOUNTERS, 1, [Disable shared perfcounters.])
AC_MSG_NOTICE([Disabled Shared perfcounters.])
fi
AC_MSG_CHECKING(for visibility __attribute__)
AC_TRY_COMPILE([], [
void __attribute__ ((visibility ("hidden"))) doit (void) {}
@@ -869,9 +823,6 @@ if test x$enable_parallel_mark = xyes; then
libgc_configure_args="$libgc_configure_args --enable-parallel-mark"
fi
AC_ARG_ENABLE(boehm, [ --disable-boehm Disable the Boehm GC.], support_boehm=$enableval,support_boehm=${support_boehm:-yes})
AM_CONDITIONAL(SUPPORT_BOEHM, test x$support_boehm = xyes)
dnl
dnl Boehm GC configuration
dnl
@@ -910,14 +861,6 @@ case "x$gc" in
if test "x$found_gc_enable" = "xyes"; then
BOEHM_DEFINES="-DHAVE_GC_ENABLE $BOEHM_DEFINES"
fi
# check whether we need to explicitly allow
# thread registering
AC_CHECK_LIB(gc, GC_allow_register_threads, found_allow_register_threads="yes",,$libdl)
if test "x$found_allow_register_threads" = "xyes"; then
AC_DEFINE(HAVE_GC_ALLOW_REGISTER_THREADS, 1, [GC requires thread registration])
fi
;;
xincluded)
@@ -1056,11 +999,9 @@ if test x$target_win32 = xno; then
AC_CHECK_FUNCS(getpriority)
AC_CHECK_FUNCS(setpriority)
AC_CHECK_FUNCS(dl_iterate_phdr)
AC_CHECK_FUNCS(dladdr)
AC_CHECK_FUNCS(sysconf)
AC_CHECK_FUNCS(sched_setaffinity)
AC_CHECK_FUNCS(sched_getcpu)
dnl ****************************************************************
dnl *** Check for sched_setaffinity from glibc versions before ***
@@ -1619,12 +1560,6 @@ if test x$target_win32 = xno; then
AC_DEFINE(HAVE_EPOLL, 1, [epoll supported])
fi
havekqueue=no
AC_CHECK_FUNCS(kqueue, , AC_MSG_CHECKING(for kqueue in sys/event.h)
AC_TRY_LINK([#include <sys/event.h>],
[ kqueue(); ],
AC_DEFINE(HAVE_KQUEUE, 1, [Have kqueue]) AC_MSG_RESULT(yes),
AC_MSG_RESULT(no)))
dnl ******************************
dnl *** Checks for SIOCGIFCONF ***
dnl ******************************
@@ -1819,11 +1754,6 @@ if test x$target_win32 = xno; then
dnl * on xp+
AC_DEFINE(HAVE_GETPROCESSID, 1, [Define if GetProcessId is available])
else
dnl *********************************
dnl *** Checks for Windows compilation ***
dnl *********************************
AC_CHECK_HEADERS(winternl.h)
jdk_headers_found=no
AC_CHECK_LIB(ws2_32, main, LIBS="$LIBS -lws2_32", AC_ERROR(bad mingw install?))
AC_CHECK_LIB(psapi, main, LIBS="$LIBS -lpsapi", AC_ERROR(bad mingw install?))
@@ -1907,7 +1837,6 @@ fi
AC_CHECK_FUNCS(round)
AC_CHECK_FUNCS(rint)
AC_CHECK_FUNCS(execvp)
dnl ****************************
dnl *** Look for /dev/random ***
@@ -1920,7 +1849,7 @@ try_dev_random=$enableval, try_dev_random=yes)
AC_MSG_RESULT($try_dev_random)
case "{$build}" in
case "{$target}" in
*-openbsd*)
NAME_DEV_RANDOM="/dev/srandom"
;;
@@ -2063,7 +1992,6 @@ dnl *** NaCl ***
dnl **************
AC_ARG_ENABLE(nacl_codegen, [ --enable-nacl-codegen Enable Native Client code generation], enable_nacl_codegen=$enableval, enable_nacl_codegen=no)
AC_ARG_ENABLE(nacl_gc, [ --enable-nacl-gc Enable Native Client garbage collection], enable_nacl_gc=$enableval, enable_nacl_gc=no)
AM_CONDITIONAL(NACL_CODEGEN, test x$enable_nacl_codegen != xno)
if test "x$enable_nacl_codegen" = "xyes"; then
@@ -2072,10 +2000,6 @@ if test "x$enable_nacl_codegen" = "xyes"; then
AC_DEFINE(TARGET_NACL, 1, [...])
else
MONO_NACL_ALIGN_MASK_OFF=0
CPPFLAGS="$CPPFLAGS -D__default_codegen__"
fi
if test "x$enable_nacl_gc" = "xyes"; then
CPPFLAGS="$CPPFLAGS -finstrument-for-thread-suspension -D__native_client_gc__"
fi
AC_SUBST(MONO_NACL_ALIGN_MASK_OFF)
@@ -2083,7 +2007,7 @@ dnl **************
dnl *** LLVM ***
dnl **************
AC_ARG_ENABLE(llvm,[ --enable-llvm Enable the LLVM back-end], enable_llvm=$enableval, enable_llvm=no)
AC_ARG_ENABLE(llvm,[ --enable-llvm Enable the experimental LLVM back-end], enable_llvm=$enableval, enable_llvm=no)
AC_ARG_ENABLE(loadedllvm,[ --enable-loadedllvm Load the LLVM back-end dynamically], enable_llvm=$enableval && enable_loadedllvm=$enableval, enable_loadedllvm=no)
if test "x$enable_llvm" = "xyes"; then
@@ -2205,11 +2129,7 @@ case "$host" in
haiku*)
LIBC=libroot.so
;;
linux*)
sgen_supported=true
AOT_SUPPORTED="yes"
;;
darwin*|openbsd*|freebsd*)
linux*|darwin*|openbsd*)
sgen_supported=true
;;
esac
@@ -2220,20 +2140,10 @@ case "$host" in
JIT_SUPPORTED=yes
jit_wanted=true
case $host_os in
linux*)
sgen_supported=true
AOT_SUPPORTED="yes"
;;
darwin*|openbsd*|freebsd*)
linux*|darwin*|openbsd*)
sgen_supported=true
;;
esac
case "$host" in
x86_64-*-nacl*)
AC_DEFINE(__mono_ilp32__, 1, [64 bit mode with 4 byte longs and pointers])
sizeof_register=8
;;
esac
;;
ia64-*-*)
TARGET=IA64
@@ -2327,10 +2237,8 @@ case "$host" in
arch_target=arm;
ACCESS_UNALIGNED="no"
JIT_SUPPORTED=yes
CPPFLAGS="$CPPFLAGS -DARM_FPU_VFP=1 -D__ARM_EABI__ -DHAVE_ARMV6=1"
CPPFLAGS="$CPPFLAGS -DARM_FPU_NONE=1"
jit_wanted=true
# libgc's gc_locks.h depends on this
NESTED_LIBGC_FLAGS="$NESTED_LIBGC_FLAGS -DHAVE_ARMV6"
sgen_supported=true
;;
arm*-linux*)
@@ -2363,12 +2271,12 @@ case "$host" in
esac
if test "x$host" != "x$target"; then
AC_DEFINE(MONO_CROSS_COMPILE,1,[The runtime is compiled for cross-compiling mode])
case "$target" in
powerpc64-ps3-linux-gnu)
TARGET=POWERPC64
arch_target=powerpc64
AC_DEFINE(TARGET_PS3, 1, [...])
AC_DEFINE(MONO_CROSS_COMPILE,1,[The runtime is compiled for cross-compiling mode])
# It would be better to just use TARGET_POWERPC64, but lots of code already
# uses this define
AC_DEFINE(__mono_ppc64__, 1, [...])
@@ -2381,58 +2289,14 @@ if test "x$host" != "x$target"; then
TARGET=POWERPC64
arch_target=powerpc64
AC_DEFINE(TARGET_XBOX360, 1, [...])
AC_DEFINE(MONO_CROSS_COMPILE,1,[The runtime is compiled for cross-compiling mode])
# It would be better to just use TARGET_POWERPC64, but lots of code already
# uses this define
sizeof_register=8
target_byte_order=G_BIG_ENDIAN
;;
x86_64-*-nacl)
TARGET=AMD64
arch_target=amd64
AC_DEFINE(TARGET_AMD64, 1, [...])
AC_DEFINE(__mono_ilp32__, 1, [64 bit mode with 4 byte longs and pointers])
sizeof_register=8
;;
armv7l-unknown-linux-gnueabi*)
# TEGRA
TARGET=ARM;
arch_target=arm;
AC_DEFINE(TARGET_ARM, 1, [...])
ACCESS_UNALIGNED="no"
JIT_SUPPORTED=yes
CPPFLAGS="$CPPFLAGS -DARM_FPU_VFP=1 -D__ARM_EABI__"
jit_wanted=true
# Can't use tls, since it depends on the runtime detection of tls offsets
# in mono-compiler.h
with_tls=pthread
;;
armv5tel-unknown-linux-gnueabi*)
TARGET=ARM;
arch_target=arm;
AC_DEFINE(TARGET_ARM, 1, [...])
ACCESS_UNALIGNED="no"
JIT_SUPPORTED=yes
CPPFLAGS="$CPPFLAGS -D__ARM_EABI__"
jit_wanted=true
# Can't use tls, since it depends on the runtime detection of tls offsets
# in mono-compiler.h
with_tls=pthread
;;
armv5-*-linux-androideabi*)
TARGET=ARM;
arch_target=arm;
AC_DEFINE(TARGET_ARM, 1, [...])
AC_DEFINE(TARGET_ANDROID, 1, [...])
ACCESS_UNALIGNED="no"
JIT_SUPPORTED=yes
CPPFLAGS="$CPPFLAGS -D__ARM_EABI__ -DARM_FPU_NONE=1"
jit_wanted=true
# Can't use tls, since it depends on the runtime detection of tls offset
# in mono-compiler.h
with_tls=pthread
;;
*)
AC_MSG_ERROR([Cross compiling is not supported for target $target])
AC_MSG_WARN([Cross compiling is only supported for targets matching 'powerpc64-{ps3,xbox360}-linux-gnu'])
esac
fi
@@ -2483,13 +2347,8 @@ fi
dnl
dnl Simple Generational checks (sgen)
dnl
if $sgen_supported; then
build_sgen_default=yes
else
build_sgen_default=no
fi
SGEN_DEFINES=
AC_ARG_WITH(sgen, [ --with-sgen=yes,no Extra Generational GC, default=yes],[buildsgen=$with_sgen],[buildsgen=$build_sgen_default])
AC_ARG_WITH(sgen, [ --with-sgen=yes,no Extra Generational GC, default=yes],[buildsgen=$with_sgen],[buildsgen=yes])
if test x$buildsgen = xyes; then
if $sgen_supported; then
SGEN_DEFINES="-DHAVE_SGEN_GC -DHAVE_MOVING_COLLECTOR -DHAVE_WRITE_BARRIERS"
@@ -2624,11 +2483,6 @@ if test "x$try_mono_debugger" = "xyes"; then
fi
fi
# disable the debugger entirely when building with moonlight
if test "x$with_moonlight" != "xno"; then
mono_debugger_supported=no
fi
AC_MSG_CHECKING(if the Mono Debugger is supported on this platform)
if test "x$mono_debugger_supported" = "xyes"; then
BOEHM_DEFINES="$BOEHM_DEFINES -DMONO_DEBUGGER_SUPPORTED"
@@ -2664,18 +2518,6 @@ if test ${TARGET} = ARM && test x$cross_compiling = xno && test x$enable_mcs_bui
AC_MSG_RESULT($fpu)
CPPFLAGS="$CPPFLAGS -DARM_FPU_$fpu=1"
unset fpu
AC_MSG_CHECKING(for ARMV6)
AC_TRY_RUN([
int main () { __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" : : "r" (0) : "memory"); return 0; }
], armv6=yes, armv6=no)
AC_MSG_RESULT($armv6)
if test ${armv6} = yes; then
AC_DEFINE(HAVE_ARMV6, 1, "Host supports ARMV6 instructions")
# libgc's gc_locks.h depends on this
NESTED_LIBGC_FLAGS="$NESTED_LIBGC_FLAGS -DHAVE_ARMV6"
fi
fi
if test ${TARGET} = unknown; then
@@ -2700,10 +2542,6 @@ case "x$gc" in
if test x$TARGET = xSPARC -o x$TARGET = xSPARC64; then
LIBGC_CPPFLAGS=`echo $LIBGC_CPPFLAGS | sed -e 's/-D_FILE_OFFSET_BITS=64//g'`
fi
# Don't pass -finstrument-for-thread-suspension in,
# if these are instrumented it will be very bad news
# (infinite recursion, undefined parking behavior, etc)
LIBGC_CPPFLAGS=`echo $LIBGC_CPPFLAGS | sed -e 's/-finstrument-for-thread-suspension//g'`
ac_configure_args="$ac_configure_args --disable-embed-check --with-libgc-threads=$libgc_threads $libgc_configure_args \"CPPFLAGS_FOR_LIBGC=$LIBGC_CPPFLAGS\" \"CFLAGS_FOR_LIBGC=$CFLAGS_FOR_LIBGC\""
AC_CONFIG_SUBDIRS(libgc)
;;
@@ -2711,8 +2549,7 @@ esac
#AC_ARG_WITH(profile2, [ --with-profile2=yes,no If you want to install the 2.0 FX (defaults to yes)], [], [with_profile2=yes])
AC_ARG_WITH(profile4, [ --with-profile4=yes,no If you want to install the 4.0 FX (defaults to yes)], [], [with_profile4=yes])
AC_ARG_WITH(monodroid, [ --with-monodroid=yes,no If you want to build the MonoDroid 2.1 assemblies (defaults to no)], [], [with_monodroid=no])
AC_ARG_WITH(monotouch, [ --with-monotouch=yes,no If you want to build the MonoTouch 2.1 assemblies (defaults to no)], [], [with_monotouch=no])
AC_ARG_WITH(monotouch, [ --with-monotouch=yes,no If you want to build the raw MonoTouch 2.1 assemblies (defaults to no)], [], [with_monotouch=no])
OPROFILE=no
AC_ARG_WITH(oprofile,[ --with-oprofile=no,<oprofile install dir> Enable oprofile support (defaults to no)],[
@@ -2743,23 +2580,16 @@ AC_ARG_WITH(mcs_docs,[ --with-mcs-docs=yes,no If you want to build the
DISABLE_MCS_DOCS=yes
fi
])
if test x$with_profile4 != xyes; then
DISABLE_MCS_DOCS=yes
fi
MOONLIGHT_DEFINES=
AC_ARG_WITH(moonlight, [ --with-moonlight=yes|no|only If you want to build Mono for Moonlight (defaults to no)],[
if test x$with_moonlight != xno; then
MOONLIGHT_DEFINES="-DMOONLIGHT -DDISABLE_ASSEMBLY_REMAPPING "
if test "x$with_moonlight" = "xyes"; then
AC_DEFINE(MOONLIGHT,1,[Building for Moonlight])
elif test "x$with_moonlight" = "xonly"; then
AC_DEFINE(MOONLIGHT,1,[Building for Moonlight])
fi
], [with_moonlight=no])
AC_SUBST(MOONLIGHT_DEFINES)
AC_ARG_WITH(moon_gc, [ --with-moon-gc=boehm,sgen Select the gc to use with Moonlight (defaults to boehm)],[
if test "x$with_moon_gc" != "xsgen"; then
with_moon_gc=boehm
fi
], [with_moon_gc=boehm])
AC_CHECK_HEADER([malloc.h],
[AC_DEFINE([HAVE_USR_INCLUDE_MALLOC_H], [1],
@@ -2787,11 +2617,7 @@ libmono_ldflags="$libmono_ldflags $LIBS"
AM_CONDITIONAL(MOONLIGHT, [test "x$with_moonlight" != "xno"])
AM_CONDITIONAL(ONLY_MOONLIGHT, [test "x$with_moonlight" = "xonly"])
AM_CONDITIONAL(MOONLIGHT_BOEHM, [test "x$with_moon_gc" = "xboehm"])
AM_CONDITIONAL(MOONLIGHT_SGEN, [test "x$with_moon_gc" = "xsgen"])
AM_CONDITIONAL(INSTALL_4_0, [test "x$with_profile4" = xyes])
AM_CONDITIONAL(INSTALL_MONODROID, [test "x$with_monodroid" = xyes])
AM_CONDITIONAL(INSTALL_MONOTOUCH, [test "x$with_monotouch" = xyes])
AM_CONDITIONAL(MIPS_GCC, test ${TARGET}${ac_cv_prog_gcc} = MIPSyes)
@@ -2997,6 +2823,7 @@ mono/profiler/Makefile
ikvm-native/Makefile
scripts/Makefile
man/Makefile
web/Makefile
docs/Makefile
data/Makefile
data/net_2_0/Makefile
@@ -3004,7 +2831,6 @@ data/net_4_0/Makefile
data/net_2_0/Browsers/Makefile
data/mint.pc
data/mono-2.pc
data/monosgen-2.pc
data/mono.pc
data/mono-cairo.pc
data/mono-nunit.pc
@@ -3088,16 +2914,7 @@ fi
echo "PLATFORM = darwin" >> $mcs_topdir/build/config.make
fi
if test x$AOT_SUPPORTED = xyes -a x$enable_system_aot = xdefault; then
enable_system_aot=yes
fi
if test "x$enable_loadedllvm" = "xyes"; then
# This seems to fail on the x86 buildbots
enable_system_aot=no
fi
if test x$host_win32 = xno -a x$platform_darwin != xyes -a x$enable_system_aot = xyes; then
if test x$host_win32 = xno -a x$platform_darwin != xyes -a "x$AOT_SUPPORTED" = "xyes" -a x$enable_system_aot = xyes; then
echo "ENABLE_AOT = 1" >> $mcs_topdir/build/config.make
fi
@@ -3148,8 +2965,7 @@ echo "
LLVM Back End: $enable_llvm (dynamically loaded: $enable_loadedllvm)
Libraries:
Moon Profile: $with_moonlight ($with_moon_gc)
MonoDroid: $with_monodroid
Moon Profile: $with_moonlight
MonoTouch: $with_monotouch
JNI support: $jdk_headers_found
libgdiplus: $libgdiplus_msg
-2
View File
@@ -3,5 +3,3 @@
/config
/.cvsignore
/*.pc
/gdb/mono-sgen-gdb.py
/mono-sgen-gdb.py
+5 -17
View File
@@ -9,7 +9,7 @@ monodir = $(sysconfdir)/mono
EXTRA_DIST = \
config.in \
browscap.ini mono.supp mono.d README ChangeLog \
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.pc.in mono-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 mono.web.pc.in system.web.mvc.pc.in system.web.mvc2.pc.in \
@@ -19,36 +19,24 @@ EXTRA_DIST = \
pkgconfigdir = $(libdir)/pkgconfig
if SUPPORT_SGEN
SGENPCFILE=monosgen-2.pc
SGENGDBFILE=mono-sgen-gdb.py
else
SGENPCFILE=
SGENGDBFILE=
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 $(SGENPCFILE)
system.web.extensions.design_1.0.pc mono.web.pc system.web.mvc.pc system.web.mvc2.pc
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 mono.web.pc system.web.mvc.pc system.web.mvc2.pc $(SGENPCFILE)
system.web.extensions.design_1.0.pc mono.web.pc system.web.mvc.pc system.web.mvc2.pc
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 mono.web.pc system.web.mvc.pc system.web.mvc2.pc monosgen-2.pc mono-sgen-gdb.py
system.web.extensions.design_1.0.pc mono.web.pc system.web.mvc.pc system.web.mvc2.pc
mono_DATA = config \
browscap.ini
gdbdir = $(bindir)
mono-sgen-gdb.py: gdb/mono-gdb.py
cp $< $@
gdb_DATA = gdb/mono-gdb.py $(SGENGDBFILE)
gdb_DATA = gdb/mono-gdb.py
+1 -1
View File
@@ -1,5 +1,5 @@
assemblies_dir=@prefix@/lib/mono
Libraries=${assemblies_dir}/gac/Mono.Cecil/0.9.4.0__0738eb9f132ed756/Mono.Cecil.dll
Libraries=${assemblies_dir}/gac/Mono.Cecil/0.6.9.0__0738eb9f132ed756/Mono.Cecil.dll
Name: Mono Internal -- Do not use.
Description: Mono Internal Libraries -- Do not use
-1
View File
@@ -17,7 +17,6 @@
<dllmap dll="sqlite3" target="@SQLITE3@" os="!windows"/>
<dllmap dll="libX11" target="@X11@" 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"/>
<dllmap dll="libcups" target="libcups.dylib" os="osx"/>
<dllmap dll="i:kernel32.dll">
-2
View File
@@ -288,8 +288,6 @@ def lookup_pretty_printer(val):
return ObjectPrinter (val)
if t == "string":
return StringPrinter (val)
if t == "MonoString *":
return StringPrinter (val)
if t == "MonoMethod *":
return MonoMethodPrinter (val)
if t == "MonoClass *":
+1 -1
View File
@@ -4,4 +4,4 @@ Sources=${assemblies_dir}/Options.cs
Name: Mono.Options
Description: Command Line Parsing Library
Version: 0.2.2
Version: 0.2.1
-11
View File
@@ -1,11 +0,0 @@
prefix=${pcfiledir}/../..
exec_prefix=${pcfiledir}/../..
libdir=${prefix}/@reloc_libdir@
includedir=${prefix}/include/mono-@API_VER@
sysconfdir=@sysconfdir@
Name: Mono
Description: Mono Runtime
Version: @VERSION@
Libs: -L${libdir} @export_ldflags@ -lmonosgen-@API_VER@ @libmono_ldflags@
Cflags: -I${includedir} @libmono_cflags@
+1 -6
View File
@@ -474,15 +474,10 @@ private CodeDomProvider GetProvider(string langId)
//
// Document generation
//
class UTF8StringWriter : StringWriter {
public override Encoding Encoding {
get { return Encoding.UTF8; }
}
}
string GenerateDocument ()
{
UTF8StringWriter sw = new UTF8StringWriter ();
StringWriter sw = new StringWriter ();
if (CurrentDocType == "wsdl")
descriptions [CurrentDocInd].Write (sw);
-4
View File
@@ -84,10 +84,6 @@
<section name="serviceHostingEnvironment" type="System.ServiceModel.Configuration.ServiceHostingEnvironmentSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="services" type="System.ServiceModel.Configuration.ServicesSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</sectionGroup>
<sectionGroup name="system.transactions" type="System.Transactions.Configuration.TransactionsSectionGroup, System.Transactions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, Custom=null">
<section name="defaultSettings" type="System.Transactions.Configuration.DefaultSettingsSection, System.Transactions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, Custom=null"/>
<section name="machineSettings" type="System.Transactions.Configuration.MachineSettingsSection, System.Transactions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, Custom=null" allowDefinition="MachineOnly" allowExeDefinition="MachineOnly"/>
</sectionGroup>
<section name="system.webServer" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="uri" type="System.Configuration.UriSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</configSections>
+1 -6
View File
@@ -474,15 +474,10 @@ private CodeDomProvider GetProvider(string langId)
//
// Document generation
//
class UTF8StringWriter : StringWriter {
public override Encoding Encoding {
get { return Encoding.UTF8; }
}
}
string GenerateDocument ()
{
UTF8StringWriter sw = new UTF8StringWriter ();
StringWriter sw = new StringWriter ();
if (CurrentDocType == "wsdl")
descriptions [CurrentDocInd].Write (sw);
-27
View File
@@ -62,17 +62,6 @@
</sectionGroup>
<section name="monoSettings" type="System.Web.Configuration.MonoSettingsSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</sectionGroup>
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="Everywhere"/>
<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
<section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
</sectionGroup>
</sectionGroup>
</sectionGroup>
<sectionGroup name="system.net" type="System.Net.Configuration.NetSectionGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="authenticationModules" type="System.Net.Configuration.AuthenticationModulesSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="connectionManagement" type="System.Net.Configuration.ConnectionManagementSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
@@ -94,13 +83,6 @@
<section name="extensions" type="System.ServiceModel.Configuration.ExtensionsSection, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="serviceHostingEnvironment" type="System.ServiceModel.Configuration.ServiceHostingEnvironmentSection, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="services" type="System.ServiceModel.Configuration.ServicesSection, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="standardEndpoints" type="System.ServiceModel.Configuration.StandardEndpointsSection, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<section name="routing" type="System.ServiceModel.Routing.Configuration.RoutingSection, System.ServiceModel.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<section name="protocolMapping" type="System.ServiceModel.Configuration.ProtocolMappingSection, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
</sectionGroup>
<sectionGroup name="system.transactions" type="System.Transactions.Configuration.TransactionsSectionGroup, System.Transactions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, Custom=null">
<section name="defaultSettings" type="System.Transactions.Configuration.DefaultSettingsSection, System.Transactions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, Custom=null"/>
<section name="machineSettings" type="System.Transactions.Configuration.MachineSettingsSection, System.Transactions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, Custom=null" allowDefinition="MachineOnly" allowExeDefinition="MachineOnly"/>
</sectionGroup>
<section name="system.webServer" type="System.Configuration.IgnoreSection, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="uri" type="System.Configuration.UriSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
@@ -290,15 +272,6 @@
<bindingExtensions>
<add name="webHttpBinding" type="System.ServiceModel.Configuration.WebHttpBindingCollectionElement, System.ServiceModel.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</bindingExtensions>
<endpointExtensions>
<add name="dynamicEndpoint" type="System.ServiceModel.Discovery.Configuration.DynamicEndpointCollectionElement, System.ServiceModel.Discovery, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add name="discoveryEndpoint" type="System.ServiceModel.Discovery.Configuration.DiscoveryEndpointCollectionElement, System.ServiceModel.Discovery, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add name="udpDiscoveryEndpoint" type="System.ServiceModel.Discovery.Configuration.UdpDiscoveryEndpointCollectionElement, System.ServiceModel.Discovery, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add name="announcementEndpoint" type="System.ServiceModel.Discovery.Configuration.AnnouncementEndpointCollectionElement, System.ServiceModel.Discovery, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add name="udpAnnouncementEndpoint" type="System.ServiceModel.Discovery.Configuration.UdpAnnouncementEndpointCollectionElement, System.ServiceModel.Discovery, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add name="webHttpEndpoint" type="System.ServiceModel.Configuration.WebHttpEndpointCollectionElement, System.ServiceModel.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add name="webScriptEndpoint" type="System.ServiceModel.Configuration.WebScriptEndpointCollectionElement, System.ServiceModel.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</endpointExtensions>
</extensions>
</system.serviceModel>
</configuration>
-1
View File
@@ -19,4 +19,3 @@
/config.h
/config.status
/INSTALL
dolt*
+8
View File
@@ -0,0 +1,8 @@
set(SUBDIRS src test)
autoheader("config.h" null)
foreach(subdir ${SUBDIRS})
add_subdirectory(${subdir})
endforeach()
+1 -5
View File
@@ -1,16 +1,12 @@
if HOST_WIN32
SUBDIRS = src
else
if PLATFORM_DARWIN
SUBDIRS = src
else
if CROSS_COMPILING
SUBDIRS = src
else
SUBDIRS = src test
endif
endif
endif
EXTRA_DIST = autogen.sh README NEWS AUTHORS ChangeLog winconfig.h
EXTRA_DIST = autogen.sh README NEWS AUTHORS ChangeLog
-181
View File
@@ -1,181 +0,0 @@
dnl dolt, a replacement for libtool
dnl Copyright © 2007-2008 Josh Triplett <[email protected]>
dnl Copying and distribution of this file, with or without modification,
dnl are permitted in any medium without royalty provided the copyright
dnl notice and this notice are preserved.
dnl
dnl To use dolt, invoke the DOLT macro immediately after the libtool macros.
dnl Optionally, copy this file into acinclude.m4, to avoid the need to have it
dnl installed when running autoconf on your project.
AC_DEFUN([DOLT], [
AC_REQUIRE([AC_CANONICAL_HOST])
# dolt, a replacement for libtool
# Josh Triplett <[email protected]>
AC_PATH_PROG(DOLT_BASH, bash)
AC_MSG_CHECKING([if dolt supports this host])
dolt_supported=yes
if test x$DOLT_BASH = x; then
dolt_supported=no
fi
if test x$GCC != xyes; then
dolt_supported=no
fi
case $host in
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*)
pic_options='-DDLL_EXPORT'
;;
i?86-apple-darwin*)
pic_options='-fno-common'
;;
*)
dolt_supported=no
;;
esac
if test x$dolt_supported = xno ; then
AC_MSG_RESULT([no, falling back to libtool])
LTCOMPILE='$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(COMPILE)'
LTCXXCOMPILE='$(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXXCOMPILE)'
else
AC_MSG_RESULT([yes, replacing libtool])
dnl Start writing out doltcompile.
cat <<__DOLTCOMPILE__EOF__ >doltcompile
#!$DOLT_BASH
__DOLTCOMPILE__EOF__
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
args=("$[]@")
for ((arg=0; arg<${#args@<:@@@:>@}; arg++)) ; do
if test x"${args@<:@$arg@:>@}" = x-o ; then
objarg=$((arg+1))
break
fi
done
if test x$objarg = x ; then
echo 'Error: no -o on compiler command line' 1>&2
exit 1
fi
lo="${args@<:@$objarg@:>@}"
obj="${lo%.lo}"
if test x"$lo" = x"$obj" ; then
echo "Error: libtool object file name \"$lo\" does not end in .lo" 1>&2
exit 1
fi
objbase="${obj##*/}"
__DOLTCOMPILE__EOF__
dnl Write out shared compilation code.
if test x$enable_shared = xyes; then
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
libobjdir="${obj%$objbase}.libs"
if test ! -d "$libobjdir" ; then
mkdir_out="$(mkdir "$libobjdir" 2>&1)"
mkdir_ret=$?
if test "$mkdir_ret" -ne 0 && test ! -d "$libobjdir" ; then
echo "$mkdir_out" 1>&2
exit $mkdir_ret
fi
fi
pic_object="$libobjdir/$objbase.o"
args@<:@$objarg@:>@="$pic_object"
__DOLTCOMPILE__EOF__
cat <<__DOLTCOMPILE__EOF__ >>doltcompile
"\${args@<:@@@:>@}" $pic_options -DPIC || exit \$?
__DOLTCOMPILE__EOF__
fi
dnl Write out static compilation code.
dnl Avoid duplicate compiler output if also building shared objects.
if test x$enable_static = xyes; then
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
non_pic_object="$obj.o"
args@<:@$objarg@:>@="$non_pic_object"
__DOLTCOMPILE__EOF__
if test x$enable_shared = xyes; then
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
"${args@<:@@@:>@}" >/dev/null 2>&1 || exit $?
__DOLTCOMPILE__EOF__
else
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
"${args@<:@@@:>@}" || exit $?
__DOLTCOMPILE__EOF__
fi
fi
dnl Write out the code to write the .lo file.
dnl The second line of the .lo file must match "^# Generated by .*libtool"
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
{
echo "# $lo - a libtool object file"
echo "# Generated by doltcompile, not libtool"
__DOLTCOMPILE__EOF__
if test x$enable_shared = xyes; then
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
echo "pic_object='.libs/${objbase}.o'"
__DOLTCOMPILE__EOF__
else
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
echo pic_object=none
__DOLTCOMPILE__EOF__
fi
if test x$enable_static = xyes; then
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
echo "non_pic_object='${objbase}.o'"
__DOLTCOMPILE__EOF__
else
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
echo non_pic_object=none
__DOLTCOMPILE__EOF__
fi
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
} > "$lo"
__DOLTCOMPILE__EOF__
dnl Done writing out doltcompile; substitute it for libtool compilation.
chmod +x doltcompile
LTCOMPILE='$(top_builddir)/doltcompile $(COMPILE)'
LTCXXCOMPILE='$(top_builddir)/doltcompile $(CXXCOMPILE)'
dnl automake ignores LTCOMPILE and LTCXXCOMPILE when it has separate CFLAGS for
dnl a target, so write out a libtool wrapper to handle that case.
dnl Note that doltlibtool does not handle inferred tags or option arguments
dnl without '=', because automake does not use them.
cat <<__DOLTLIBTOOL__EOF__ > doltlibtool
#!$DOLT_BASH
__DOLTLIBTOOL__EOF__
cat <<'__DOLTLIBTOOL__EOF__' >>doltlibtool
top_builddir_slash="${0%%doltlibtool}"
: ${top_builddir_slash:=./}
args=()
modeok=false
tagok=false
for arg in "$[]@"; do
case "$arg" in
--mode=compile) modeok=true ;;
--tag=CC|--tag=CXX) tagok=true ;;
--quiet) ;;
*) args@<:@${#args[@]}@:>@="$arg" ;;
esac
done
if $modeok && $tagok ; then
. ${top_builddir_slash}doltcompile "${args@<:@@@:>@}"
else
exec ${top_builddir_slash}libtool "$[]@"
fi
__DOLTLIBTOOL__EOF__
dnl Done writing out doltlibtool; substitute it for libtool.
chmod +x doltlibtool
LIBTOOL='$(top_builddir)/doltlibtool'
fi
AC_SUBST(LTCOMPILE)
AC_SUBST(LTCXXCOMPILE)
# end dolt
])
+12 -57
View File
@@ -7,16 +7,14 @@ AM_MAINTAINER_MODE
AC_PROG_CC
AM_PROG_LIBTOOL
# Use dolt (http://dolt.freedesktop.org/) instead of libtool for building.
DOLT
CFLAGS="$CFLAGS -O0"
CFLAGS="$CFLAGS -g -O0 -D_GNU_SOURCE"
GNUC_PRETTY=
GNUC_UNUSED=
BREAKPOINT="G_STMT_START { raise (SIGTRAP); } G_STMT_END"
if test x$GCC = xyes; then
GNUC_UNUSED='__attribute__((__unused__))'
GNUC_NORETURN='__attribute__((__noreturn__))'
case $host_cpu in
case $target_cpu in
i*86|x86_64) BREAKPOINT="G_STMT_START { __asm__ (\"int \$03\"); } G_STMT_END" ;;
esac
fi
@@ -34,40 +32,19 @@ if test "x$CFLAGS_FOR_EGLIB" != "x"; then
CFLAGS=$CFLAGS_FOR_EGLIB
fi
CFLAGS="$CFLAGS -g -D_GNU_SOURCE"
AM_CONDITIONAL(CROSS_COMPILING, [test x$cross_compiling = xyes])
AC_C_BIGENDIAN([ORDER=G_BIG_ENDIAN],[ORDER=G_LITTLE_ENDIAN])
platform_darwin=no
platform_android=no
case $host in
*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
PATHSEP='\\'
SEARCHSEP=';'
OS="WIN32"
PIDTYPE='void *'
;;
*-*darwin*)
platform_darwin=yes
PATHSEP='/'
SEARCHSEP=':'
OS="UNIX"
PIDTYPE='int'
;;
*-*-linux-android*)
platform_android=yes
PATHSEP='/'
SEARCHSEP=':'
OS="UNIX"
PIDTYPE='int'
;;
*)
PATHSEP='/'
SEARCHSEP=':'
OS="UNIX"
PIDTYPE='int'
;;
esac
@@ -95,24 +72,15 @@ AC_SUBST(CFLAGS)
AC_SUBST(PATHSEP)
AC_SUBST(SEARCHSEP)
AC_SUBST(OS)
AC_SUBST(PIDTYPE)
AM_CONDITIONAL(HOST_WIN32, test x$OS = xWIN32)
AM_CONDITIONAL(TARGET_WIN32, test x$OS = xWIN32)
AM_CONDITIONAL(PLATFORM_DARWIN, test x$platform_darwin = xyes)
AM_CONDITIONAL(PLATFORM_ANDROID, test x$platform_android = xyes)
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(void *)
AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(long long)
AC_CHECK_FUNCS(strndup strlcpy getpwuid_r strtok_r rewinddir vasprintf)
AM_CONDITIONAL(NEED_VASPRINTF, test x$have_vasprintf = x )
AC_CHECK_LIB(iconv, iconv_open, LIBS="$LIBS -liconv")
AC_CHECK_LIB(iconv, libiconv_open, LIBS="$LIBS -liconv")
AC_CHECK_LIB(iconv, iconv_open, ICONV_LIBS="-liconv")
AC_CHECK_LIB(iconv, libiconv_open, ICONV_LIBS="-liconv")
AC_SUBST(ICONV_LIBS)
LIBS="$LIBS $ICONV_LIBS"
AC_SEARCH_LIBS(sqrtf, m)
# nanosleep may not be part of libc, also search it in other libraries
@@ -141,20 +109,9 @@ if test "x$have_iso_varargs" = "xyes"; then
fi
AC_SUBST(G_HAVE_ISO_VARARGS)
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)
AC_CHECK_HEADERS(getopt.h sys/time.h sys/wait.h pwd.h langinfo.h iconv.h localcharset.h)
if test $ac_cv_sizeof_void_p = $ac_cv_sizeof_int; then
GPOINTER_TO_INT="((gint) (ptr))"
GPOINTER_TO_UINT="((guint) (ptr))"
GINT_TO_POINTER="((gpointer) (v))"
GUINT_TO_POINTER="((gpointer) (v))"
GSIZE="int"
GSIZE_FORMAT='"u"'
G_GUINT64_FORMAT='"llu"'
G_GINT64_FORMAT='"lld"'
elif test $ac_cv_sizeof_void_p = $ac_cv_sizeof_long; then
if test $ac_cv_sizeof_void_p != $ac_cv_sizeof_int; then
GPOINTER_TO_INT="((gint)(long) (ptr))"
GPOINTER_TO_UINT="((guint)(long) (ptr))"
GINT_TO_POINTER="((gpointer)(glong) (v))"
@@ -163,17 +120,15 @@ elif test $ac_cv_sizeof_void_p = $ac_cv_sizeof_long; then
GSIZE_FORMAT='"lu"'
G_GUINT64_FORMAT='"lu"'
G_GINT64_FORMAT='"ld"'
elif test $ac_cv_sizeof_void_p = $ac_cv_sizeof_long_long; then
GPOINTER_TO_INT="((gint)(long long) (ptr))"
GPOINTER_TO_UINT="((guint)(unsigned long long) (ptr))"
GINT_TO_POINTER="((gpointer)(long long) (v))"
GUINT_TO_POINTER="((gpointer)(unsigned long long) (v))"
GSIZE="long long"
GSIZE_FORMAT='"I64u"'
G_GUINT64_FORMAT='"I64u"'
G_GINT64_FORMAT='"I64i"'
else
AC_MSG_ERROR([unsupported pointer size])
GPOINTER_TO_INT="((gint) (ptr))"
GPOINTER_TO_UINT="((guint) (ptr))"
GINT_TO_POINTER="((gpointer) (v))"
GUINT_TO_POINTER="((gpointer) (v))"
GSIZE="int"
GSIZE_FORMAT='"u"'
G_GUINT64_FORMAT='"llu"'
G_GINT64_FORMAT='"lld"'
fi
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+49
View File
@@ -0,0 +1,49 @@
set(win_files
gdate-win32.c gdir-win32.c gfile-win32.c gmisc-win32.c
gmodule-win32.c gtimer-win32.c)
set(unix_files
gdate-unix.c gdir-unix.c gfile-unix.c gmisc-unix.c
gmodule-unix.c gtimer-unix.c)
if (MSVC)
set(os_files ${win_files})
else(MSVC)
set(os_files ${unix_files})
endif(MSVC)
set(libeglib_la_SOURCES
${os_files}
eglib-config.h
sort.frag.h
glib.h
garray.c
gerror.c
ghashtable.c
gmem.c
gmodule.h
goutput.c
gstr.c
gslist.c
gstring.c
gptrarray.c
glist.c
gqueue.c
gpath.c
gshell.c
gspawn.c
gfile.c
gfile-posix.c
gpattern.c
gmarkup.c
gutf8.c
gunicode.c
unicode-data.h)
set(EXTRA_DIST eglib-config.h.in eglib-config.hw ${win_files} ${unix_files})
INCLUDE_DIRECTORIES(../ ${CMAKE_CURRENT_SOURCE_DIR})
ADD_DEFINITIONS(${CFLAGS} -D_FORTIFY_SOURCE=2)
ADD_LIBRARY(eglib-static STATIC ${libeglib_la_SOURCES})
ADD_LIBRARY(eglib SHARED ${libeglib_la_SOURCES})
+3 -8
View File
@@ -1,7 +1,6 @@
noinst_LTLIBRARIES = libeglib.la libeglib-static.la
win_files = \
eglib-config.hw \
gdate-win32.c gdir-win32.c gfile-win32.c gmisc-win32.c \
gmodule-win32.c gtimer-win32.c
@@ -24,11 +23,11 @@ os_files = $(unix_files)
endif
libeglib_la_SOURCES = \
eglib-config.h \
eglib-remap.h \
sort.frag.h \
glib.h \
garray.c \
gbytearray.c \
gerror.c \
ghashtable.c \
gmem.c \
@@ -53,18 +52,14 @@ libeglib_la_SOURCES = \
$(os_files) \
$(vasprintf_files)
libeglib_la_CFLAGS = -g -Wall -D_FORTIFY_SOURCE=2
libeglib_la_CFLAGS = -Wall -D_FORTIFY_SOURCE=2
libeglib_static_la_SOURCES=$(libeglib_la_SOURCES)
libeglib_static_la_CFLAGS = $(libeglib_la_CFLAGS)
INCLUDES = -I$(srcdir)
if HOST_WIN32
libeglib_la_LIBADD = -lm $(ICONV_LIBS) -lpsapi
else
if PLATFORM_ANDROID
libeglib_la_LIBADD = -llog
endif
libeglib_la_LIBADD = -lm -liconv -lpsapi
endif
libeglib_static_la_LIBADD = $(libeglib_la_LIBADD)
-6
View File
@@ -19,10 +19,6 @@
#define GINT_TO_POINTER(v) @GINT_TO_POINTER@
#define GUINT_TO_POINTER(v) @GUINT_TO_POINTER@
#if @HAVE_ALLOCA_H@ == 1
#define G_HAVE_ALLOCA_H
#endif
typedef unsigned @GSIZE@ gsize;
typedef signed @GSIZE@ gssize;
@@ -42,6 +38,4 @@ typedef signed @GSIZE@ gssize;
#define G_BREAKPOINT()
#endif
typedef @PIDTYPE@ GPid;
#endif
+3 -2
View File
@@ -62,6 +62,8 @@ typedef int pid_t;
#undef G_HAVE_STRNDUP
#define G_HAVE_GETOPT_H 1
int vasprintf(char **ret, const char *fmt, va_list ap);
/* disable the following warnings
* C4100: The formal parameter is not referenced in the body of the function. The unreferenced parameter is ignored.
* C4127: conditional expression is constant
@@ -69,5 +71,4 @@ typedef int pid_t;
#pragma warning(disable:4100 4127)
#endif
typedef void * GPid;
#endif
#endif
-10
View File
@@ -1,4 +1,3 @@
#define g_array_append monoeg_g_array_append
#define g_array_append_vals monoeg_g_array_append_vals
#define g_array_free monoeg_g_array_free
#define g_array_insert_vals monoeg_g_array_insert_vals
@@ -21,7 +20,6 @@
#define g_direct_hash monoeg_g_direct_hash
#define g_error_free monoeg_g_error_free
#define g_error_new monoeg_g_error_new
#define g_error_vnew monoeg_g_error_vnew
#define g_file_error_from_errno monoeg_g_file_error_from_errno
#define g_file_get_contents monoeg_g_file_get_contents
#define g_file_open_tmp monoeg_g_file_open_tmp
@@ -53,9 +51,6 @@
#define g_hash_table_remove monoeg_g_hash_table_remove
#define g_hash_table_size monoeg_g_hash_table_size
#define g_hash_table_print_stats monoeg_g_hash_table_print_stats
#define g_hash_table_remove_all monoeg_g_hash_table_remove_all
#define g_hash_table_iter_init monoeg_g_hash_table_iter_init
#define g_hash_table_iter_next monoeg_g_hash_table_iter_next
#define g_int_equal monoeg_g_int_equal
#define g_int_hash monoeg_g_int_hash
#define g_list_alloc monoeg_g_list_alloc
@@ -121,7 +116,6 @@
#define g_ptr_array_sort_with_data monoeg_g_ptr_array_sort_with_data
#define g_queue_free monoeg_g_queue_free
#define g_queue_is_empty monoeg_g_queue_is_empty
#define g_queue_foreach monoeg_g_queue_foreach
#define g_queue_new monoeg_g_queue_new
#define g_queue_pop_head monoeg_g_queue_pop_head
#define g_queue_push_head monoeg_g_queue_push_head
@@ -225,11 +219,7 @@
#define g_malloc0 monoeg_malloc0
#define g_ptr_array_grow monoeg_ptr_array_grow
#define g_realloc monoeg_realloc
#define g_try_malloc monoeg_try_malloc
#define g_try_realloc monoeg_try_realloc
#define g_strdup monoeg_strdup
#define g_ucs4_to_utf16_len monoeg_ucs4_to_utf16_len
#define g_utf16_to_ucs4_len monoeg_utf16_to_ucs4_len
#define g_byte_array_free monoeg_g_byte_array_free
#define g_byte_array_new monoeg_g_byte_array_new
+1 -1
View File
@@ -37,7 +37,7 @@
typedef struct {
GArray array;
gboolean clear_;
guint element_size;
gboolean element_size;
gboolean zero_terminated;
gint capacity;
} GArrayPriv;
-95
View File
@@ -1,95 +0,0 @@
/*
* Arrays
*
* Author:
* Geoff Norton ([email protected])
*
* (C) 2010 Novell, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include <stdlib.h>
#include <glib.h>
#define INITIAL_CAPACITY 16
static void
ensure_capacity (GByteArray *array,
int capacity)
{
int new_capacity = MAX (array->len, INITIAL_CAPACITY);
if (capacity < array->len)
return;
while (new_capacity < capacity) {
new_capacity <<= 1;
}
capacity = new_capacity;
array->data = (guint8*) g_realloc (array->data, capacity);
memset (array->data + array->len, 0, capacity - array->len);
array->len = capacity;
}
GByteArray *
g_byte_array_new ()
{
GByteArray *rv = g_new0 (GByteArray, 1);
ensure_capacity (rv, INITIAL_CAPACITY);
return rv;
}
guint8*
g_byte_array_free (GByteArray *array,
gboolean free_segment)
{
guint8* rv = NULL;
g_return_val_if_fail (array != NULL, NULL);
if (free_segment)
g_free (array->data);
else
rv = array->data;
g_free (array);
return rv;
}
GByteArray *
g_array_append (GByteArray *array,
guint8 *data,
guint len)
{
g_return_val_if_fail (array != NULL, NULL);
ensure_capacity (array, array->len + len);
memmove (array->data + array->len, data, len);
array->len += len;
return array;
}
+22 -16
View File
@@ -47,51 +47,57 @@ g_dir_open (const gchar *path, guint flags, GError **error)
GDir *dir;
gunichar2* path_utf16;
gunichar2* path_utf16_search;
WIN32_FIND_DATAW find_data;
WIN32_FIND_DATA find_data;
g_return_val_if_fail (path != NULL, NULL);
g_return_val_if_fail (error == NULL || *error == NULL, NULL);
dir = g_new0 (GDir, 1);
path_utf16 = u8to16 (path);
path_utf16_search = g_malloc ((wcslen((wchar_t *) path_utf16) + 3)*sizeof(gunichar2));
wcscpy (path_utf16_search, path_utf16);
wcscat (path_utf16_search, L"\\*");
dir->handle = FindFirstFileW (path_utf16_search, &find_data);
path_utf16 = u8to16 (path);
dir->handle = FindFirstFile (path_utf16, &find_data);
if (dir->handle == INVALID_HANDLE_VALUE) {
if (error) {
gint err = errno;
*error = g_error_new (G_LOG_DOMAIN, g_file_error_from_errno (err), strerror (err));
}
g_free (path_utf16_search);
g_free (path_utf16);
g_free (dir);
g_free (path_utf16);
return NULL;
}
g_free (path_utf16_search);
g_free (path_utf16);
while ((wcscmp ((wchar_t *) find_data.cFileName, L".") == 0) || (wcscmp ((wchar_t *) find_data.cFileName, L"..") == 0)) {
if (!FindNextFileW (dir->handle, &find_data)) {
/* now get files */
FindClose (dir->handle);
path_utf16_search = g_malloc ((wcslen(path_utf16) + 3)*sizeof(gunichar2));
wcscpy (path_utf16_search, path_utf16);
wcscat (path_utf16_search, L"\\*");
dir->handle = FindFirstFile (path_utf16_search, &find_data);
g_free (path_utf16_search);
while ((wcscmp (find_data.cFileName, L".") == 0) || (wcscmp (find_data.cFileName, L"..") == 0)) {
if (!FindNextFile (dir->handle, &find_data)) {
if (error) {
gint err = errno;
*error = g_error_new (G_LOG_DOMAIN, g_file_error_from_errno (err), strerror (err));
}
g_free (dir);
g_free (path_utf16);
return NULL;
}
}
dir->current = NULL;
dir->next = u16to8 (find_data.cFileName);
g_free (path_utf16);
return dir;
}
const gchar *
g_dir_read_name (GDir *dir)
{
WIN32_FIND_DATAW find_data;
WIN32_FIND_DATA find_data;
g_return_val_if_fail (dir != NULL && dir->handle != 0, NULL);
@@ -107,11 +113,11 @@ g_dir_read_name (GDir *dir)
dir->next = NULL;
do {
if (!FindNextFileW (dir->handle, &find_data)) {
if (!FindNextFile (dir->handle, &find_data)) {
dir->next = NULL;
return dir->current;
}
} while ((wcscmp ((wchar_t *) find_data.cFileName, L".") == 0) || (wcscmp ((wchar_t *) find_data.cFileName, L"..") == 0));
} while ((wcscmp (find_data.cFileName, L".") == 0) || (wcscmp (find_data.cFileName, L"..") == 0));
dir->next = u16to8 (find_data.cFileName);
return dir->current;
+1 -15
View File
@@ -47,20 +47,6 @@ g_error_new (gpointer domain, gint code, const char *format, ...)
return err;
}
static GError *
g_error_vnew (gpointer domain, gint code, const char *format, va_list ap)
{
GError *err = g_new (GError, 1);
err->domain = domain;
err->code = code;
if (vasprintf (&err->message, format, ap) == -1)
err->message = g_strdup_printf ("internal: invalid format string %s", format);
return err;
}
void
g_clear_error (GError **error)
{
@@ -86,7 +72,7 @@ g_set_error (GError **err, gpointer domain, gint code, const gchar *format, ...)
if (err) {
va_start (args, format);
*err = g_error_vnew (domain, code, format, args);
*err = g_error_new (domain, code, format, args);
va_end (args);
}
}
-5
View File
@@ -33,14 +33,9 @@
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef _MSC_VER
#include <direct.h>
#endif
#ifdef G_OS_WIN32
int mkstemp (char *tmp_template);
#endif
-4
View File
@@ -39,13 +39,9 @@
#ifdef G_OS_WIN32
#include <io.h>
#define open _open
#ifndef S_ISREG
#define S_ISREG(x) ((x & _S_IFMT) == _S_IFREG)
#endif
#ifndef S_ISDIR
#define S_ISDIR(x) ((x & _S_IFMT) == _S_IFDIR)
#endif
#endif
int mkstemp (char *tmp_template)
{
+2 -66
View File
@@ -51,12 +51,6 @@ struct _GHashTable {
GDestroyNotify value_destroy_func, key_destroy_func;
};
typedef struct {
GHashTable *ht;
int slot_index;
Slot *slot;
} Iter;
static const guint prime_tbl[] = {
11, 19, 37, 73, 109, 163, 251, 367, 557, 823, 1237,
1861, 2777, 4177, 6247, 9371, 14057, 21089, 31627,
@@ -340,23 +334,6 @@ g_hash_table_find (GHashTable *hash, GHRFunc predicate, gpointer user_data)
return NULL;
}
void
g_hash_table_remove_all (GHashTable *hash)
{
int i;
g_return_if_fail (hash != NULL);
for (i = 0; i < hash->table_size; i++){
Slot *s;
while (hash->table [i]) {
s = hash->table [i];
g_hash_table_remove (hash, s->key);
}
}
}
gboolean
g_hash_table_remove (GHashTable *hash, gconstpointer key)
{
@@ -523,47 +500,6 @@ g_hash_table_print_stats (GHashTable *table)
printf ("Size: %d Table Size: %d Max Chain Length: %d at %d\n", table->in_use, table->table_size, max_chain_size, max_chain_index);
}
void
g_hash_table_iter_init (GHashTableIter *it, GHashTable *hash_table)
{
Iter *iter = (Iter*)it;
memset (iter, 0, sizeof (Iter));
iter->ht = hash_table;
iter->slot_index = -1;
}
gboolean g_hash_table_iter_next (GHashTableIter *it, gpointer *key, gpointer *value)
{
Iter *iter = (Iter*)it;
GHashTable *hash = iter->ht;
g_assert (iter->slot_index != -2);
g_assert (sizeof (Iter) <= sizeof (GHashTableIter));
if (!iter->slot) {
while (TRUE) {
iter->slot_index ++;
if (iter->slot_index >= hash->table_size) {
iter->slot_index = -2;
return FALSE;
}
if (hash->table [iter->slot_index])
break;
}
iter->slot = hash->table [iter->slot_index];
}
if (key)
*key = iter->slot->key;
if (value)
*value = iter->slot->value;
iter->slot = iter->slot->next;
return TRUE;
}
gboolean
g_direct_equal (gconstpointer v1, gconstpointer v2)
{
@@ -579,13 +515,13 @@ g_direct_hash (gconstpointer v1)
gboolean
g_int_equal (gconstpointer v1, gconstpointer v2)
{
return *(gint *)v1 == *(gint *)v2;
return GPOINTER_TO_INT (v1) == GPOINTER_TO_INT (v2);
}
guint
g_int_hash (gconstpointer v1)
{
return *(guint *)v1;
return GPOINTER_TO_UINT(v1);
}
gboolean
+13 -59
View File
@@ -13,6 +13,10 @@
#pragma include_alias(<eglib-config.h>, <eglib-config.hw>)
#else
#include <stdint.h>
/* For pid_t */
#ifndef WIN32
#include <unistd.h>
#endif
#endif
#include <eglib-config.h>
@@ -20,10 +24,6 @@
#include <eglib-remap.h>
#endif
#ifdef G_HAVE_ALLOCA_H
#include <alloca.h>
#endif
#ifndef offsetof
# define offsetof(s_name,n_name) (size_t)(char *)&(((s_name*)0)->m_name)
#endif
@@ -40,12 +40,6 @@
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
*/
@@ -91,6 +85,7 @@ typedef int32_t gboolean;
#endif
#endif
/*
* Macros
*/
@@ -128,11 +123,11 @@ typedef int32_t gboolean;
* Allocation
*/
void g_free (void *ptr);
gpointer g_realloc (gpointer obj, gsize size);
gpointer g_malloc (gsize x);
gpointer g_malloc0 (gsize x);
gpointer g_try_malloc (gsize x);
gpointer g_try_realloc (gpointer obj, gsize size);
static inline gpointer g_realloc (gpointer obj, gsize size) { if (!size) {g_free (obj); return 0;} return realloc (obj, size);}
static inline gpointer g_malloc (gsize x) {if (x) return malloc (x); else return 0;}
static inline gpointer g_malloc0 (gsize x) {if (x) return calloc(1,x); else return 0;}
#define g_try_malloc(x) g_malloc(x)
#define g_try_realloc(obj,size) g_realloc((obj),(size))
#define g_new(type,size) ((type *) g_malloc (sizeof (type) * (size)))
#define g_new0(type,size) ((type *) g_malloc0 (sizeof (type)* (size)))
@@ -183,14 +178,6 @@ gchar* g_win32_getlocale(void);
* Hashtables
*/
typedef struct _GHashTable GHashTable;
typedef struct _GHashTableIter GHashTableIter;
/* Private, but needed for stack allocation */
struct _GHashTableIter
{
gpointer dummy [8];
};
typedef void (*GFunc) (gpointer data, gpointer user_data);
typedef gint (*GCompareFunc) (gconstpointer a, gconstpointer b);
typedef gint (*GCompareDataFunc) (gconstpointer a, gconstpointer b, gpointer user_data);
@@ -211,15 +198,11 @@ gboolean g_hash_table_lookup_extended (GHashTable *hash, gconstpointer ke
void g_hash_table_foreach (GHashTable *hash, GHFunc func, gpointer user_data);
gpointer g_hash_table_find (GHashTable *hash, GHRFunc predicate, gpointer user_data);
gboolean g_hash_table_remove (GHashTable *hash, gconstpointer key);
void g_hash_table_remove_all (GHashTable *hash);
guint g_hash_table_foreach_remove (GHashTable *hash, GHRFunc func, gpointer user_data);
guint g_hash_table_foreach_steal (GHashTable *hash, GHRFunc func, gpointer user_data);
void g_hash_table_destroy (GHashTable *hash);
void g_hash_table_print_stats (GHashTable *table);
void g_hash_table_iter_init (GHashTableIter *iter, GHashTable *hash_table);
gboolean g_hash_table_iter_next (GHashTableIter *iter, gpointer *key, gpointer *value);
guint g_spaced_primes_closest (guint x);
#define g_hash_table_insert(h,k,v) g_hash_table_insert_replace ((h),(k),(v),FALSE)
@@ -451,20 +434,6 @@ GList *g_list_insert_before (GList *list,
GList *g_list_sort (GList *sort,
GCompareFunc func);
/*
* ByteArray
*/
typedef struct _GByteArray GByteArray;
struct _GByteArray {
guint8 *data;
gint len;
};
GByteArray *g_byte_array_new (void);
GByteArray* g_byte_array_append (GByteArray *array, const guint8 *data, guint len);
guint8* g_byte_array_free (GByteArray *array, gboolean free_segment);
/*
* Array
*/
@@ -527,7 +496,6 @@ void g_queue_push_tail (GQueue *queue,
gboolean g_queue_is_empty (GQueue *queue);
GQueue *g_queue_new (void);
void g_queue_free (GQueue *queue);
void g_queue_foreach (GQueue *queue, GFunc func, gpointer user_data);
/*
* Messages
@@ -574,8 +542,6 @@ void g_assertion_message (const gchar *format, ...) G_GNUC_NORETURN
#endif /* ndef HAVE_C99_SUPPORT */
#define g_log_set_handler(a,b,c,d)
#define G_GNUC_INTERNAL
/*
* Conversions
*/
@@ -675,7 +641,7 @@ gunichar *g_utf16_to_ucs4 (const gunichar2 *str, glong len, glong *items_read,
#define u8to16(str) g_utf8_to_utf16(str, (glong)strlen(str), NULL, NULL, NULL)
#ifdef G_OS_WIN32
#define u16to8(str) g_utf16_to_utf8((gunichar2 *) (str), (glong)wcslen((wchar_t *) (str)), NULL, NULL, NULL)
#define u16to8(str) g_utf16_to_utf8(str, (glong)wcslen(str), NULL, NULL, NULL)
#else
#define u16to8(str) g_utf16_to_utf8(str, (glong)strlen(str), NULL, NULL, NULL)
#endif
@@ -718,6 +684,8 @@ typedef enum {
G_SPAWN_FILE_AND_ARGV_ZERO = 1 << 6
} GSpawnFlags;
typedef pid_t GPid;
typedef void (*GSpawnChildSetupFunc) (gpointer user_data);
gboolean g_spawn_command_line_sync (const gchar *command_line, gchar **standard_output, gchar **standard_error, gint *exit_status, GError **error);
@@ -923,30 +891,16 @@ glong g_utf8_strlen (const gchar *str, gssize max);
# define GUINT16_TO_LE(x) (x)
# define GUINT_TO_LE(x) (x)
# define GUINT32_TO_BE(x) GUINT32_SWAP_LE_BE(x)
# define GUINT16_FROM_BE(x) GUINT16_SWAP_LE_BE(x)
# define GUINT32_FROM_BE(x) GUINT32_SWAP_LE_BE(x)
# define GUINT64_FROM_BE(x) GUINT64_SWAP_LE_BE(x)
# define GINT16_FROM_BE(x) GUINT16_SWAP_LE_BE(x)
# define GINT32_FROM_BE(x) GUINT32_SWAP_LE_BE(x)
# define GINT64_FROM_BE(x) GUINT64_SWAP_LE_BE(x)
#else
# define GUINT32_TO_LE(x) GUINT32_SWAP_LE_BE(x)
# define GUINT64_TO_LE(x) GUINT64_SWAP_LE_BE(x)
# define GUINT16_TO_LE(x) GUINT16_SWAP_LE_BE(x)
# define GUINT_TO_LE(x) GUINT32_SWAP_LE_BE(x)
# define GUINT32_TO_BE(x) (x)
# define GUINT16_FROM_BE(x) (x)
# define GUINT32_FROM_BE(x) (x)
# define GUINT64_FROM_BE(x) (x)
# define GINT16_FROM_BE(x) (x)
# define GINT32_FROM_BE(x) (x)
# define GINT64_FROM_BE(x) (x)
#endif
#define GINT64_FROM_LE(x) (GUINT64_TO_LE (x))
#define GINT32_FROM_LE(x) (GUINT32_TO_LE (x))
#define GINT16_FROM_LE(x) (GUINT16_TO_LE (x))
#define GUINT32_FROM_LE(x) (GUINT32_TO_LE (x))
#define GUINT64_FROM_LE(x) (GUINT64_TO_LE (x))
#define GUINT16_FROM_LE(x) (GUINT16_TO_LE (x))
-52
View File
@@ -51,55 +51,3 @@ g_memdup (gconstpointer mem, guint byte_size)
return ptr;
}
gpointer g_realloc (gpointer obj, gsize size)
{
gpointer ptr;
if (!size) {
g_free (obj);
return 0;
}
ptr = realloc (obj, size);
if (ptr)
return ptr;
g_error ("Could not allocate %i bytes", size);
}
gpointer
g_malloc (gsize x)
{
gpointer ptr;
if (!x)
return 0;
ptr = malloc (x);
if (ptr)
return ptr;
g_error ("Could not allocate %i bytes", x);
}
gpointer g_malloc0 (gsize x)
{
gpointer ptr;
if (!x)
return 0;
ptr = calloc(1,x);
if (ptr)
return ptr;
g_error ("Could not allocate %i bytes", x);
}
gpointer g_try_malloc (gsize x)
{
if (x)
return malloc (x);
return 0;
}
gpointer g_try_realloc (gpointer obj, gsize size)
{
if (!size) {
g_free (obj);
return 0;
}
return realloc (obj, size);
}
+21 -39
View File
@@ -72,57 +72,39 @@ g_path_is_absolute (const char *filename)
return (*filename == '/');
}
static pthread_mutex_t pw_lock = PTHREAD_MUTEX_INITIALIZER;
static pthread_mutex_t home_lock = PTHREAD_MUTEX_INITIALIZER;
static const gchar *home_dir;
static const gchar *user_name;
static void
get_pw_data (void)
{
#ifdef HAVE_GETPWUID_R
struct passwd pw;
struct passwd *result;
char buf [4096];
#endif
if (user_name != NULL)
return;
pthread_mutex_lock (&pw_lock);
if (user_name != NULL) {
pthread_mutex_unlock (&pw_lock);
return;
}
#ifdef HAVE_GETPWUID_R
if (getpwuid_r (getuid (), &pw, buf, 4096, &result) == 0) {
home_dir = g_strdup (pw.pw_dir);
user_name = g_strdup (pw.pw_name);
}
#endif
if (home_dir == NULL)
home_dir = g_getenv ("HOME");
if (user_name == NULL) {
user_name = g_getenv ("USER");
if (user_name == NULL)
user_name = "somebody";
}
pthread_mutex_unlock (&pw_lock);
}
/* Give preference to /etc/passwd than HOME */
const gchar *
g_get_home_dir (void)
{
get_pw_data ();
if (home_dir == NULL){
pthread_mutex_lock (&home_lock);
if (home_dir == NULL){
#ifdef HAVE_GETPWUID_R
struct passwd pw;
struct passwd *result;
char buf [4096];
if (getpwuid_r (getuid (), &pw, buf, 4096, &result) == 0)
home_dir = g_strdup (pw.pw_dir);
#endif
if (home_dir == NULL)
home_dir = g_getenv ("HOME");
}
pthread_mutex_unlock (&home_lock);
}
return home_dir;
}
const char *
g_get_user_name (void)
{
get_pw_data ();
return user_name;
const char *retName = g_getenv ("USER");
if (!retName)
retName = "somebody";
return retName;
}
static const char *tmp_dir;
+3 -4
View File
@@ -80,7 +80,7 @@ g_unsetenv(const gchar *variable)
{
gunichar2 *var;
var = u8to16(variable);
SetEnvironmentVariableW(var, L"");
SetEnvironmentVariableW(var, TEXT(""));
g_free(var);
}
@@ -98,15 +98,14 @@ g_path_is_absolute (const char *filename)
{
g_return_val_if_fail (filename != NULL, FALSE);
if (filename[0] != '\0' && filename[1] != '\0') {
if (filename[1] == ':' && filename[2] != '\0' &&
if (filename[0] != '\0' && filename[1] != '\0')
if (filename[1] == ':' && filename[2] != '\0' &&
(filename[2] == '\\' || filename[2] == '/'))
return TRUE;
/* UNC paths */
else if (filename[0] == '\\' && filename[1] == '\\' &&
filename[2] != '\0')
return TRUE;
}
return FALSE;
}
+1 -1
View File
@@ -53,7 +53,7 @@ g_module_open (const gchar *file, GModuleFlags flags)
gunichar2 *file16;
file16 = u8to16(file);
module->main_module = FALSE;
module->handle = LoadLibraryW (file16);
module->handle = LoadLibrary (file16);
g_free(file16);
if (!module->handle) {
g_free (module);
+1 -1
View File
@@ -153,6 +153,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);
abort ();
g_assert_not_reached ();
}
+1 -3
View File
@@ -68,9 +68,7 @@ g_build_path (const gchar *separator, const gchar *first_element, ...)
g_string_append_len (result, s, p - s);
if (next && *next){
int reslen = strlen (result->str);
if (reslen >= slen && strncmp (separator, result->str + reslen - slen, slen))
if (strncmp (separator, result->str + strlen (result->str) - slen, slen))
g_string_append (result, separator);
for (; strncmp (next, separator, slen) == 0; )
-6
View File
@@ -105,9 +105,3 @@ g_queue_free (GQueue *queue)
g_list_free (queue->head);
g_free (queue);
}
void
g_queue_foreach (GQueue *queue, GFunc func, gpointer user_data)
{
g_list_foreach (queue->head, func, user_data);
}
+4 -7
View File
@@ -33,7 +33,7 @@ split_cmdline (const gchar *cmdline, GPtrArray *array, GError **error)
{
gchar *ptr;
gchar c;
gboolean escaped = FALSE, fresh = TRUE;
gboolean escaped = FALSE;
gchar quote_char = '\0';
GString *str;
@@ -57,10 +57,8 @@ split_cmdline (const gchar *cmdline, GPtrArray *array, GError **error)
} else if (quote_char) {
if (c == quote_char) {
quote_char = '\0';
if (fresh && (g_ascii_isspace (*ptr) || *ptr == '\0')){
g_ptr_array_add (array, g_string_free (str, FALSE));
str = g_string_new ("");
}
g_ptr_array_add (array, g_string_free (str, FALSE));
str = g_string_new ("");
} else if (c == '\\'){
escaped = TRUE;
} else
@@ -73,7 +71,6 @@ split_cmdline (const gchar *cmdline, GPtrArray *array, GError **error)
} else if (c == '\\') {
escaped = TRUE;
} else if (c == '\'' || c == '"') {
fresh = str->len == 0;
quote_char = c;
} else {
g_string_append_c (str, c);
@@ -225,7 +222,7 @@ g_shell_unquote (const gchar *quoted_string, GError **error)
}
} else if (*p == '\\'){
char c = *(++p);
if (!(c == '$' || c == '"' || c == '\\' || c == '`' || c == '\'' || c == 0 ))
if (!(c == '$' || c == '"' || c == '\\' || c == '`' || c == 0))
g_string_append_c (result, '\\');
if (c == 0)
break;
+1 -2
View File
@@ -79,7 +79,6 @@ gchar ***_NSGetEnviron();
extern char **environ;
#endif
#ifndef G_OS_WIN32
static int
safe_read (int fd, gchar *buffer, gint count, GError **error)
{
@@ -186,7 +185,7 @@ create_pipe (int *fds, GError **error)
}
return TRUE;
}
#endif /* G_OS_WIN32 */
gboolean
g_spawn_command_line_sync (const gchar *command_line,
gchar **standard_output,
-4
View File
@@ -69,10 +69,6 @@ g_strdupv (gchar **str_array)
guint length;
gchar **ret;
guint i;
if (!str_array)
return NULL;
length = g_strv_length(str_array);
ret = g_new0(gchar *, length + 1);
for (i = 0; str_array[i]; i++) {
+6 -6
View File
@@ -300,13 +300,13 @@ g_filename_from_utf8 (const gchar *utf8string, gssize len, gsize *bytes_read, gs
gboolean
g_get_charset (G_CONST_RETURN char **charset)
{
if (my_charset == NULL) {
#ifdef G_OS_WIN32
static char buf [14];
sprintf (buf, "CP%u", GetACP ());
my_charset = buf;
is_utf8 = FALSE;
static char buf[14];
sprintf (buf, "CP%u", GetACP ());
*charset = buf;
is_utf8 = FALSE;
#else
if (my_charset == NULL){
/* These shouldn't be heap allocated */
#if HAVE_LOCALCHARSET_H
my_charset = locale_charset ();
@@ -316,12 +316,12 @@ g_get_charset (G_CONST_RETURN char **charset)
my_charset = "UTF-8";
#endif
is_utf8 = strcmp (my_charset, "UTF-8") == 0;
#endif
}
if (charset != NULL)
*charset = my_charset;
#endif
return is_utf8;
}
+3 -5
View File
@@ -65,13 +65,13 @@ utf8_to_utf16_len (const gchar *str, glong len, glong *items_read, GError **erro
glong in_pos, ret;
if (len < 0)
len = (glong) strlen (str);
len = strlen (str);
in_pos = 0;
ret = 0;
/* Common case */
for (in_pos = 0; in_pos < len && (guchar) str [in_pos] < 0x80; in_pos++)
for (in_pos = 0; in_pos < len && str [in_pos] < 0x80; in_pos++)
ret ++;
if (in_pos == len) {
@@ -215,7 +215,7 @@ g_utf8_to_utf16 (const gchar *str, glong len, glong *items_read, glong *items_wr
*error = NULL;
if (len < 0)
len = (glong) strlen (str);
len = strlen (str);
if (items_read)
*items_read = 0;
@@ -338,7 +338,6 @@ g_utf16_to_utf8 (const gunichar2 *str, glong len, glong *items_read, glong *item
} else {
surrogate = 0;
/* invalid surrogate pair */
++in_pos;
continue;
}
} else {
@@ -355,7 +354,6 @@ g_utf16_to_utf8 (const gunichar2 *str, glong len, glong *items_read, glong *item
else if (ch >= 0xD800 && ch <= 0xDBFF)
surrogate = ch;
else if (ch >= 0xDC00 && ch <= 0xDFFF) {
++in_pos;
/* invalid surrogate pair */
continue;
}
+2 -3
View File
@@ -9,7 +9,7 @@ int vasprintf(char **ret, const char *fmt, va_list ap)
size_t buflen;
va_list ap2;
#if defined(_MSC_VER) || defined(__MINGW64_VERSION_MAJOR)
#ifdef _MSC_VER
ap2 = ap;
len = _vscprintf(fmt, ap2); // NOTE MS specific extension ( :-( )
#else
@@ -17,7 +17,7 @@ int vasprintf(char **ret, const char *fmt, va_list ap)
len = vsnprintf(NULL, 0, fmt, ap2);
#endif
if (len >= 0 && (buf = malloc ((buflen = (size_t) (len + 1)))) != NULL) {
if (len > 0 && (buf = malloc((buflen = (size_t) (len + 1)))) != NULL) {
len = vsnprintf(buf, buflen, fmt, ap);
*ret = buf;
} else {
@@ -28,4 +28,3 @@ int vasprintf(char **ret, const char *fmt, va_list ap)
va_end(ap2);
return len;
}
+1 -1
View File
@@ -29,7 +29,7 @@ SOURCES = \
test_eglib_SOURCES = $(SOURCES)
test_eglib_CFLAGS = -Wall -D_FORTIFY_SOURCE=2 -I$(srcdir)/../src -I../src -DDRIVER_NAME=\"EGlib\"
test_eglib_CFLAGS = -Wall -Werror -D_FORTIFY_SOURCE=2 -I$(srcdir)/../src -I../src -DDRIVER_NAME=\"EGlib\"
test_eglib_LDADD = ../src/libeglib.la
run-eglib: all
-33
View File
@@ -131,45 +131,12 @@ RESULT hash_grow (void)
return NULL;
}
RESULT hash_iter (void)
{
#if !defined(GLIB_MAJOR_VERSION) || GLIB_CHECK_VERSION(2, 16, 0)
GHashTable *hash = g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL, NULL);
GHashTableIter iter;
int i, sum, keys_sum, values_sum;
gpointer key, value;
sum = 0;
for (i = 0; i < 1000; i++) {
sum += i;
g_hash_table_insert (hash, GUINT_TO_POINTER (i), GUINT_TO_POINTER (i));
}
keys_sum = values_sum = 0;
g_hash_table_iter_init (&iter, hash);
while (g_hash_table_iter_next (&iter, &key, &value)) {
if (key != value)
return FAILED ("key != value");
keys_sum += GPOINTER_TO_UINT (key);
values_sum += GPOINTER_TO_UINT (value);
}
if (keys_sum != sum || values_sum != sum)
return FAILED ("Did not find all key-value pairs");
g_hash_table_destroy (hash);
return NULL;
#else
/* GHashTableIter was added in glib 2.16 */
return NULL;
#endif
}
static Test hashtable_tests [] = {
{"t1", hash_t1},
{"t2", hash_t2},
{"grow", hash_grow},
{"default", hash_default},
{"null_lookup", hash_null_lookup},
{"iter", hash_iter},
{NULL, NULL}
};
-12
View File
@@ -20,8 +20,6 @@ RESULT
test_buildpath ()
{
char *s;
char *buffer = "var/private";
char *dir = "/";
s = g_build_path ("/", "hola///", "//mundo", NULL);
if (strcmp (s, "hola/mundo") != 0)
@@ -101,16 +99,6 @@ test_buildpath ()
return FAILED ("must get a non-NULL return");
if (s [0] != 0)
return FAILED ("must get an empty string");
// This is to test the regression introduced by Levi for the Windows support
// that code errouneously read below the allowed area (in this case dir [-1]).
// and caused all kinds of random errors.
dir = "//";
dir++;
s = g_build_filename (dir, buffer, NULL);
if (s [0] != '/')
return FAILED ("Must have a '/' at the start");
g_free (s);
return OK;
}
+14 -59
View File
@@ -55,7 +55,7 @@ test_shell_argv1 ()
if (!ret)
return FAILED ("11. It should return TRUE");
if (argc != 2)
return FAILED ("12. argc was %d expected 2", argc);
return FAILED ("12. argc was %d", argc);
if (strcmp (argv [0], "hola"))
return FAILED ("13. argv[0] was %s", argv [0]);
if (strcmp (argv [1], "bola"))
@@ -72,7 +72,7 @@ test_shell_argv1 ()
if (!ret)
return FAILED ("16. It should return TRUE");
if (argc != 3)
return FAILED ("17. argc was %d expected 3", argc);
return FAILED ("17. argc was %d", argc);
if (strcmp (argv [0], "hola"))
return FAILED ("18. argv[0] was %s", argv [0]);
if (strcmp (argv [1], ""))
@@ -85,19 +85,6 @@ test_shell_argv1 ()
g_strfreev (argv);
argv = NULL;
argc = 0;
error = NULL;
ret = g_shell_parse_argv ("hola'' bola", &argc, &argv, &error);
if (!ret)
return FAILED ("21. It should return TRUE");
if (argc != 2)
return FAILED ("22. argc was %d expected 2", argc);
if (strcmp (argv [0], "hola"))
return FAILED ("23. argv[0] was %s", argv [0]);
if (strcmp (argv [1], "bola"))
return FAILED ("24. argv[2] was %s", argv [1]);
if (error != NULL)
return FAILED ("25. error is not null");
return OK;
}
@@ -116,7 +103,7 @@ test_shell_argv2 ()
if (!ret)
return FAILED ("1. It should return TRUE");
if (argc != 2)
return FAILED ("2. argc was %d expected 2", argc);
return FAILED ("2. argc was %d", argc);
if (strcmp (argv [0], "hola"))
return FAILED ("3. argv[0] was %s", argv [0]);
if (strcmp (argv [1], "bola"))
@@ -132,7 +119,7 @@ test_shell_argv2 ()
if (!ret)
return FAILED ("6. It should return TRUE");
if (argc != 3)
return FAILED ("7. argc was %d expected 3", argc);
return FAILED ("7. argc was %d", argc);
if (strcmp (argv [0], "hola"))
return FAILED ("8. argv[0] was %s", argv [0]);
if (strcmp (argv [1], ""))
@@ -150,7 +137,7 @@ test_shell_argv2 ()
if (!ret)
return FAILED ("10. It should return TRUE");
if (argc != 3)
return FAILED ("11. argc was %d expected 3", argc);
return FAILED ("11. argc was %d", argc);
if (strcmp (argv [0], "hola"))
return FAILED ("12. argv[0] was %s", argv [0]);
if (strcmp (argv [1], "\t"))
@@ -168,7 +155,7 @@ test_shell_argv2 ()
if (!ret)
return FAILED ("16. It should return TRUE");
if (argc != 3)
return FAILED ("17. argc was %d expected 3", argc);
return FAILED ("17. argc was %d", argc);
if (strcmp (argv [0], "hola"))
return FAILED ("18. argv[0] was %s", argv [0]);
if (strcmp (argv [1], "\t"))
@@ -197,7 +184,7 @@ test_shell_argv3 ()
if (ret)
return FAILED ("1. It should return FALSE");
if (argc != 0)
return FAILED ("2. argc was %d expected 0", argc);
return FAILED ("2. argc was %d", argc);
if (argv != NULL)
return FAILED ("3. argv[0] was %s", argv [0]);
if (error == NULL)
@@ -210,7 +197,7 @@ test_shell_argv3 ()
if (!ret)
return FAILED ("5. It should return TRUE");
if (argc != 2)
return FAILED ("6. argc was %d expected 2", argc);
return FAILED ("6. argc was %d", argc);
if (strcmp (argv [0], "hola"))
return FAILED ("18. argv[0] was %s", argv [0]);
if (strcmp (argv [1], "\"bola"))
@@ -225,7 +212,7 @@ test_shell_argv3 ()
if (!ret)
return FAILED ("9. It should return TRUE. %s", error->message);
if (argc != 2)
return FAILED ("10. argc was %d expected 2", argc);
return FAILED ("10. argc was %d", argc);
if (strcmp (argv [0], "hola"))
return FAILED ("11. argv[0] was %s", argv [0]);
if (strcmp (argv [1], "\n\\'bola"))
@@ -256,7 +243,7 @@ test_shell_argv4 ()
if (!ret)
return FAILED ("1. It should return TRUE");
if (argc != 3)
return FAILED ("2. argc was %d expected 3", argc);
return FAILED ("2. argc was %d", argc);
if (argv == NULL)
return FAILED ("3. argv[0] was NULL");
if (error != NULL)
@@ -272,37 +259,6 @@ test_shell_argv4 ()
return OK;
}
// This is https://bugzilla.novell.com/show_bug.cgi?id=655896
RESULT
test_shell_argv5 ()
{
GError *error;
gint argc;
gchar **argv;
gboolean ret;
char *str = "echo \"foo\",\"bar\"";
argv = NULL;
argc = 0;
error = NULL;
ret = g_shell_parse_argv (str, &argc, &argv, &error);
if (!ret)
return FAILED ("1. It should return TRUE");
if (argc != 2)
return FAILED ("2. argc was %d expected 2", argc);
if (argv == NULL)
return FAILED ("3. argv[0] was NULL");
if (error != NULL)
return FAILED ("4. error was set");
if (strcmp (argv [0], "echo"))
return FAILED ("5. Expected echo got %s", argv [0]);
if (strcmp (argv [1], "foo,bar"))
return FAILED ("6. Expected foo,bar, got: %s", argv [1]);
return OK;
}
RESULT
test_quote ()
{
@@ -318,11 +274,10 @@ test_quote ()
}
static Test shell_tests [] = {
{"test_shell_argv1", test_shell_argv1},
{"test_shell_argv2", test_shell_argv2},
{"test_shell_argv3", test_shell_argv3},
{"test_shell_argv4", test_shell_argv4},
{"test_shell_argv5", test_shell_argv5},
{"g_shell_parse_argv1", test_shell_argv1},
{"g_shell_parse_argv2", test_shell_argv2},
{"g_shell_parse_argv3", test_shell_argv3},
{"g_shell_parse_argv4", test_shell_argv4},
{"g_shell_quote", test_quote},
{NULL, NULL}
};
-25
View File
@@ -621,30 +621,6 @@ test_ascii_strdown ()
return OK;
}
RESULT
test_strdupv ()
{
gchar **one;
gchar **two;
gint len;
one = g_strdupv (NULL);
if (one)
return FAILED ("Should have been NULL");
one = g_malloc (sizeof (gchar *));
*one = NULL;
two = g_strdupv (one);
if (!two)
FAILED ("Should have been not NULL");
len = g_strv_length (two);
if (len)
FAILED ("Should have been 0");
g_strfreev (two);
g_strfreev (one);
return NULL;
}
static Test strutil_tests [] = {
{"g_strfreev", test_strfreev},
{"g_strconcat", test_concat},
@@ -663,7 +639,6 @@ static Test strutil_tests [] = {
{"g_strescape", test_strescape},
{"g_ascii_strncasecmp", test_ascii_strncasecmp },
{"g_ascii_strdown", test_ascii_strdown },
{"g_strdupv", test_strdupv },
{NULL, NULL}
};
+4
View File
@@ -0,0 +1,4 @@
ADD_DEFINITIONS(${GMODULE_CFLAGS})
ADD_LIBRARY(ikvm_native SHARED jni.c os.c jni.h)
TARGET_LINK_LIBRARIES(ikvm_native ${GMODULE_LIBS})
-1
View File
@@ -22,4 +22,3 @@
/autom4te.cache
/libgc-mono.pc
/libgc-mono-*.tar.gz
dolt*
+196
View File
@@ -0,0 +1,196 @@
# based on configure.in/Makefile.am, which is:
# 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>
# This is in sync with the configure.in/Makefile.am at r135583
#
# This is a cmake build file for libgc
# Only the functionality needed by mono is supported
#
# FIXME:
add_definitions("-g -O2")
set(THREADS ${libgc_threads})
set(THREADDLLIBS "")
if (THREADS STREQUAL "no" OR THREADS STREQUAL "none" OR THREADS STREQUAL "single")
set(THREADS none)
endif()
if (THREADS STREQUAL "posix" OR THREADS STREQUAL "pthreads")
set(THREADS posix)
set(THREADDLLIBS "-lpthread")
if (${host} MATCHES "x86-.*-linux.*|ia64-.*-linux.*|i386-.*-linux.*|i486-.*-linux.*|i586-.*-linux.*|i686-.*-linux.*|x86_64-.*-linux.*|alpha.*-.*-linux.*|s390.*-.*-linux.*|sparc.*-.*-linux.*|powerpc-.*-linux.*")
add_definitions(-DGC_LINUX_THREADS -D_REENTRANT)
set(parallel_mark_supported yes)
add_definitions(-DTHREAD_LOCAL_ALLOC)
elseif(${host} MATCHES ".*-linux.*")
add_definitions(-DGC_LINUX_THREADS -D_REENTRANT)
elseif(${host} MATCHES ".*-aix.*")
add_definitions(-DGC_AIX_THREADS -D_REENTRANT)
elseif(${host} MATCHES ".*-hpux.*")
message("Only HP/UX 11 threads are supported.")
add_definitions(-DGC_HPUX_THREADS -D_REENTRANT -D_POSIX_C_SOURCE=199506L)
add_definitions(-DTHREAD_LOCAL_ALLOC)
set(parallel_mark_supported yes)
set(THREADDLLIBS "-lpthread -lrt")
elseif(${host} ".*-.*-freebsd.*")
add_definitions(-DGC_FREEBSD_THREADS)
message(FATAL_ERROR "todo")
### if test "x$PTHREAD_CFLAGS" != "x"; then
### INCLUDES="$INCLUDES $PTHREAD_CFLAGS"
### fi
### if test "x$PTHREAD_LIBS" = "x"; then
### THREADDLLIBS=-pthread
### else
### THREADDLLIBS="$PTHREAD_LIBS"
### fi
elseif(${host} ".*-.*-freebsd.*")
add_definitions(-DGC_SOLARIS_THREADS -DGC_SOLARIS_PTHREADS)
elseif(${host} ".*-.*-irix.*")
add_definitions(-DGC_IRIX_THREADS)
elseif(${host} ".*-.*-cygwin.*")
add_definitons(-DGC_WIN32_THREADS)
elseif(${host} ".*-.*-darwin.*")
add_definitons(-DGC_DARWIN_THREADS -DTHREAD_LOCAL_ALLOC)
set(parallel_mark_supported yes)
elseif(${host} ".*-.*-netbsd.*")
add_definitions(-DGC_NETBSD_THREADS -DTHREAD_LOCAL_ALLOC)
set(parallel_mark_supported yes)
elseif(${host} ".*-.*-osf.*")
add_definitions(GC_OSF1_THREADS -DTHREAD_LOCAL_ALLOC)
set(parallel_mark_supported yes)
add_definitions(-pthread)
set(THREADDLLIBS "-lpthread -lrt")
else()
message(FATAL_ERROR "Pthreads not supported by the GC on this platform.")
endif()
endif()
if(THREADS STREQUAL "win32")
add_definitions(GC_WIN32_THREADS)
# Wine getenv may not return NULL for missing entry
add_definitions(NO_GETENV)
if (enable_win32_dllmain)
add_definitions(gc_inside_dll)
endif()
endif()
if(${host} MATCHES "powerpc-.*-darwin.*")
set(powerpc_darwin yes)
endif()
if(parallel_mark_supported AND enable_parallel_mark)
add_definitions("-DPARALLEL_MARK")
endif()
# Configuration of machine-dependent code
ac_msg_checking("which machine-dependent code should be used")
###AC_MSG_CHECKING(
###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"
### ;;
###esac
if(NOT machdep)
set(machdep "mach_dep.c")
endif()
ac_msg_result("${machdep}")
ac_msg_checking("for threads package to use")
ac_msg_result("${THREADS}")
# Include defines that have become de facto standard.
# ALL_INTERIOR_POINTERS can be overridden in startup code.
add_definitions(-DSILENT -DNO_SIGNALS -DNO_EXECUTE_PERMISSION)
# AC_DEFINE(ALL_INTERIOR_POINTERS)
# By default, make the library as general as possible.
add_definitions(-DJAVA_FINALIZATION -DGC_GCJ_SUPPORT -DATOMIC_UNCOLLECTABLE)
add_definitions(-D_IN_LIBGC)
set(SUBDIRS include doc)
foreach(dir ${SUBDIRS})
add_subdirectory(${dir})
endforeach()
set(top_srcdir ../)
# .. is needed for mono/utils/mono-compiler.h
INCLUDE_DIRECTORIES(. .. include)
add_definitions(${CPPFLAGS})
if(powerpc_darwin)
set(asm_libgc_sources powerpc_darwin_mach_dep.s)
endif()
set(libmonogc_la_SOURCES
allchblk.c alloc.c blacklst.c checksums.c dbg_mlc.c
dyn_load.c finalize.c gc_dlopen.c gcj_mlc.c headers.c
malloc.c mallocx.c mark.c mark_rts.c misc.c new_hblk.c
obj_map.c os_dep.c pcr_interface.c ptr_chck.c real_malloc.c reclaim.c
solaris_pthreads.c solaris_threads.c specific.c stubborn.c typd_mlc.c
backgraph.c win32_threads.c
pthread_support.c pthread_stop_world.c darwin_stop_world.c
${asm_libgc_sources} ${machdep})
add_library(monogc-static STATIC ${libmonogc_la_SOURCES})
target_link_libraries (${THREADDLLIBS} ${UNWINDLIBS})
+7 -9
View File
@@ -36,10 +36,8 @@ EXTRA_DIST =
if POWERPC_DARWIN
asm_libgc_sources = powerpc_darwin_mach_dep.s
endif
if TARGET_IA64
asm_libgc_sources = ia64_save_regs_in_stack.s
else
asm_libgc_sources =
endif
libmonogc_la_SOURCES = allchblk.c alloc.c blacklst.c checksums.c dbg_mlc.c \
@@ -49,12 +47,12 @@ obj_map.c os_dep.c pcr_interface.c ptr_chck.c real_malloc.c reclaim.c \
solaris_pthreads.c solaris_threads.c specific.c stubborn.c typd_mlc.c \
backgraph.c win32_threads.c \
pthread_support.c pthread_stop_world.c darwin_stop_world.c \
openbsd_stop_world.c mach_dep.c $(asm_libgc_sources)
$(asm_libgc_sources)
# Include THREADDLLIBS here to ensure that the correct versions of
# linuxthread semaphore functions get linked:
libmonogc_la_LIBADD = $(THREADDLLIBS) $(UNWINDLIBS)
libmonogc_la_DEPENDENCIES =
libmonogc_la_LIBADD = @addobjs@ $(THREADDLLIBS) $(UNWINDLIBS)
libmonogc_la_DEPENDENCIES = @addobjs@
libmonogc_la_LDFLAGS = -version-info 1:2:0
EXTRA_libmonogc_la_SOURCES = alpha_mach_dep.S \
@@ -95,7 +93,7 @@ endif
#TESTS = gctest $(extra_checks)
## FIXME: relies on internal code generated by automake.
all_objs = $(libgc_la_OBJECTS)
all_objs = @addobjs@ $(libgc_la_OBJECTS)
$(all_objs) : include/private/gcconfig.h include/private/gc_priv.h \
include/private/gc_hdrs.h include/gc.h include/gc_gcj.h include/gc_mark.h
@@ -115,7 +113,7 @@ endif
## We have our own definition of LTCOMPILE because we want to use our
## CFLAGS, not those passed in from the top level make.
LTCOMPILE = $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(INCLUDES) \
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) \
-I$(top_srcdir)/include $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(MY_CFLAGS) $(GC_CFLAGS)
LINK = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(MY_CFLAGS) $(LDFLAGS) -o $@
+43 -177
View File
@@ -1,181 +1,47 @@
dnl dolt, a replacement for libtool
dnl Copyright © 2007-2008 Josh Triplett <[email protected]>
dnl Copying and distribution of this file, with or without modification,
dnl are permitted in any medium without royalty provided the copyright
dnl notice and this notice are preserved.
dnl
dnl To use dolt, invoke the DOLT macro immediately after the libtool macros.
dnl Optionally, copy this file into acinclude.m4, to avoid the need to have it
dnl installed when running autoconf on your project.
#
#
# 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.
#
# Modified by: Grzegorz Jakacki <jakacki at acm dot org>
AC_DEFUN([DOLT], [
AC_REQUIRE([AC_CANONICAL_HOST])
# dolt, a replacement for libtool
# Josh Triplett <[email protected]>
AC_PATH_PROG(DOLT_BASH, bash)
AC_MSG_CHECKING([if dolt supports this host])
dolt_supported=yes
if test x$DOLT_BASH = x; then
dolt_supported=no
fi
if test x$GCC != xyes; then
dolt_supported=no
fi
case $host in
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*)
pic_options='-DDLL_EXPORT'
;;
i?86-apple-darwin*)
pic_options='-fno-common'
;;
*)
dolt_supported=no
;;
esac
if test x$dolt_supported = xno ; then
AC_MSG_RESULT([no, falling back to libtool])
LTCOMPILE='$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(COMPILE)'
LTCXXCOMPILE='$(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXXCOMPILE)'
else
AC_MSG_RESULT([yes, replacing libtool])
# GC_SET_VERSION
# sets and AC_DEFINEs GC_VERSION_MAJOR, GC_VERSION_MINOR and GC_ALPHA_VERSION
# based on the contents of PACKAGE_VERSION; PACKAGE_VERSION must conform to
# [0-9]+[.][0-9]+(alpha[0.9]+)?
# in lex syntax; if there is no alpha number, GC_ALPHA_VERSION is empty
#
AC_DEFUN(GC_SET_VERSION, [
AC_MSG_CHECKING(GC version numbers)
GC_VERSION_MAJOR=`echo $PACKAGE_VERSION | sed 's/^\([[0-9]][[0-9]]*\)[[.]].*$/\1/g'`
GC_VERSION_MINOR=`echo $PACKAGE_VERSION | sed 's/^[[^.]]*[[.]]\([[0-9]][[0-9]]*\).*$/\1/g'`
GC_ALPHA_VERSION=`echo $PACKAGE_VERSION | sed 's/^[[^.]]*[[.]][[0-9]]*//'`
dnl Start writing out doltcompile.
cat <<__DOLTCOMPILE__EOF__ >doltcompile
#!$DOLT_BASH
__DOLTCOMPILE__EOF__
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
args=("$[]@")
for ((arg=0; arg<${#args@<:@@@:>@}; arg++)) ; do
if test x"${args@<:@$arg@:>@}" = x-o ; then
objarg=$((arg+1))
break
fi
done
if test x$objarg = x ; then
echo 'Error: no -o on compiler command line' 1>&2
exit 1
fi
lo="${args@<:@$objarg@:>@}"
obj="${lo%.lo}"
if test x"$lo" = x"$obj" ; then
echo "Error: libtool object file name \"$lo\" does not end in .lo" 1>&2
exit 1
fi
objbase="${obj##*/}"
__DOLTCOMPILE__EOF__
case "$GC_ALPHA_VERSION" in
alpha*)
GC_ALPHA_VERSION=`echo $GC_ALPHA_VERSION \
| sed 's/alpha\([[0-9]][[0-9]]*\)/\1/'` ;;
*) GC_ALPHA_MAJOR='' ;;
esac
dnl Write out shared compilation code.
if test x$enable_shared = xyes; then
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
libobjdir="${obj%$objbase}.libs"
if test ! -d "$libobjdir" ; then
mkdir_out="$(mkdir "$libobjdir" 2>&1)"
mkdir_ret=$?
if test "$mkdir_ret" -ne 0 && test ! -d "$libobjdir" ; then
echo "$mkdir_out" 1>&2
exit $mkdir_ret
fi
fi
pic_object="$libobjdir/$objbase.o"
args@<:@$objarg@:>@="$pic_object"
__DOLTCOMPILE__EOF__
cat <<__DOLTCOMPILE__EOF__ >>doltcompile
"\${args@<:@@@:>@}" $pic_options -DPIC || exit \$?
__DOLTCOMPILE__EOF__
fi
dnl Write out static compilation code.
dnl Avoid duplicate compiler output if also building shared objects.
if test x$enable_static = xyes; then
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
non_pic_object="$obj.o"
args@<:@$objarg@:>@="$non_pic_object"
__DOLTCOMPILE__EOF__
if test x$enable_shared = xyes; then
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
"${args@<:@@@:>@}" >/dev/null 2>&1 || exit $?
__DOLTCOMPILE__EOF__
else
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
"${args@<:@@@:>@}" || exit $?
__DOLTCOMPILE__EOF__
fi
fi
dnl Write out the code to write the .lo file.
dnl The second line of the .lo file must match "^# Generated by .*libtool"
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
{
echo "# $lo - a libtool object file"
echo "# Generated by doltcompile, not libtool"
__DOLTCOMPILE__EOF__
if test x$enable_shared = xyes; then
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
echo "pic_object='.libs/${objbase}.o'"
__DOLTCOMPILE__EOF__
else
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
echo pic_object=none
__DOLTCOMPILE__EOF__
fi
if test x$enable_static = xyes; then
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
echo "non_pic_object='${objbase}.o'"
__DOLTCOMPILE__EOF__
else
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
echo non_pic_object=none
__DOLTCOMPILE__EOF__
fi
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
} > "$lo"
__DOLTCOMPILE__EOF__
dnl Done writing out doltcompile; substitute it for libtool compilation.
chmod +x doltcompile
LTCOMPILE='$(top_builddir)/doltcompile $(COMPILE)'
LTCXXCOMPILE='$(top_builddir)/doltcompile $(CXXCOMPILE)'
dnl automake ignores LTCOMPILE and LTCXXCOMPILE when it has separate CFLAGS for
dnl a target, so write out a libtool wrapper to handle that case.
dnl Note that doltlibtool does not handle inferred tags or option arguments
dnl without '=', because automake does not use them.
cat <<__DOLTLIBTOOL__EOF__ > doltlibtool
#!$DOLT_BASH
__DOLTLIBTOOL__EOF__
cat <<'__DOLTLIBTOOL__EOF__' >>doltlibtool
top_builddir_slash="${0%%doltlibtool}"
: ${top_builddir_slash:=./}
args=()
modeok=false
tagok=false
for arg in "$[]@"; do
case "$arg" in
--mode=compile) modeok=true ;;
--tag=CC|--tag=CXX) tagok=true ;;
--quiet) ;;
*) args@<:@${#args[@]}@:>@="$arg" ;;
esac
done
if $modeok && $tagok ; then
. ${top_builddir_slash}doltcompile "${args@<:@@@:>@}"
else
exec ${top_builddir_slash}libtool "$[]@"
fi
__DOLTLIBTOOL__EOF__
dnl Done writing out doltlibtool; substitute it for libtool.
chmod +x doltlibtool
LIBTOOL='$(top_builddir)/doltlibtool'
fi
AC_SUBST(LTCOMPILE)
AC_SUBST(LTCXXCOMPILE)
# end dolt
if test :$GC_VERSION_MAJOR: = :: \
-o :$GC_VERSION_MINOR: = :: ;
then
AC_MSG_RESULT(invalid)
AC_MSG_ERROR([nonconforming PACKAGE_VERSION='$PACKAGE_VERSION'])
fi
AC_DEFINE_UNQUOTED(GC_VERSION_MAJOR, $GC_VERSION_MAJOR)
AC_DEFINE_UNQUOTED(GC_VERSION_MINOR, $GC_VERSION_MINOR)
if test :$GC_ALPHA_VERSION: != :: ; then
AC_DEFINE_UNQUOTED(GC_ALPHA_VERSION, $GC_ALPHA_VERSION)
fi
AC_MSG_RESULT(major=$GC_VERSION_MAJOR minor=$GC_VERSION_MINOR \
${GC_ALPHA_VERSION:+alpha=}$GC_ALPHA_VERSION)
])
+3 -23
View File
@@ -94,7 +94,7 @@ case "$THREADS" in
fi
AC_DEFINE(THREAD_LOCAL_ALLOC)
;;
*-*-linux* | *-*-nacl*)
*-*-linux*)
AC_DEFINE(GC_LINUX_THREADS)
AC_DEFINE(_REENTRANT)
;;
@@ -147,13 +147,6 @@ case "$THREADS" in
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
@@ -337,11 +330,7 @@ case "$host" in
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)
machdep="mach_dep.lo ia64_save_regs_in_stack.lo"
;;
esac
if test x"$machdep" = x; then
@@ -349,21 +338,12 @@ 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(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
+1 -8
View File
@@ -57,7 +57,6 @@
!defined(HPUX) && !(defined(LINUX) && defined(__ELF__)) && \
!defined(RS6000) && !defined(SCO_ELF) && !defined(DGUX) && \
!(defined(FREEBSD) && defined(__ELF__)) && \
!(defined(OPENBSD) && (defined(__ELF__) || defined(M68K))) && \
!(defined(NETBSD) && defined(__ELF__)) && !defined(HURD) && \
!defined(DARWIN)
--> We only know how to find data segments of dynamic libraries for the
@@ -93,12 +92,9 @@
#if defined(LINUX) && defined(__ELF__) || defined(SCO_ELF) || \
(defined(FREEBSD) && defined(__ELF__)) || defined(DGUX) || \
(defined(OPENBSD) && defined(__ELF__)) || \
(defined(NETBSD) && defined(__ELF__)) || defined(HURD)
# include <stddef.h>
# if !defined(OPENBSD)
# include <elf.h>
# endif
# include <link.h>
#endif
@@ -299,7 +295,6 @@ void GC_register_dynamic_libraries()
#if defined(LINUX) && defined(__ELF__) || defined(SCO_ELF) || \
(defined(FREEBSD) && defined(__ELF__)) || defined(DGUX) || \
(defined(OPENBSD) && defined(__ELF__)) || \
(defined(NETBSD) && defined(__ELF__)) || defined(HURD)
@@ -478,10 +473,8 @@ GC_bool GC_register_main_static_data()
/* This doesn't necessarily work in all cases, e.g. with preloaded
* dynamic libraries. */
#if defined(NETBSD) || defined(OPENBSD)
# if !defined(OPENBSD)
#if defined(NETBSD)
# include <sys/exec_elf.h>
# endif
/* for compatibility with 1.4.x */
# ifndef DT_DEBUG
# define DT_DEBUG 21
+1 -1
View File
@@ -25,7 +25,7 @@
#include "private/gc_priv.h"
# if defined(DYNAMIC_LOADING) && (defined(GC_PTHREADS) && !defined(GC_DARWIN_THREADS)) \
# if (defined(GC_PTHREADS) && !defined(GC_DARWIN_THREADS)) \
|| defined(GC_SOLARIS_THREADS)
# if defined(dlopen) && !defined(GC_USE_LD_WRAP)
-5
View File
@@ -57,7 +57,6 @@
defined(GC_HPUX_THREADS) || defined(GC_OSF1_THREADS) || \
defined(GC_DGUX386_THREADS) || defined(GC_DARWIN_THREADS) || \
defined(GC_AIX_THREADS) || defined(GC_NETBSD_THREADS) || \
defined(GC_OPENBSD_THREADS) || \
(defined(GC_WIN32_THREADS) && defined(__CYGWIN32__))
# define GC_PTHREADS
# endif
@@ -88,10 +87,6 @@
# define GC_DARWIN_THREADS
# define GC_PTHREADS
# endif
# if !defined(GC_PTHREADS) && defined(__OpenBSD__)
# define GC_OPENBSD_THREADS
# define GC_PTHREADS
# endif
# if !defined(GC_PTHREADS) && defined(__FreeBSD__)
# define GC_FREEBSD_THREADS
# define GC_PTHREADS
-5
View File
@@ -59,11 +59,6 @@
#endif
int GC_pthread_join(pthread_t thread, void **retval);
int GC_pthread_detach(pthread_t thread);
#if defined(__native_client__) || defined(NACL)
void GC_pthread_exit(void *status);
# undef pthread_exit
# define pthread_exit GC_pthread_exit
#endif
#if defined(GC_OSF1_THREADS) \
&& defined(_PTHREAD_USE_MANGLED_NAMES_) && !defined(_PTHREAD_USE_PTDNAM_)
-8
View File
@@ -250,14 +250,6 @@
#endif
}
# define GC_TEST_AND_SET_DEFINED
inline static void GC_clear(volatile unsigned int *addr) {
#ifdef HAVE_ARMV6
/* Memory barrier */
__asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" : : "r" (0) : "memory");
#endif
*(addr) = 0;
}
# define GC_CLEAR_DEFINED
# endif /* ARM32 */
# ifdef CRIS
inline static int GC_test_and_set(volatile unsigned int *addr) {
-2
View File
@@ -1962,8 +1962,6 @@ void GC_err_puts GC_PROTO((GC_CONST char *s));
/* SPARC/Linux doesn't properly define SIGPWR in <signal.h>.
* It is aliased to SIGLOST in asm/signal.h, though. */
# define SIG_SUSPEND SIGLOST
# elif defined(NACL)
# define SIG_SUSPEND 0
# else
/* Linuxthreads itself uses SIGUSR1 and SIGUSR2. */
# define SIG_SUSPEND SIGPWR
+7 -75
View File
@@ -65,11 +65,6 @@
# endif
/* Determine the machine type: */
# if defined(__native_client__)
# define NACL
# define I386
# define mach_type_known
# endif
# if defined(__arm__) || defined(__thumb__)
# define ARM32
# if !defined(LINUX) && !defined(NETBSD) && !defined(DARWIN)
@@ -236,10 +231,6 @@
# define I386
# define mach_type_known
# endif
# if defined(OPENBSD) && defined(__amd64__)
# define X86_64
# define mach_type_known
# endif
# if defined(LINUX) && defined(__x86_64__)
# define X86_64
# define mach_type_known
@@ -1091,19 +1082,13 @@
# endif
# ifdef I386
# if defined( NACL )
# define MACH_TYPE "NACL"
# define MACH_TYPE "I386"
# if defined(__LP64__) || defined(_WIN64)
# define CPP_WORDSZ 64
# define ALIGNMENT 8
# else
# define CPP_WORDSZ 32
# define ALIGNMENT 4
# else
# define MACH_TYPE "I386"
# if defined(__LP64__) || defined(_WIN64)
# define CPP_WORDSZ 64
# define ALIGNMENT 8
# else
# define CPP_WORDSZ 32
# define ALIGNMENT 4
# endif
/* Appears to hold for all "32 bit" compilers */
/* except Borland. The -a4 option fixes */
/* Borland. */
@@ -1199,32 +1184,7 @@
# define HEAP_START DATAEND
# endif /* USE_MMAP */
# endif /* DGUX */
# ifdef NACL
# define OS_TYPE "NACL"
extern int etext[];
# define DATASTART ((ptr_t)((((word) (etext)) + 0xfff) & ~0xfff))
extern int _end[];
# define DATAEND (_end)
# ifdef STACK_GRAN
# undef STACK_GRAN
# endif /* STACK_GRAN */
# define STACK_GRAN 0x10000
# define HEURISTIC1
# ifdef USE_MMAP
# undef USE_MMAP
# endif
# ifdef USE_MUNMAP
# undef USE_MUNMAP
# endif
# ifdef USE_MMAP_ANON
# undef USE_MMAP_ANON
# endif
# ifdef USE_MMAP_FIXED
# undef USE_MMAP_FIXED
# endif
# define GETPAGESIZE() 65536
# define MAX_NACL_GC_THREADS 1024
# endif
# ifdef LINUX
# ifndef __GNUC__
/* The Intel compiler doesn't like inline assembly */
@@ -1344,18 +1304,6 @@
# endif
# ifdef OPENBSD
# define OS_TYPE "OPENBSD"
# ifdef GC_OPENBSD_THREADS
# define UTHREAD_SP_OFFSET 192
# else
# include <sys/param.h>
# include <uvm/uvm_extern.h>
# define STACKBOTTOM USRSTACK
# endif
extern int __data_start[];
# define DATASTART ((ptr_t)(__data_start))
extern char _end[];
# define DATAEND ((ptr_t)(&_end))
# define DYNAMIC_LOADING
# endif
# ifdef FREEBSD
# define OS_TYPE "FREEBSD"
@@ -2138,22 +2086,6 @@
extern char etext[];
# define SEARCH_FOR_DATA_START
# endif
# ifdef OPENBSD
# define OS_TYPE "OPENBSD"
# define ELF_CLASS ELFCLASS64
# ifdef GC_OPENBSD_THREADS
# define UTHREAD_SP_OFFSET 400
# else
# include <sys/param.h>
# include <uvm/uvm_extern.h>
# define STACKBOTTOM USRSTACK
# endif
extern int __data_start[];
# define DATASTART ((ptr_t)(__data_start))
extern char _end[];
# define DATAEND ((ptr_t)(&_end))
# define DYNAMIC_LOADING
# endif
# endif
#if defined(LINUX) && defined(USE_MMAP)
@@ -2307,7 +2239,7 @@
# if defined(GC_IRIX_THREADS) && !defined(IRIX5)
--> inconsistent configuration
# endif
# if defined(GC_LINUX_THREADS) && !(defined(LINUX) || defined(NACL))
# if defined(GC_LINUX_THREADS) && !defined(LINUX)
--> inconsistent configuration
# endif
# if defined(GC_SOLARIS_THREADS) && !defined(SUNOS5)
@@ -1,12 +0,0 @@
#ifndef GC_OPENBSD_STOP_WORLD_H
#define GC_OPENBSD_STOP_WORLD_H
#if !defined(GC_OPENBSD_THREADS)
#error openbsd_stop_world.h included without GC_OPENBSD_THREADS defined
#endif
struct thread_stop_info {
ptr_t stack_ptr; /* Valid only when stopped. */
};
#endif
@@ -7,15 +7,6 @@ struct thread_stop_info {
/* last successfully handled a suspend */
/* signal. */
ptr_t stack_ptr; /* Valid only when stopped. */
#ifdef NACL
/* Grab NACL_GC_REG_STORAGE_SIZE pointers off the stack when going into */
/* a syscall. 20 is more than we need, but it's an overestimate in case*/
/* the instrumented function uses any callee saved registers, they may */
/* be pushed to the stack much earlier. Also, on amd64 'push' puts 8 */
/* bytes on the stack even though our pointers are 4 bytes. */
#define NACL_GC_REG_STORAGE_SIZE 20
ptr_t reg_storage[NACL_GC_REG_STORAGE_SIZE];
#endif
};
#endif
-8
View File
@@ -8,8 +8,6 @@
#if defined(GC_DARWIN_THREADS)
# include "private/darwin_stop_world.h"
#elif defined(GC_OPENBSD_THREADS)
# include "private/openbsd_stop_world.h"
#else
# include "private/pthread_stop_world.h"
#endif
@@ -28,9 +26,6 @@ typedef struct GC_Thread_Rep {
/* guaranteed to be dead, but we may */
/* not yet have registered the join.) */
pthread_t id;
#ifdef PLATFORM_ANDROID
pid_t kernel_id;
#endif
/* Extra bookkeeping information the stopping code uses */
struct thread_stop_info stop_info;
@@ -92,9 +87,6 @@ typedef struct GC_Thread_Rep {
# define THREAD_TABLE_SZ 128 /* Must be power of 2 */
extern volatile GC_thread GC_threads[THREAD_TABLE_SZ];
#ifdef NACL
extern __thread GC_thread gc_thread_self;
#endif
extern GC_bool GC_thr_initialized;
+1 -1
View File
@@ -492,7 +492,7 @@ ptr_t cold_gc_frame;
/* the stack. Return sp. */
# ifdef SPARC
asm(" .seg \"text\"");
# if defined(SVR4) || defined(NETBSD) || defined(FREEBSD) || defined(OPENBSD)
# if defined(SVR4) || defined(NETBSD) || defined(FREEBSD)
asm(" .globl GC_save_regs_in_stack");
asm("GC_save_regs_in_stack:");
asm(" .type GC_save_regs_in_stack,#function");
+2 -2
View File
@@ -473,7 +473,7 @@ size_t GC_get_total_bytes GC_PROTO(())
int GC_get_suspend_signal GC_PROTO(())
{
#if defined(SIG_SUSPEND) && defined(GC_PTHREADS) && !defined(GC_MACOSX_THREADS) && !defined(GC_OPENBSD_THREADS)
#if defined(SIG_SUSPEND) && defined(GC_PTHREADS) && !defined(GC_MACOSX_THREADS)
return SIG_SUSPEND;
#else
return -1;
@@ -684,7 +684,7 @@ void GC_init_inner()
# if defined(SEARCH_FOR_DATA_START)
GC_init_linux_data_start();
# endif
# if defined(NETBSD) && defined(__ELF__)
# if (defined(NETBSD) || defined(OPENBSD)) && defined(__ELF__)
GC_init_netbsd_elf();
# endif
# if defined(GC_PTHREADS) || defined(GC_SOLARIS_THREADS) \
-161
View File
@@ -1,161 +0,0 @@
#include "private/pthread_support.h"
/* derived from pthread_stop_world.c */
# if defined(GC_OPENBSD_THREADS)
#define THREAD_EQUAL(id1, id2) pthread_equal(id1, id2)
/* We hold allocation lock. Should do exactly the right thing if the */
/* world is stopped. Should not fail if it isn't. */
void GC_push_all_stacks()
{
GC_bool found_me = FALSE;
size_t nthreads = 0;
int i;
GC_thread p;
ptr_t lo, hi;
pthread_t me = pthread_self();
if (!GC_thr_initialized) GC_thr_init();
# if DEBUG_THREADS
GC_printf("Pushing stacks from thread 0x%x\n", (unsigned) me);
# endif
for (i = 0; i < THREAD_TABLE_SZ; i++) {
for (p = GC_threads[i]; p != 0; p = p -> next) {
if (p -> flags & FINISHED) continue;
++nthreads;
if (THREAD_EQUAL(p -> id, me)) {
# ifdef SPARC
lo = (ptr_t)GC_save_regs_in_stack();
# else
lo = GC_approx_sp();
# endif
found_me = TRUE;
} else {
lo = p -> stop_info.stack_ptr;
}
if ((p -> flags & MAIN_THREAD) == 0) {
hi = p -> stack_end;
} else {
/* The original stack. */
hi = GC_stackbottom;
}
# if DEBUG_THREADS
GC_printf("Stack for thread 0x%x = [%p,%p)\n",
(unsigned)(p -> id), lo, hi);
# endif
if (0 == lo) ABORT("GC_push_all_stacks: sp not set!\n");
# ifdef STACK_GROWS_UP
/* We got them backwards! */
GC_push_all_stack(hi, lo);
# else
GC_push_all_stack(lo, hi);
# endif
}
}
if (!found_me && !GC_in_thread_creation)
ABORT("Collecting from unknown thread.");
}
/* We hold the allocation lock. Suspend all threads that might */
/* still be running. */
void GC_suspend_all()
{
int i;
GC_thread p;
int result;
pthread_t my_thread = pthread_self();
for (i = 0; i < THREAD_TABLE_SZ; i++) {
for (p = GC_threads[i]; p != 0; p = p -> next) {
if (!THREAD_EQUAL(p -> id, my_thread)) {
if (p -> flags & FINISHED) continue;
if (p -> thread_blocked) /* Will wait */ continue;
# if DEBUG_THREADS
GC_printf("Suspending thread 0x%x\n",
(unsigned)(p -> id));
# endif
if (pthread_suspend_np(p -> id) != 0)
ABORT("pthread_suspend_np failed");
/*
* This will only work for userland pthreads. It will
* fail badly on rthreads. Perhaps we should consider
* a pthread_sp_np() function that returns the stack
* pointer for a suspended thread and implement in
* both pthreads and rthreads.
*/
p -> stop_info.stack_ptr = *(ptr_t*)((char *)p -> id + UTHREAD_SP_OFFSET);
}
}
}
}
void GC_stop_world()
{
int i;
GC_ASSERT(I_HOLD_LOCK());
# if DEBUG_THREADS
GC_printf("Stopping the world from 0x%x\n", (unsigned)pthread_self());
# endif
/* Make sure all free list construction has stopped before we start. */
/* No new construction can start, since free list construction is */
/* required to acquire and release the GC lock before it starts, */
/* and we have the lock. */
# ifdef PARALLEL_MARK
GC_acquire_mark_lock();
GC_ASSERT(GC_fl_builder_count == 0);
/* We should have previously waited for it to become zero. */
# endif /* PARALLEL_MARK */
GC_suspend_all();
# ifdef PARALLEL_MARK
GC_release_mark_lock();
# endif
#if DEBUG_THREADS
GC_printf("World stopped from 0x%x\n", (unsigned)pthread_self());
#endif
}
/* Caller holds allocation lock, and has held it continuously since */
/* the world stopped. */
void GC_start_world()
{
pthread_t my_thread = pthread_self();
register int i;
register GC_thread p;
register int result;
# if DEBUG_THREADS
GC_printf("World starting\n");
# endif
for (i = 0; i < THREAD_TABLE_SZ; i++) {
for (p = GC_threads[i]; p != 0; p = p -> next) {
if (!THREAD_EQUAL(p -> id, my_thread)) {
if (p -> flags & FINISHED) continue;
if (p -> thread_blocked) continue;
#if DEBUG_THREADS
GC_printf("Resuming thread 0x%x\n",
(unsigned)(p -> id));
#endif
if (pthread_resume_np(p -> id) != 0)
ABORT("pthread_kill failed");
}
}
}
# if DEBUG_THREADS
GC_printf("World started\n");
# endif
}
void GC_stop_init() {
}
#endif
+4 -172
View File
@@ -133,7 +133,7 @@
# include <errno.h>
#endif
#if defined( UNIX_LIKE ) || defined(NACL)
#ifdef UNIX_LIKE
# include <fcntl.h>
#endif
@@ -392,7 +392,7 @@ static void *tiny_sbrk(ptrdiff_t increment)
#define sbrk tiny_sbrk
# endif /* ECOS */
#if defined(NETBSD) && defined(__ELF__)
#if (defined(NETBSD) || defined(OPENBSD)) && defined(__ELF__)
ptr_t GC_data_start;
void GC_init_netbsd_elf()
@@ -405,102 +405,6 @@ static void *tiny_sbrk(ptrdiff_t increment)
}
#endif
#if defined(OPENBSD)
static struct sigaction old_segv_act;
sigjmp_buf GC_jmp_buf_openbsd;
# if defined(GC_OPENBSD_THREADS)
# include <sys/syscall.h>
sigset_t __syscall(quad_t, ...);
# endif
/*
* Dont use GC_find_limit() because siglongjmp out of the
* signal handler by-passes our userland pthreads lib, leaving
* SIGSEGV and SIGPROF masked. Instead use this custom one
* that works-around the issues.
*/
/*ARGSUSED*/
void GC_fault_handler_openbsd(int sig)
{
siglongjmp(GC_jmp_buf_openbsd, 1);
}
/* Return the first nonaddressible location > p or bound */
/* Requires allocation lock. */
ptr_t GC_find_limit_openbsd(ptr_t p, ptr_t bound)
{
static volatile ptr_t result;
/* Safer if static, since otherwise it may not be */
/* preserved across the longjmp. Can safely be */
/* static since it's only called with the */
/* allocation lock held. */
struct sigaction act;
size_t pgsz = (size_t)sysconf(_SC_PAGESIZE);
GC_ASSERT(I_HOLD_LOCK());
act.sa_handler = GC_fault_handler_openbsd;
sigemptyset(&act.sa_mask);
act.sa_flags = SA_NODEFER | SA_RESTART;
sigaction(SIGSEGV, &act, &old_segv_act);
if (sigsetjmp(GC_jmp_buf_openbsd, 1) == 0) {
result = (ptr_t)(((word)(p)) & ~(pgsz-1));
for (;;) {
result += pgsz;
if (result >= bound) {
result = bound;
break;
}
GC_noop1((word)(*result));
}
}
# if defined(GC_OPENBSD_THREADS)
/* due to the siglongjump we need to manually unmask SIGPROF */
__syscall(SYS_sigprocmask, SIG_UNBLOCK, sigmask(SIGPROF));
# endif
sigaction(SIGSEGV, &old_segv_act, 0);
return(result);
}
/* Return first addressable location > p or bound */
/* Requires allocation lock. */
ptr_t GC_skip_hole_openbsd(ptr_t p, ptr_t bound)
{
static volatile ptr_t result;
struct sigaction act;
size_t pgsz = (size_t)sysconf(_SC_PAGESIZE);
static volatile int firstpass;
GC_ASSERT(I_HOLD_LOCK());
act.sa_handler = GC_fault_handler_openbsd;
sigemptyset(&act.sa_mask);
act.sa_flags = SA_NODEFER | SA_RESTART;
sigaction(SIGSEGV, &act, &old_segv_act);
firstpass = 1;
result = (ptr_t)(((word)(p)) & ~(pgsz-1));
if (sigsetjmp(GC_jmp_buf_openbsd, 1) != 0 || firstpass) {
firstpass = 0;
result += pgsz;
if (result >= bound) {
result = bound;
} else
GC_noop1((word)(*result));
}
sigaction(SIGSEGV, &old_segv_act, 0);
return(result);
}
#endif
# ifdef OS2
# include <stddef.h>
@@ -618,12 +522,6 @@ void GC_enable_signals(void)
/* longjmp implementations. Most systems appear not to have */
/* a signal 32. */
# define SIGSETMASK(old, new) (old) = sigsetmask(new)
# elif defined(NACL)
/* We don't use signals in NaCl. */
# define SIGSET_T int
# define SIG_DEL(set, signal)
# define SIG_FILL(set)
# define SIGSETMASK(old, new)
# else
/* Use POSIX/SYSV interface */
# define SIGSET_T sigset_t
@@ -1123,8 +1021,7 @@ void *GC_set_stackbottom = NULL;
#endif /* FREEBSD_STACKBOTTOM */
#if !defined(BEOS) && !defined(AMIGA) && !defined(MSWIN32) \
&& !defined(MSWINCE) && !defined(OS2) && !defined(NOSYS) && !defined(ECOS) \
&& !defined(GC_OPENBSD_THREADS)
&& !defined(MSWINCE) && !defined(OS2) && !defined(NOSYS) && !defined(ECOS)
ptr_t GC_get_stack_base()
{
@@ -1184,25 +1081,6 @@ ptr_t GC_get_stack_base()
# endif /* ! AMIGA, !OS 2, ! MS Windows, !BEOS, !NOSYS, !ECOS */
#if defined(GC_OPENBSD_THREADS)
/* Find the stack using pthread_stackseg_np() */
# include <sys/signal.h>
# include <pthread.h>
# include <pthread_np.h>
#define HAVE_GET_STACK_BASE
ptr_t GC_get_stack_base()
{
stack_t stack;
pthread_stackseg_np(pthread_self(), &stack);
return stack.ss_sp;
}
#endif /* GC_OPENBSD_THREADS */
/*
* Register static data segment(s) as roots.
* If more data segments are added later then they need to be registered
@@ -1567,31 +1445,6 @@ int * etext_addr;
#else /* !OS2 && !Windows && !AMIGA */
#if defined(OPENBSD)
/*
* Depending on arch alignment there can be multiple holes
* between DATASTART & DATAEND. Scan from DATASTART - DATAEND
* and register each region.
*/
void GC_register_data_segments(void)
{
ptr_t region_start, region_end;
region_start = DATASTART;
for(;;) {
region_end = GC_find_limit_openbsd(region_start, DATAEND);
GC_add_roots_inner(region_start, region_end, FALSE);
if (region_end < DATAEND)
region_start = GC_skip_hole_openbsd(region_end, DATAEND);
else
break;
}
}
# else /* !OS2 && !Windows && !AMIGA && !OPENBSD */
void GC_register_data_segments()
{
# if !defined(PCR) && !defined(SRC_M3) && !defined(MACOS)
@@ -1651,7 +1504,6 @@ void GC_register_data_segments()
/* change. */
}
# endif /* ! OPENBSD */
# endif /* ! AMIGA */
# endif /* ! MSWIN32 && ! MSWINCE*/
# endif /* ! OS2 */
@@ -2073,21 +1925,8 @@ void GC_remap(ptr_t start, word bytes)
int result;
if (0 == start_addr) return;
#ifdef NACL
{
/* NaCl doesn't expose mprotect, but mmap should work fine */
void * mmap_result;
mmap_result = mmap(start_addr, len, PROT_READ | PROT_WRITE | OPT_PROT_EXEC,
MAP_PRIVATE | MAP_FIXED | OPT_MAP_ANON,
zero_fd, 0/* offset */);
if (mmap_result != (void *)start_addr) ABORT("mmap as mprotect failed");
/* Fake the return value as if mprotect succeeded. */
result = 0;
}
#else /* NACL */
result = mprotect(start_addr, len,
PROT_READ | PROT_WRITE | OPT_PROT_EXEC);
#endif /* NACL */
if (result != 0) {
GC_err_printf3(
"Mprotect failed at 0x%lx (length %ld) with errno %ld\n",
@@ -2131,14 +1970,7 @@ void GC_unmap_gap(ptr_t start1, word bytes1, ptr_t start2, word bytes2)
len -= free_len;
}
# else
if (len != 0) {
/* Immediately remap as above. */
void * result;
result = mmap(start_addr, len, PROT_NONE,
MAP_PRIVATE | MAP_FIXED | OPT_MAP_ANON,
zero_fd, 0/* offset */);
if (result != (void *)start_addr) ABORT("mmap(...PROT_NONE...) failed");
}
if (len != 0 && munmap(start_addr, len) != 0) ABORT("munmap failed");
GC_unmapped_bytes += len;
# endif
}
+4 -186
View File
@@ -2,14 +2,12 @@
#if defined(GC_PTHREADS) && !defined(GC_SOLARIS_THREADS) \
&& !defined(GC_IRIX_THREADS) && !defined(GC_WIN32_THREADS) \
&& !defined(GC_DARWIN_THREADS) && !defined(GC_AIX_THREADS) \
&& !defined(GC_OPENBSD_THREADS)
&& !defined(GC_DARWIN_THREADS) && !defined(GC_AIX_THREADS)
#include <signal.h>
#include <semaphore.h>
#include <errno.h>
#include <unistd.h>
#include <sys/time.h>
/* work around a dlopen issue (bug #75390), undefs to avoid warnings with redefinitions */
#undef PACKAGE_BUGREPORT
@@ -23,19 +21,6 @@
#include "include/libgc-mono-debugger.h"
#endif
#ifdef NACL
int nacl_park_threads_now = 0;
pthread_t nacl_thread_parker = -1;
int nacl_thread_parked[MAX_NACL_GC_THREADS];
int nacl_thread_used[MAX_NACL_GC_THREADS];
int nacl_thread_parking_inited = 0;
int nacl_num_gc_threads = 0;
pthread_mutex_t nacl_thread_alloc_lock = PTHREAD_MUTEX_INITIALIZER;
__thread int nacl_thread_idx = -1;
__thread GC_thread nacl_gc_thread_self = NULL;
#endif
#if DEBUG_THREADS
#ifndef NSIG
@@ -50,7 +35,6 @@ __thread GC_thread nacl_gc_thread_self = NULL;
# endif
#endif
#ifndef NACL
void GC_print_sig_mask()
{
sigset_t blocked;
@@ -64,7 +48,7 @@ void GC_print_sig_mask()
}
GC_printf0("\n");
}
#endif /* NACL */
#endif
/* Remove the signals that we want to allow in thread stopping */
@@ -131,7 +115,6 @@ sem_t GC_suspend_ack_sem;
static void _GC_suspend_handler(int sig)
{
#ifndef NACL
int dummy;
pthread_t my_thread = pthread_self();
GC_thread me;
@@ -201,8 +184,6 @@ static void _GC_suspend_handler(int sig)
#if DEBUG_THREADS
GC_printf1("Continuing 0x%lx\n", my_thread);
#endif
#endif /* NACL */
}
void GC_suspend_handler(int sig)
@@ -296,10 +277,6 @@ static void pthread_push_all_stacks()
# else
GC_push_all_stack(lo, hi);
# endif
# ifdef NACL
/* Push reg_storage as roots, this will cover the reg context */
GC_push_all_stack(p -> stop_info.reg_storage, p -> stop_info.reg_storage + NACL_GC_REG_STORAGE_SIZE);
# endif
# ifdef IA64
# if DEBUG_THREADS
GC_printf3("Reg stack for thread 0x%lx = [%lx,%lx)\n",
@@ -337,29 +314,11 @@ void GC_push_all_stacks()
pthread_t GC_stopping_thread;
int GC_stopping_pid;
#ifdef PLATFORM_ANDROID
static
int android_thread_kill(pid_t tid, int sig)
{
int ret;
int old_errno = errno;
ret = tkill(tid, sig);
if (ret < 0) {
ret = errno;
errno = old_errno;
}
return ret;
}
#endif
/* We hold the allocation lock. Suspend all threads that might */
/* still be running. Return the number of suspend signals that */
/* were sent. */
int GC_suspend_all()
{
#ifndef NACL
int n_live_threads = 0;
int i;
GC_thread p;
@@ -378,12 +337,8 @@ int GC_suspend_all()
#if DEBUG_THREADS
GC_printf1("Sending suspend signal to 0x%lx\n", p -> id);
#endif
#ifndef PLATFORM_ANDROID
result = pthread_kill(p -> id, SIG_SUSPEND);
#else
result = android_thread_kill(p -> kernel_id, SIG_SUSPEND);
#endif
switch(result) {
case ESRCH:
/* Not really there anymore. Possible? */
@@ -398,15 +353,11 @@ int GC_suspend_all()
}
}
return n_live_threads;
#else /* NACL */
return 0;
#endif
}
/* Caller holds allocation lock. */
static void pthread_stop_world()
{
#ifndef NACL
int i;
int n_live_threads;
int code;
@@ -458,128 +409,8 @@ static void pthread_stop_world()
GC_printf1("World stopped from 0x%lx\n", pthread_self());
#endif
GC_stopping_thread = 0; /* debugging only */
#else /* NACL */
GC_thread p;
int i;
#if DEBUG_THREADS
GC_printf1("pthread_stop_world: num_threads %d\n", nacl_num_gc_threads - 1);
#endif
nacl_thread_parker = pthread_self();
nacl_park_threads_now = 1;
while (1) {
#define NACL_PARK_WAIT_NANOSECONDS 100000
int num_threads_parked = 0;
struct timespec ts;
int num_used = 0;
/* Check the 'parked' flag for each thread the GC knows about */
for (i = 0; i < MAX_NACL_GC_THREADS && num_used < nacl_num_gc_threads; i++) {
if (nacl_thread_used[i] == 1) {
num_used++;
if (nacl_thread_parked[i] == 1) {
num_threads_parked++;
}
}
}
/* -1 for the current thread */
if (num_threads_parked >= nacl_num_gc_threads - 1)
break;
ts.tv_sec = 0;
ts.tv_nsec = NACL_PARK_WAIT_NANOSECONDS;
#if DEBUG_THREADS
GC_printf1("sleeping waiting for %d threads to park...\n", nacl_num_gc_threads - num_threads_parked - 1);
#endif
nanosleep(&ts, 0);
}
#endif /* NACL */
}
#ifdef NACL
#if __x86_64__
#define NACL_STORE_REGS() \
do { \
asm("push %rbx");\
asm("push %rbp");\
asm("push %r12");\
asm("push %r13");\
asm("push %r14");\
asm("push %r15");\
asm("mov %%esp, %0" : "=m" (nacl_gc_thread_self->stop_info.stack_ptr));\
memcpy(nacl_gc_thread_self->stop_info.reg_storage, nacl_gc_thread_self->stop_info.stack_ptr, NACL_GC_REG_STORAGE_SIZE * sizeof(ptr_t));\
asm("add $48, %esp");\
asm("add %r15, %rsp");\
} while (0)
#elif __i386__
#define NACL_STORE_REGS() \
do { \
asm("push %ebx");\
asm("push %ebp");\
asm("push %esi");\
asm("push %edi");\
asm("mov %%esp, %0" : "=m" (nacl_gc_thread_self->stop_info.stack_ptr));\
memcpy(nacl_gc_thread_self->stop_info.reg_storage, nacl_gc_thread_self->stop_info.stack_ptr, NACL_GC_REG_STORAGE_SIZE * sizeof(ptr_t));\
asm("add $16, %esp");\
} while (0)
#endif
void nacl_pre_syscall_hook()
{
int local_dummy = 0;
if (nacl_thread_idx != -1) {
NACL_STORE_REGS();
nacl_gc_thread_self->stop_info.stack_ptr = (ptr_t)(&local_dummy);
nacl_thread_parked[nacl_thread_idx] = 1;
}
}
void nacl_post_syscall_hook()
{
/* Calling __nacl_suspend_thread_if_needed() right away should guarantee we don't mutate the GC set. */
__nacl_suspend_thread_if_needed();
if (nacl_thread_idx != -1) {
nacl_thread_parked[nacl_thread_idx] = 0;
}
}
void __nacl_suspend_thread_if_needed() {
if (nacl_park_threads_now) {
pthread_t self = pthread_self();
int local_dummy = 0;
/* Don't try to park the thread parker. */
if (nacl_thread_parker == self)
return;
/* This can happen when a thread is created */
/* outside of the GC system (wthread mostly). */
if (nacl_thread_idx < 0)
return;
/* If it was already 'parked', we're returning from a syscall, */
/* so don't bother storing registers again, the GC has a set. */
if (!nacl_thread_parked[nacl_thread_idx]) {
NACL_STORE_REGS();
nacl_gc_thread_self->stop_info.stack_ptr = (ptr_t)(&local_dummy);
}
nacl_thread_parked[nacl_thread_idx] = 1;
while (nacl_park_threads_now)
; /* spin */
nacl_thread_parked[nacl_thread_idx] = 0;
/* Clear out the reg storage for next suspend. */
memset(nacl_gc_thread_self->stop_info.reg_storage, 0, NACL_GC_REG_STORAGE_SIZE * sizeof(ptr_t));
}
}
#endif /* NACL */
/* Caller holds allocation lock. */
void GC_stop_world()
{
@@ -612,7 +443,6 @@ void GC_stop_world()
/* the world stopped. */
static void pthread_start_world()
{
#ifndef NACL
pthread_t my_thread = pthread_self();
register int i;
register GC_thread p;
@@ -635,12 +465,8 @@ static void pthread_start_world()
#if DEBUG_THREADS
GC_printf1("Sending restart signal to 0x%lx\n", p -> id);
#endif
#ifndef PLATFORM_ANDROID
result = pthread_kill(p -> id, SIG_THR_RESTART);
#else
result = android_thread_kill(p -> kernel_id, SIG_THR_RESTART);
#endif
switch(result) {
case ESRCH:
/* Not really there anymore. Possible? */
@@ -673,12 +499,6 @@ static void pthread_start_world()
#if DEBUG_THREADS
GC_printf0("World started\n");
#endif
#else /* NACL */
# if DEBUG_THREADS
GC_printf0("World starting\n");
# endif
nacl_park_threads_now = 0;
#endif /* NACL */
}
void GC_start_world()
@@ -692,7 +512,6 @@ void GC_start_world()
}
static void pthread_stop_init() {
#ifndef NACL
struct sigaction act;
if (sem_init(&GC_suspend_ack_sem, 0, 0) != 0)
@@ -733,7 +552,6 @@ static void pthread_stop_init() {
GC_printf0("Will retry suspend signal if necessary.\n");
}
# endif
#endif /* NACL */
}
/* We hold the allocation lock. */
+4 -79
View File
@@ -68,8 +68,7 @@
# if (defined(GC_DGUX386_THREADS) || defined(GC_OSF1_THREADS) || \
defined(GC_DARWIN_THREADS) || defined(GC_AIX_THREADS)) || \
defined(GC_NETBSD_THREADS) && !defined(USE_PTHREAD_SPECIFIC) || \
defined(GC_OPENBSD_THREADS)
defined(GC_NETBSD_THREADS) && !defined(USE_PTHREAD_SPECIFIC)
# define USE_PTHREAD_SPECIFIC
# endif
@@ -130,7 +129,7 @@
# include <sys/sysctl.h>
#endif /* GC_DARWIN_THREADS */
#if defined(GC_NETBSD_THREADS) || defined(GC_OPENBSD_THREADS)
#if defined(GC_NETBSD_THREADS)
# include <sys/param.h>
# include <sys/sysctl.h>
#endif
@@ -164,9 +163,6 @@
# endif
# undef pthread_join
# undef pthread_detach
# if defined(NACL)
# undef pthread_exit
# endif
# if defined(GC_OSF1_THREADS) && defined(_PTHREAD_USE_MANGLED_NAMES_) \
&& !defined(_PTHREAD_USE_PTDNAM_)
/* Restore the original mangled names on Tru64 UNIX. */
@@ -679,52 +675,6 @@ void GC_mark_thread_local_free_lists(void)
static struct GC_Thread_Rep first_thread;
#ifdef NACL
extern int nacl_thread_parked[MAX_NACL_GC_THREADS];
extern int nacl_thread_used[MAX_NACL_GC_THREADS];
extern int nacl_thread_parking_inited;
extern int nacl_num_gc_threads;
extern pthread_mutex_t nacl_thread_alloc_lock;
extern __thread int nacl_thread_idx;
extern __thread GC_thread nacl_gc_thread_self;
void nacl_initialize_gc_thread()
{
int i;
pthread_mutex_lock(&nacl_thread_alloc_lock);
if (!nacl_thread_parking_inited)
{
for (i = 0; i < MAX_NACL_GC_THREADS; i++) {
nacl_thread_used[i] = 0;
nacl_thread_parked[i] = 0;
}
nacl_thread_parking_inited = 1;
}
GC_ASSERT(nacl_num_gc_threads <= MAX_NACL_GC_THREADS);
for (i = 0; i < MAX_NACL_GC_THREADS; i++) {
if (nacl_thread_used[i] == 0) {
nacl_thread_used[i] = 1;
nacl_thread_idx = i;
nacl_num_gc_threads++;
break;
}
}
pthread_mutex_unlock(&nacl_thread_alloc_lock);
}
void nacl_shutdown_gc_thread()
{
pthread_mutex_lock(&nacl_thread_alloc_lock);
GC_ASSERT(nacl_thread_idx >= 0 && nacl_thread_idx < MAX_NACL_GC_THREADS);
GC_ASSERT(nacl_thread_used[nacl_thread_idx] != 0);
nacl_thread_used[nacl_thread_idx] = 0;
nacl_thread_idx = -1;
nacl_num_gc_threads--;
pthread_mutex_unlock(&nacl_thread_alloc_lock);
}
#endif /* NACL */
/* Add a thread to GC_threads. We assume it wasn't already there. */
/* Caller holds allocation lock. */
GC_thread GC_new_thread(pthread_t id)
@@ -742,15 +692,8 @@ GC_thread GC_new_thread(pthread_t id)
}
if (result == 0) return(0);
result -> id = id;
#ifdef PLATFORM_ANDROID
result -> kernel_id = gettid();
#endif
result -> next = GC_threads[hv];
GC_threads[hv] = result;
#ifdef NACL
nacl_gc_thread_self = result;
nacl_initialize_gc_thread();
#endif
GC_ASSERT(result -> flags == 0 && result -> thread_blocked == 0);
return(result);
}
@@ -764,11 +707,6 @@ void GC_delete_thread(pthread_t id)
register GC_thread p = GC_threads[hv];
register GC_thread prev = 0;
#ifdef NACL
nacl_shutdown_gc_thread();
nacl_gc_thread_self = NULL;
#endif
while (!pthread_equal(p -> id, id)) {
prev = p;
p = p -> next;
@@ -1099,7 +1037,7 @@ void GC_thr_init()
GC_nprocs = sysconf(_SC_NPROC_ONLN);
if (GC_nprocs <= 0) GC_nprocs = 1;
# endif
# if defined(GC_DARWIN_THREADS) || defined(GC_FREEBSD_THREADS) || defined(GC_NETBSD_THREADS) || defined(GC_OPENBSD_THREADS)
# if defined(GC_DARWIN_THREADS) || defined(GC_FREEBSD_THREADS) || defined(GC_NETBSD_THREADS)
int ncpus = 1;
size_t len = sizeof(ncpus);
sysctl((int[2]) {CTL_HW, HW_NCPU}, 2, &ncpus, &len, NULL, 0);
@@ -1175,8 +1113,7 @@ void GC_init_parallel()
}
#if !defined(GC_DARWIN_THREADS) && !defined(GC_OPENBSD_THREADS)
#ifndef NACL
#if !defined(GC_DARWIN_THREADS)
int WRAP_FUNC(pthread_sigmask)(int how, const sigset_t *set, sigset_t *oset)
{
sigset_t fudged_set;
@@ -1188,7 +1125,6 @@ int WRAP_FUNC(pthread_sigmask)(int how, const sigset_t *set, sigset_t *oset)
}
return(REAL_FUNC(pthread_sigmask)(how, set, oset));
}
#endif
#endif /* !GC_DARWIN_THREADS */
/* Wrappers for functions that are likely to block for an appreciable */
@@ -1319,17 +1255,6 @@ int WRAP_FUNC(pthread_join)(pthread_t thread, void **retval)
return result;
}
#ifdef NACL
/* Native Client doesn't support pthread cleanup functions, */
/* so wrap pthread_exit and manually cleanup the thread. */
void
WRAP_FUNC(pthread_exit)(void *status)
{
GC_thread_exit_proc(0);
REAL_FUNC(pthread_exit)(status);
}
#endif
int
WRAP_FUNC(pthread_detach)(pthread_t thread)
{
+1 -1
View File
@@ -15,7 +15,7 @@ int main()
|| defined(GC_DARWIN_THREADS) || defined(GC_AIX_THREADS)
printf("-lpthread\n");
# endif
# if defined(GC_FREEBSD_THREADS) || defined(GC_OPENBSD_THREADS)
# if defined(GC_FREEBSD_THREADS)
# if (__FREEBSD_version >= 500000)
printf("-lpthread\n");
# else
-1
View File
@@ -27,7 +27,6 @@ man_MANS = \
mdvalidater.1 \
mkbundle.1 \
mono.1 \
mprof-report.1 \
mono-cil-strip.1 \
mono-config.5 \
monodocer.1 \
+1 -18
View File
@@ -1,10 +1,8 @@
.\"
.\" certmgr manual page.
.\" Copyright 2004-2005 Novell
.\" Copyright 2010 Pablo Ruiz
.\" Author:
.\" Sebastien Pouliot <[email protected]>
.\" Pablo Ruiz Garcia <[email protected]>
.\"
.TH Mono "certmgr"
.SH NAME
@@ -26,9 +24,7 @@ server certificates.
List the certificates, CTL or CTL in the specified store.
.TP
.I "-add"
Add a certificate, CRL or CTL to specified store. If filename it's a pkcs12
or pfx file, and it contains a private key, it will be imported to local key
pair container.
Add a certificate, CRL or CTL to specified store.
.TP
.I "-del"
Remove a certificate, CRL or CTL from specified store. You must specify the
@@ -48,11 +44,6 @@ This action assume an certificate (-c) object type and will import the
certificates in appropriate stores (i.e. server certificate in the
OtherPeople store, the root certificate in the Trust store, any other
intermediate certificates in the IntermediateCA store).
.TP
.I "-importKey"
Allows importing a private key from a pkcs12 file into a local key pair
store. (Usefull when you already have the key's corresponding certificate
installed at the specific store.)
.SH OBJECT TYPES
.TP
@@ -75,9 +66,6 @@ Use the machine's certificate stores (instead of the default user's stores).
.I "-v"
More details displayed on the console.
.TP
.I "-p password"
Use the specify password when accessing a pkcs12 file.
.TP
.I "-help", "-h", "-?", "/?"
Display help about this tool.
@@ -100,9 +88,6 @@ The filenames either starts with
(subject key identifier).
.TP
The rest of the filename is the base64-encoded value (tbp or ski).
.TP
Private key data is stored under
.I ~/.config/.mono/keypairs/
.SH EXAMPLES
.TP
@@ -155,8 +140,6 @@ element of your machine.config file.
.SH AUTHOR
Written by Sebastien Pouliot
Minor additions by Pablo Ruiz García
.SH COPYRIGHT
Copyright (C) 2004-2005 Novell.
.SH MAILING LISTS
+1 -19
View File
@@ -6,7 +6,7 @@
.SH NAME
csharp, gsharp \- Interactive C# Shell
.SH SYNOPSIS
.B csharp [--attach PID] [-e EXPRESSION] [file1 [file2]]
.B csharp [--attach PID] [file1 [file2]]
[options]
.P
.B gsharp [file1 [file2]]
@@ -29,22 +29,7 @@ target process.
.PP
Files specified in the command line will be loaded and executed as
scripts.
.PP
Starting with Mono 2.10, the
.I csharp
command can be used as an interpreter executed by executables flagged
with the Unix execute attribute. To do this, make the first line of
your C# source code look like this:
.nf
"#!/usr/bin/csharp"
Console.WriteLine ("Hello, World");
.fi
.SH OPTIONS
The commands accept all of the commands that are available to the
.I mcs
command, so you can reference assemblies, specify paths, language
level and so on from the command line. In addition, the following
command line options are supported:
.TP
.I "\-\-attach"
This is an advanced option and should only be used if you have a deep
@@ -57,9 +42,6 @@ special measures to avoid crashing the target application while using
it. For example, you might have to take the proper locks before
issuing any commands that might affect the target process state, or
sending commands through a method dispatcher.
.TP
.I "\-e" EXPRESSION
This will evaluate the specified C# EXPRESSION and exit
.SH OPERATION
Once you launch the csharp command, you will be greeted with the
interactive prompt:
-5
View File
@@ -351,11 +351,6 @@ shell will perform globbing, so you might want to use it like this:
$ mcs -recurse:'*.cs'
.fi
.TP
.I \-sdk:VERSION
Used to specify the version of Base Class Library assemblies. The possible
values are: 2 (default), 4. The version number means which .NET version
should the produced assembly be compatible with.
.TP
.I \-\-shell
Starts up the compiler in interactive mode, providing a C# shell for
statements and expressions. A shortcut is to use the
+407 -83
View File
@@ -422,10 +422,6 @@ Turns on profiling. For more information about profiling applications
and code coverage see the sections "PROFILING" and "CODE COVERAGE"
below.
.TP
This option can be used multiple times, each time will load an
additional profiler. This allows developers to use modules that
extend the JIT through the Mono profiling interface.
.TP
\fB--trace[=expression]\fR
Shows method names as they are invoked. By default all methods are
traced.
@@ -638,22 +634,412 @@ Note that the statistical profiler has a very low overhead and should
be the preferred profiler to use (for better output use the full path
to the mono binary when running and make sure you have installed the
addr2line utility that comes from the binutils package).
.SH LOG PROFILER
This is the most advanced profiler.
.SH LOGGING PROFILER
.PP
The Mono \f[I]log\f[] profiler can be used to collect a lot of
information about a program running in the Mono runtime.
This data can be used (both while the process is running and later)
to do analyses of the program behaviour, determine resource usage,
performance issues or even look for particular execution patterns.
The
.I logging profiler
is a general purpose profiler that can track many different kinds of
events and logs those into a file as the program executes. This is
different than previous profilers in Mono that kept the information in
memory and rendered a summary of the results when the program shut
down.
.PP
This is accomplished by logging the events provided by the Mono
runtime through the profiling interface and periodically writing
them to a file which can be later inspected with the mprof-report(1)
tool.
Using the logging profiler means that useful information can be
gathered for long-running applications, applications that terminate
abormally (crashes, segfaults, complicated tear down processes) or
when no data about the shutdown is required.
.PP
More information about how to use the log profiler is available on the
mprof-report(1) page.
The data collected by the running threads is kept independent of each
other to minimize the runtime overhead and the information dumped into
the log at regular intervals.
.PP
A sample use is very simple:
.nf
$ mono --profile=logging program.exe
$ mprof-decoder program.mprof
.fi
.PP
In the above example the logging profiler is used in its default mode
that merely records GC statistics for the execution of program.exe.
The profiling data collected is stored in the file program.mprof. The
mprof-decoder tool is then used to analyze the data.
.PP
You can instruct the logging profiler to record different one or more
sets of events. These are the modes supported:
.IP
.I Statistical Profiling (stat)
the program instruction pointer is periodically sampled to determine
where the program is spending most of its time. Statistical
profiling has a very low impact on a running application and it is
very useful to get a general picture of where time is being spent on a
program.
.IP
If call chains are requested, for each sample the profiler gets a
partial stack trace (limited by the specified depth) so that
caller-callee information is available.
.IP
.I Instrumenting:
each method enter and exit is logged with a timestamp; further processing of
the data can show the methods that took the longer to execute, with complete
accounting for callers and callees. However, this way of profiling is rather
intrusive and slows down the application significantly.
.IP
.I Allocation:
each allocation is logged.
.IP
.I Allocation summary:
shows, for each collection, a summary of the heap contents broken down by
class (for each class the number of allocated and released objects is
given, together with their aggregated size in bytes).
.IP
.I Heap snapshot mode:
dumps the whole heap contents at every collection (or at user specified
collections). It is also possible to request a collection and snapshot dump
with a signal.
.PP
Moreover, other events can be logged and analyzed, like jit time for each
method, load and unload for assemblies, modules and and individual classes,
and appdomain and thread creation and destruction.
.PP
This profiler is activated passing the \fB--profile=logging\fR option to
the mono runtime, and is controlled attaching further options, like
\fB--profile=logging:statistical\fR for doing statistical profiling (multiple
options are separated by commas).
.PP
As a quick primer, here are a few examples of the most common usage modes:
.PP
To perform statistical profiling:
.nf
mono --profile=logging:stat program.exe
.fi
.PP
To perform statistical profiling, inspecting call chains up to depth 8:
.nf
mono --profile=logging:stat=8 program.exe
.fi
.PP
To profile allocations (by default the call stack will be analized for
each allocation, producing detailed caller method attribution infornation):
.nf
mono --profile=logging:allocations program.exe
.fi
.PP
To profile garbage collection activity at a high level (collection time and objects freed
at each collection for each class are reported, but heap snapshots are not saved to disk):
.nf
mono --profile=logging:allocations-summary program.exe
.fi
.PP
To perform heap profiling taking heap snapshots:
.nf
mono --profile=logging:heap=all program.exe
.fi
.PP
To write the resulting data to a different file:
.nf
mono --profile=logging:output=mydata.mprof program.exe
.fi
.PP
Then you would need to invoke the decoder \fImprof-decoder(1)\fR
on the output file to see the profiling results, or to examine heap
snapshots and allocations in detail \fImprof-heap-viewer(1)\fR.
.PP
The operating modes described above are the default ones, and are sufficient
to use the profiler.
.PP
To further customize the profiler behavior there are more options, described
below.
.PP
These options can be individually enabled and disabled prefixing them
with an (optional) '+' character or a '-' character. For instance,
the "allocations" option by default records also the full call stack
at each allocation. If only the caller is wanted, one should use
"allocations,-save-allocation-stack", or to disable call tracking
completely (making the profiler less intrusive)
"allocations,-save-allocation-caller,-save-allocation-stack". In
practice the "allocation" option by default behaves like
"allocations,save-allocation-caller,save-allocation-stack", but the
user can tune this to his needs.
.PP
These are all the available options, organized by category:
.PP
\fBExecution profiling modes\fR
.RS
.ne 8
.TP
\fIstatistical\fR, \fIstat\fR or \fIs\fR
Performs statistical profiling. This is a lightweight profiling
mechanism and it has a much lower overhead than the \fIenter-leave\fR
profiling as it works by sampling where the program is spending its
time by using a timer.
If specified with \fIs=<number>\fR, also inspect call chains up to level
<number>.
.TP
\fIenter-leave\fR, \fIcalls\fR or \fIc\fR
Measure the time spent inside each method call, this is done by
logging the time when a method enters and when the method leaves.
This can be a time consuming operation.
.TP
\fIjit\fR, \fIj\fR
Collect information about time spent by the JIT engine compiling
methods.
.ne
.RE
.PP
\fBAllocation profiling modes\fR
.RS
.ne 8
.TP
\fIallocations\fR, \fIalloc\fR or \fIa\fR
Collect information about each allocation (object class and size).
By default this also implies "+save-allocation-caller" and
"+save-allocation-stack".
.TP
\fIsave-allocation-caller\fR, \fIsac\fR
Save the direct caller of each allocation. The profiler filters out wrapper
methods, and also recognizes if the allocation has been performed by the
runtime while jitting a method.
.TP
\fIsave-allocation-stack\fR, \fIsas\fR
Save the full managed execution stack at each allocation.
While the "sac" option saves the direct caller, this one records the whole
stack trace.
Note that in the call stack the wrapper methods are not filtered out.
Anyway the "sac" and "sas" options can be combined, and the decoder will
attribute the allocation to the correct method even if the wrapper is at the
top of the stack trace.
.TP
\fIallocations-summary\fR or \fIas\fR
At each collection dump a summary
of the heap contents (for each class, the number and collective size of all
live and freed heap objects). This very lightweight compared to full heap
snapshots.
.TP
\fIunreachable\fR, \fIfree\fR or \fIf\fR
Performs a lightweight profile of the garbage collector. On each
collection performed by the GC, the list of unreachable objects is
recorded, and for each object the class and size is provided. This
information can be used to compute the heap size broken down by class
(combined with "a" can give the same information of "as", but the log
file contains info about each individual object, while in "as" the
processing is done directly at runtime and the log file contains only
the summarized data broken down by class).
.TP
\fIgc\fR or \fIg\fR
Measure the time spent in each collection, and also trace heap resizes.
.TP
\fIheap-shot[=ARG]\fR, \fIheap[=ARG]\fR or \fIh[=ARH]\fR
Performs full heap profiling. In this case on each
collection a full heap snapshot is recorded to disk.
Inside the snapshots, each object reference is still represented so
that it's possible to investigate who is responsible for keeping objects
alive.
.PP
If the value of ARG is
.B all,
a heap snapshot is taken at each collection.
.PP
If the value is an integer
.B n,
a snapshot will be taken at the first
.B n
collections (like setting
.B gcd=n
);
.PP
If no additional argument is given to the heap option, the only way to take
heap snapshots is to requeste them using the runtime socket based command
interface described below (see "Profiler activity control").
.PP
Heap profiling also enables full allocation profiling (with call
stacks), and each allocation can be related to its corresponding
object in the snapshots, enabling investigations like "find all
objects of a given class allocated by a given method and still live at
a given collection, and then find all objects referencing them".
.PP
This kind of heap snapshot analysis is performed using the mprof-heap-viewer(1)
application.
.PP
The number of heap snapshots taken (and the moment in which they are taken)
can be further customized with the following options:
.TP
\fIgc-dumps=N\fR, \fIgc-d=N\fR, \fIgcd=N\fR
states the number of snapshots that must be dumped (since the application
starts). Zero means no dumps at all, -1 means dump at all collections.
.TP
These options exist because it can happen that the user wants to investigate
what happens during collections but without forcing a collection using the
command interface, because forcing a collection alters the program behavior.
Of course it is possible to simply take a snapshot at every collection, but
in some workloads this is could not be feasible (too much data).
So we have this "garbage collection dumps" counter to control how many
snapshots to take.
.ne
.RE
.PP
\fBProfiler activity control\fR
.RS
.ne 8
.TP
\fIoutput=FILE\fR, \fIout=FILE\fR or \fIo=FILE\fR
Use this option to provide the output file name for the profile log.
If this option is not specified, it will default to "<program-name>.mprof".
.TP
\fIoutput-suffix=SUFFIX\fR, \fIsuffix=SUFFIX\fR or \fIos=SUFFIX\fR: makes
the output file name equals to "<program-name>-SUFFIX.mprof".
.TP
\fIstart-enabled\fR or \fIse\fR: start with the profiler active
(which is the default).
.TP
\fIstart-disabled\fR or \fIsd\fR: start with the profiler inactive.
.TP
\fIforce-accurate-timer\fR (or \fIfac\fR): the profiler by default uses
rtdsc to acquire timestamps for frequent events, but this can be imprecise;
using this option you force the use of "gettimeofday" at every event, which
is more accurate but much slower.
.TP
\fIcommand-port=port\fR or \fIcp=port\fR (where port is an integer between
1024 nd 65535):
Choose a TCP port where the profiler will listen for user commands.
The protocol is ASCII based and line oriented (one line per command), and the
profiler answers with one line containing either "OK" or "ERROR" to each
received command.
.PP
The user can telnet to this port and give commands manually, or a GUI can
use this facility to control the profiler at runtime.
.PP
The available commands are:
.TP
\fIenable\fR: Enables the profiler.
.TP
\fIdisable\fR: Disables the profiler.
.TP
\fIheap-snapshot\fR: Takes a heap snapshot now (forces a full garbage collection).
.TP
\fIheap-snapshot-counter=arg\fR: Set the counter of the next heap snapshots
that must be taken, where arg can be "all" (take a snapshot at every
collection), "none" (do not take snapshots), or an integer "n" (take a heap
snapshot for the next "n" collections).
.ne
.RE
.PP
\fBInternal buffer sizes\fR
.RS
.ne 8
.TP
\fIper-thread-buffer-size=N\fR, \fItbs=N\fR
Use to specify the number of events that a thread buffer
can hold. When the thread buffer is full, a log block is
written to disk.
.Sp
This defaults to tbs=10000.
.TP
\fIstatistical-thread-buffer-size=N\fR, \fIsbs=N\fR
The number of statistical samples that
are held in memory before they are dumped to disk (the system does
double-buffering and the statistical samples are written by a helper
thread, so the statistical profiler never stops and is able to profile
the profiler itself).
.Sp
This defaults to sbs=10000.
.TP
\fIwrite-buffer-size\fR, \fIwbs\fR
Specifies the size in bytes of the internal write buffers.
.Sp
This defaults to wbs=1024.
.ne
.RE
.PP
In its current state, this profiler can also perform heap analysis
like the HeapShot profiler, but there is no UI to process this
information.
.PP
Another known issue is that if the timer is not strictly monotonic (like
rtdsc), differences between times can underflow (they are handled as
unsigned integers) and weird numbers can show up in the logs.
.PP
Finally, it can happen that when exceptions are thrown the profiler temporarily
loses track of the execution stack and misattributes the caller for a few
allocations (and method execution time).
.PP
The output file contains compressed events, to process the data you should
use tools like the "Mono.Profiler" tool provided on the Mono SVN
repository.
.PP
More explanations are provided here: "http://www.mono-project.com/LoggingProfiler".
.SH EXTERNAL PROFILERS
There are a number of external profilers that have been developed for
Mono, we will update this section to contain the profilers.
.PP
The heap Shot profiler can track all live objects, and references to
these objects, and includes a GUI tool, this is our recommended
profiler.
To install you must download the profiler
from Mono's SVN:
.nf
svn co svn://anonsvn.mono-project.com/source/trunk/heap-shot
cd heap-shot
./autogen
make
make install
.fi
.PP
See the included documentation for details on using it.
.PP
The Live Type profiler shows at every GC iteration all of the live
objects of a given type. To install you must download the profiler
from Mono's SVN:
.nf
svn co svn://anonsvn.mono-project.com/source/trunk/heap-prof
cd heap-prof
./autogen
make
make install
.fi
.PP
To use the profiler, execute:
.nf
mono --profile=desc-heap program.exe
.fi
.PP
The output of this profiler looks like this:
.nf
Checkpoint at 102 for heap-resize
System.MonoType : 708
System.Threading.Thread : 352
System.String : 3230
System.String[] : 104
Gnome.ModuleInfo : 112
System.Object[] : 160
System.Collections.Hashtable : 96
System.Int32[] : 212
System.Collections.Hashtable+Slot[] : 296
System.Globalization.CultureInfo : 108
System.Globalization.NumberFormatInfo : 144
.fi
.PP
The first line describes the iteration number for the GC, in this case
checkpoint 102.
.PP
Then on each line the type is displayed as well as the number of bytes
that are being consumed by live instances of this object.
.PP
The AOT profiler is used to feed back information to the AOT compiler
about how to order code based on the access patterns for pages. To
use it, use:
.nf
mono --profile=aot program.exe
.fi
The output of this profile can be fed back into Mono's AOT compiler to
order the functions on the disk to produce precompiled images that
have methods in sequential pages.
.SH CUSTOM PROFILERS
Mono provides a mechanism for loading other profiling modules which in
the form of shared libraries. These profiling modules can hook up to
@@ -1002,35 +1388,7 @@ The default is 512 megabytes.
Specifies which write barrier to use. Options are `cardtable' and
`remset'. The card table barrier is faster but less precise, and only
supported for the Mark&Sweep major collector on 32 bit platforms. The
default is `cardtable' if it is supported, otherwise `remset'. The cardtable
write barrier is faster and has a more stable and usually smaller
memory footprint. If the program causes too much pinning during
thread scan, it might be faster to enable remset.
.TP
\fBevacuation-threshold=\fIthreshold\fR
Sets the evacuation threshold in percent. This option is only available
on the Mark&Sweep major collectors. The value must be an
integer in the range 0 to 100. The default is 66. If the sweep phase of
the collection finds that the occupancy of a specific heap block type is
less than this percentage, it will do a copying collection for that block
type in the next major collection, thereby restoring occupancy to close
to 100 percent. A value of 0 turns evacuation off.
.TP
\fB(no-)concurrent-sweep\fR
Enables or disables concurrent sweep for the Mark&Sweep collector. If
enabled, the sweep phase of the garbage collection is done in a thread
concurrently with the application. Concurrent sweep is disabled by
default.
.TP
\fBstack-mark=\fImark-mode\fR
Specifies how application threads should be scanned. Options are
`precise` and `conservative`. Precise marking allow the collector
to know what values on stack are references and what are not.
Conservative marking threats all values as potentially references
and leave them untouched. Precise marking reduces floating garbage
and can speed up nursery collection and allocation rate, it has
the downside of requiring a significant extra memory per compiled
method. The right option, unfortunately, requires experimentation.
default is `cardtable' if it is supported, otherwise `remset'.
.ne
.RE
.TP
@@ -1038,7 +1396,7 @@ method. The right option, unfortunately, requires experimentation.
When using Mono with the SGen garbage collector this environment
variable can be used to turn on various debugging features of the
collector. The value of this variable is a comma separated list of
words. Do not use these options in production.
words.
.RS
.ne 8
.TP
@@ -1063,13 +1421,6 @@ 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
the nursery at TLAB creation time.
.TP
\fBdisable-minor\fR
Don't do minor collections. If the nursery is full, a major collection
is triggered instead, unless it, too, is disabled.
.TP
\fBdisable-major\fR
Don't do major collections.
.TP
\fBconservative-stack-mark\fR
Forces the GC to scan the stack conservatively, even if precise
scanning is available.
@@ -1310,36 +1661,11 @@ trading off the small leaks for the increased performance
unload the application domains on production systems, it is worth
using this feature).
.TP
\fBdyn-runtime-invoke\fR
Instructs the runtime to try to use a generic runtime-invoke wrapper
instead of creating one invoke wrapper.
.TP
\fBgdb\fR
Equivalent to setting the \fBMONO_XDEBUG\fR variable, this emits
symbols into a shared library as the code is JITed that can be loaded
into GDB to inspect symbols.
.TP
\fBgen-seq-points\fR
Automatically generates sequence points where the
IL stack is empty. These are places where the debugger can set a
breakpoint.
.TP
\fBexplicit-null-checks\fR
Makes the JIT generate an explicit NULL check on variable dereferences
instead of depending on the operating system to raise a SIGSEGV or
another form of trap event when an invalid memory location is
accessed.
.TP
\fBhandle-sigint\fR
Captures the interrupt signal (Control-C) and displays a stack trace
when pressed. Useful to find out where the program is executing at a
given point. This only displays the stack trace of a single thread.
.TP
\fBinit-stacks\FR
Instructs the runtime to initialize the stack with
some known values (0x2a on x86-64) at the start of a method to assist
in debuggin the JIT engine.
.TP
\fBkeep-delegates\fR
This option will leak delegate trampolines that are no longer
referenced as to present the user with more information about a
@@ -1363,6 +1689,7 @@ This option will disable the GDB backtrace emitted by the runtime
after a SIGSEGV or SIGABRT in unmanaged code.
.TP
\fBsuspend-on-sigsegv\fR
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.
@@ -1410,9 +1737,6 @@ be used when writing messages like this: Console.Error:MyProgramName.
See the System.Diagnostics.DefaultTraceListener documentation for more
information.
.TP
\fBMONO_WCF_TRACE\fR
This eases WCF diagnostics functionality by simply outputs all log messages from WCF engine to "stdout", "stderr" or any file passed to this environment variable. The log format is the same as usual diagnostic output.
.TP
\fBMONO_XEXCEPTIONS\fR
This throws an exception when a X11 error is encountered; by default a
message is displayed but execution continues
@@ -1460,7 +1784,7 @@ Mono JIT by default turns this on.
\fBMONO_XDEBUG\fR
When the the MONO_XDEBUG env var is set, debugging info for JITted
code is emitted into a shared library, loadable into gdb. This enables,
for example, to see managed frame names on gdb backtraces.
for example, to see managed frame names on gdb backtraces.
.TP
\fBMONO_VERBOSE_METHOD\fR
Enables the maximum JIT verbosity for the specified method. This is
-524
View File
@@ -1,524 +0,0 @@
.TH mprof-report 1 ""
.SH The Mono log profiler
.PP
The Mono \f[I]log\f[] profiler can be used to collect a lot of
information about a program running in the Mono runtime.
This data can be used (both while the process is running and later)
to do analyses of the program behaviour, determine resource usage,
performance issues or even look for particular execution patterns.
.PP
This is accomplished by logging the events provided by the Mono
runtime through the profiling interface and periodically writing
them to a file which can be later inspected with the command line
\f[I]mprof-report\f[] program or with a GUI (not developed yet).
.PP
The events collected include (among others):
.IP \[bu] 2
method enter and leave
.IP \[bu] 2
object allocation
.IP \[bu] 2
garbage collection
.IP \[bu] 2
JIT compilation
.IP \[bu] 2
metadata loading
.IP \[bu] 2
lock contention
.IP \[bu] 2
exceptions
.PP
In addition, the profiler can periodically collect info about all
the objects present in the heap at the end of a garbage collection
(this is called heap shot and currently implemented only for the
sgen garbage collector).
Another available profiler mode is the \f[I]sampling\f[] or
\f[I]statistical\f[] mode: periodically the program is sampled and
the information about what the program was busy with is saved.
This allows to get information about the program behaviour without
degrading its performance too much (usually less than 10%).
.SS Basic profiler usage
.PP
The simpler way to use the profiler is the following:
.PP
\f[B]mono\ --profile=log\ program.exe\f[]
.PP
At the end of the execution the file \f[I]output.mlpd\f[] will be
found in the current directory.
A summary report of the data can be printed by running:
.PP
\f[B]mprof-report\ output.mlpd\f[]
.PP
With this invocation a huge amount of data is collected about the
program execution and collecting and saving this data can
significantly slow down program execution.
If saving the profiling data is not needed, a report can be
generated directly with:
.PP
\f[B]mono\ --profile=log:report\ program.exe\f[]
.PP
If the information about allocations is not of interest, it can be
excluded:
.PP
\f[B]mono\ --profile=log:noalloc\ program.exe\f[]
.PP
On the other hand, if method call timing is not important, while
allocations are, the needed info can be gathered with:
.PP
\f[B]mono\ --profile=log:nocalls\ program.exe\f[]
.PP
You will still be able to inspect information about the sequence of
calls that lead to each allocation because at each object
allocation a stack trace is collected if full enter/leave
information is not available.
.PP
To periodically collect heap shots (and exclude method and
allocation events) use the following options (making sure you run
with the sgen garbage collector):
.PP
\f[B]mono\ --gc=sgen\ --profile=log:heapshot\ program.exe\f[]
.PP
To perform a sampling profiler run, use the \f[I]sample\f[] option:
.PP
\f[B]mono\ --profile=log:sample\ program.exe\f[]
.SS Profiler option documentation
.PP
By default the \f[I]log\f[] profiler will gather all the events
provided by the Mono runtime and write them to a file named
\f[I]output.mlpd\f[].
When no option is specified, it is equivalent to using:
.PP
\f[B]--profile=log:calls,alloc,output=output.mlpd,maxframes=8,calldepth=100\f[]
.PP
The following options can be used to modify this default behaviour.
Each option is separated from the next by a \f[B],\f[] character,
with no spaces and all the options are included after the
\f[I]log:\f[] profile module specifier.
.IP \[bu] 2
\f[I]help\f[]: display concise help info about each available
option
.IP \[bu] 2
\f[I][no]alloc\f[]: \f[I]noalloc\f[] disables collecting object
allocation info, \f[I]alloc\f[] enables it if it was disabled by
another option like \f[I]heapshot\f[].
.IP \[bu] 2
\f[I][no]calls\f[]: \f[I]nocalls\f[] disables collecting method
enter and leave events.
When this option is used at each object allocation and at some
other events (like lock contentions and exception throws) a stack
trace is collected by default.
See the \f[I]maxframes\f[] option to control this behaviour.
\f[I]calls\f[] enables method enter/leave events if they were
disabled by another option like \f[I]heapshot\f[].
.IP \[bu] 2
\f[I]heapshot[=MODE]\f[]: collect heap shot data at each major
collection.
The frequency of the heap shots can be changed with the
\f[I]MODE\f[] parameter.
When this option is used allocation events and method enter/leave
events are not recorded by default: if they are needed, they need
to be enabled explicitly.
The optional parameter \f[I]MODE\f[] can modify the default heap
shot frequency.
heapshot can be used multiple times with different modes: in that
case a heap shot is taken if either of the conditions are met.
MODE can be one of:
.RS 2
.IP \[bu] 2
\f[I]NUM\f[]ms: perform a heap shot if at least \f[I]NUM\f[]
milliseconds passed since the last one.
.IP \[bu] 2
\f[I]NUM\f[]gc: perform a heap shot every \f[I]NUM\f[] major
garbage collections
.IP \[bu] 2
\f[I]ondemand\f[]: perform a heap shot when such a command is sent
to the control port
.RE
.IP \[bu] 2
\f[I]sample[=TYPE[/FREQ]]\f[]: collect statistical samples of the
program behaviour.
The default is to collect a 1000 times per second the instruction
pointer.
This is equivalent to the value \[lq]cycles/1000\[rq] for
\f[I]TYPE\f[].
On some systems, like with recent Linux kernels, it is possible to
cause the sampling to happen for other events provided by the
performance counters of the cpu.
In this case, \f[I]TYPE\f[] can be one of:
.RS 2
.IP \[bu] 2
\f[I]cycles\f[]: processor cycles
.IP \[bu] 2
\f[I]instr\f[]: executed instructions
.IP \[bu] 2
\f[I]cacherefs\f[]: cache references
.IP \[bu] 2
\f[I]cachemiss\f[]: cache misses
.IP \[bu] 2
\f[I]branches\f[]: executed branches
.IP \[bu] 2
\f[I]branchmiss\f[]: mispredicted branches
.RE
.IP \[bu] 2
\f[I]time=TIMER\f[]: use the TIMER timestamp mode.
TIMER can have the following values:
.RS 2
.IP \[bu] 2
\f[I]fast\f[]: a usually faster but possibly more inaccurate timer
.RE
.IP \[bu] 2
\f[I]maxframes=NUM\f[]: when a stack trace needs to be performed,
collect \f[I]NUM\f[] frames at the most.
The default is 8.
.IP \[bu] 2
\f[I]calldepth=NUM\f[]: ignore method enter/leave events when the
call chain depth is bigger than NUM.
.IP \[bu] 2
\f[I]zip\f[]: automatically compress the output data in gzip
format.
.IP \[bu] 2
\f[I]output=OUTSPEC\f[]: instead of writing the profiling data to
the output.mlpd file, substitute \f[I]%p\f[] in \f[I]OUTSPEC\f[]
with the current process id and \f[I]%t\f[] with the current date
and time, then do according to \f[I]OUTSPEC\f[]:
.RS 2
.IP \[bu] 2
if \f[I]OUTSPEC\f[] begins with a \f[I]|\f[] character, execute the
rest as a program and feed the data to its standard input
.IP \[bu] 2
if \f[I]OUTSPEC\f[] begins with a \f[I]-\f[] character, use the
rest of OUTSPEC as the filename, but force overwrite any existing
file by that name
.IP \[bu] 2
otherwise write the data the the named file: note that is a file by
that name already exists, a warning is issued and profiling is
disabled.
.RE
.IP \[bu] 2
\f[I]report\f[]: the profiling data is sent to mprof-report, which
will print a summary report.
This is equivalent to the option: \f[B]output=mprof-report\ -\f[].
If the \f[I]output\f[] option is specified as well, the report will
be written to the output file instead of the console.
.IP \[bu] 2
\f[I]port=PORT\f[]: specify the tcp/ip port to use for the
listening command server.
Currently not available for windows.
This server is started for example when heapshot=ondemand is used:
it will read commands line by line.
The following commands are available:
.RS 2
.IP \[bu] 2
\f[I]heapshot\f[]: perform a heapshot as soon as possible
.RE
.SS Analyzing the profile data
.PP
Currently there is a command line program (\f[I]mprof-report\f[])
to analyze the data produced by the profiler.
This is ran automatically when the \f[I]report\f[] profiler option
is used.
Simply run:
.PP
\f[B]mprof-report\ output.mlpd\f[]
.PP
to see a summary report of the data included in the file.
.SS Trace information for events
.PP
Often it is important for some events, like allocations, lock
contention and exception throws to know where they happened.
Or we may want to see what sequence of calls leads to a particular
method invocation.
To see this info invoke mprof-report as follows:
.PP
\f[B]mprof-report\ --traces\ output.mlpd\f[]
.PP
The maximum number of methods in each stack trace can be specified
with the \f[I]\[em]maxframes=NUM\f[] option:
.PP
\f[B]mprof-report\ --traces\ --maxframes=4\ output.mlpd\f[]
.PP
The stack trace info will be available if method enter/leave events
have been recorded or if stack trace collection wasn't explicitly
disabled with the \f[I]maxframes=0\f[] profiler option.
Note that the profiler will collect up to 8 frames by default at
specific events when the \f[I]nocalls\f[] option is used, so in
that case, if more stack frames are required in mprof-report, a
bigger value for maxframes when profiling must be used, too.
.PP
The \f[I]\[em]traces\f[] option also controls the reverse reference
feature in the heapshot report: for each class it reports how many
references to objects of that class come from other classes.
.SS Sort order for methods and allocations
.PP
When a list of methods is printed the default sort order is based
on the total time spent in the method.
This time is wall clock time (that is, it includes the time spent,
for example, in a sleep call, even if actual cpu time would be
basically 0).
Also, if the method has been ran on different threads, the time
will be a sum of the time used in each thread.
.PP
To change the sort order, use the option:
.PP
\f[B]--method-sort=MODE\f[]
.PP
where \f[I]MODE\f[] can be:
.IP \[bu] 2
\f[I]self\f[]: amount of time spent in the method itself and not in
its callees
.IP \[bu] 2
\f[I]calls\f[]: the number of method invocations
.IP \[bu] 2
\f[I]total\f[]: the total time spent in the method.
.PP
Object allocation lists are sorted by default depending on the
total amount of bytes used by each type.
.PP
To change the sort order of object allocations, use the option:
.PP
\f[B]--alloc-sort=MODE\f[]
.PP
where \f[I]MODE\f[] can be:
.IP \[bu] 2
\f[I]count\f[]: the number of allocated objects of the given type
.IP \[bu] 2
\f[I]bytes\f[]: the total number of bytes used by objects of the
given type
.SS Selecting what data to report
.PP
The profiler by default collects data about many runtime subsystems
and mprof-report prints a summary of all the subsystems that are
found in the data file.
It is possible to tell mprof-report to only show information about
some of them with the following option:
.PP
\f[B]--reports=R1[,R2...]\f[]
.PP
where the report names R1, R2 etc.
can be:
.IP \[bu] 2
\f[I]header\f[]: information about program startup and profiler
version
.IP \[bu] 2
\f[I]jit\f[]: JIT compiler information
.IP \[bu] 2
\f[I]sample\f[]: statistical sampling information
.IP \[bu] 2
\f[I]gc\f[]: garbage collection information
.IP \[bu] 2
\f[I]alloc\f[]: object allocation information
.IP \[bu] 2
\f[I]call\f[]: method profiling information
.IP \[bu] 2
\f[I]metadata\f[]: metadata events like image loads
.IP \[bu] 2
\f[I]exception\f[]: exception throw and handling information
.IP \[bu] 2
\f[I]monitor\f[]: lock contention information
.IP \[bu] 2
\f[I]thread\f[]: thread information
.IP \[bu] 2
\f[I]heapshot\f[]: live heap usage at heap shots
.PP
It is possible to limit some of the data displayed to a timeframe
of the program execution with the option:
.PP
\f[B]--time=FROM-TO\f[]
.PP
where \f[I]FROM\f[] and \f[I]TO\f[] are seconds since application
startup (they can be floating point numbers).
.PP
Another interesting option is to consider only events happening on
a particular thread with the following option:
.PP
\f[B]--thread=THREADID\f[]
.PP
where \f[I]THREADID\f[] is one of the numbers listed in the thread
summary report (or a thread name when present).
.PP
By default long lists of methods or other information like object
allocations are limited to the most important data.
To increase the amount of information printed you can use the
option:
.PP
\f[B]--verbose\f[]
.SS Track individual objects
.PP
Instead of printing the usual reports from the profiler data, it is
possible to track some interesting information about some specific
object addresses.
The objects are selected based on their address with the
\f[I]\[em]track\f[] option as follows:
.PP
\f[B]--track=0xaddr1[,0xaddr2,...]\f[]
.PP
The reported info (if available in the data file), will be class
name, size, creation time, stack trace of creation (with the
\f[I]\[em]traces\f[] option), etc.
If heapshot data is available it will be possible to also track
what other objects reference one of the listed addresses.
.PP
The object addresses can be gathered either from the profiler
report in some cases (like in the monitor lock report), from the
live application or they can be selected with the
\f[I]\[em]find=FINDSPEC\f[] option.
FINDSPEC can be one of the following:
.IP \[bu] 2
\f[I]S:SIZE\f[]: where the object is selected if it's size is at
least \f[I]SIZE\f[]
.IP \[bu] 2
\f[I]T:NAME\f[]: where the object is selected if \f[I]NAME\f[]
partially matches its class name
.PP
This option can be specified multiple times with one of the
different kinds of FINDSPEC.
For example, the following:
.PP
\f[B]--find=S:10000\ --find=T:Byte[]\f[]
.PP
will find all the byte arrays that are at least 10000 bytes in
size.
.PP
Note that with a moving garbage collector the object address can
change, so you may need to track the changed address manually.
It can also happen that multiple objects are allocated at the same
address, so the output from this option can become large.
.SS Saving a profiler report
.PP
By default mprof-report will print the summary data to the console.
To print it to a file, instead, use the option:
.PP
\f[B]--out=FILENAME\f[]
.SS Dealing with profiler slowness
.PP
If the profiler needs to collect lots of data, the execution of the
program will slow down significantly, usually 10 to 20 times
slower.
There are several ways to reduce the impact of the profiler on the
program execution.
.SS Use the statistical sampling mode
.PP
Statistical sampling allows executing a program under the profiler
with minimal performance overhead (usually less than 10%).
This mode allows checking where the program is spending most of
it's execution time without significantly perturbing its behaviour.
.SS Collect less data
.PP
Collecting method enter/leave events can be very expensive,
especially in programs that perform many millions of tiny calls.
The profiler option \f[I]nocalls\f[] can be used to avoid
collecting this data or it can be limited to only a few call levels
with the \f[I]calldepth\f[] option.
.PP
Object allocation information is expensive as well, though much
less than method enter/leave events.
If it's not needed, it can be skipped with the \f[I]noalloc\f[]
profiler option.
Note that when method enter/leave events are discarded, by default
stack traces are collected at each allocation and this can be
expensive as well.
The impact of stack trace information can be reduced by setting a
low value with the \f[I]maxframes\f[] option or by eliminating them
completely, by setting it to 0.
.PP
The other major source of data is the heapshot profiler option:
especially if the managed heap is big, since every object needs to
be inspected.
The \f[I]MODE\f[] parameter of the \f[I]heapshot\f[] option can be
used to reduce the frequency of the heap shots.
.SS Reduce the timestamp overhead
.PP
On many operating systems or architectures what actually slows down
profiling is the function provided by the system to get timestamp
information.
The \f[I]time=fast\f[] profiler option can be usually used to speed
up this operation, but, depending on the system, time accounting
may have some level of approximation (though statistically the data
should be still fairly valuable).
.SS Dealing with the size of the data files
.PP
When collecting a lot of information about a profiled program, huge
data files can be generated.
There are a few ways to minimize the amount of data, for example by
not collecting some of the more space-consuming information or by
compressing the information on the fly or by just generating a
summary report.
.SS Reducing the amount of data
.PP
Method enter/leave events can be excluded completely with the
\f[I]nocalls\f[] option or they can be limited to just a few levels
of calls with the \f[I]calldepth\f[] option.
For example, the option:
.PP
\f[B]calldepth=10\f[]
.PP
will ignore the method events when there are more than 10 managed
stack frames.
This is very useful for programs that have deep recursion or for
programs that perform many millions of tiny calls deep enough in
the call stack.
The optimal number for the calldepth option depends on the program
and it needs to be balanced between providing enough profiling
information and allowing fast execution speed.
.PP
Note that by default, if method events are not recorded at all, the
profiler will collect stack trace information at events like
allocations.
To avoid gathering this data, use the \f[I]maxframes=0\f[] profiler
option.
.PP
Allocation events can be eliminated with the \f[I]noalloc\f[]
option.
.PP
Heap shot data can also be huge: by default it is collected at each
major collection.
To reduce the frequency, you can specify a heapshot mode: for
example to collect every 5 collections (including major and minor):
.PP
\f[B]heapshot=5gc\f[]
.PP
or when at least 5 seconds passed since the last heap shot:
.PP
\f[B]heapshot=5000ms\f[]
.SS Compressing the data
.PP
To reduce the amout of disk space used by the data, the data can be
compressed either after it has been generated with the gzip
command:
.PP
\f[B]gzip\ -9\ output.mlpd\f[]
.PP
or it can be compressed automatically by using the \f[I]zip\f[]
profiler option.
Note that in this case there could be a significant slowdown of the
profiled program.
.PP
The mprof-report program will tranparently deal with either
compressed or uncompressed data files.
.SS Generating only a summary report
.PP
Often it's enough to look at the profiler summary report to
diagnose an issue and in this case it's possible to avoid saving
the profiler data file to disk.
This can be accomplished with the \f[I]report\f[] profiler option,
which will basically send the data to the mprof-report program for
display.
.PP
To have more control of what summary information is reported (or to
use a completely different program to decode the profiler data),
the \f[I]output\f[] profiler option can be used, with \f[B]|\f[] as
the first character: the rest of the output name will be executed
as a program with the data fed in on the standard input.
.PP
For example, to print only the Monitor summary with stack trace
information, you could use it like this:
.PP
\f[B]output=|mprof-report\ --reports=monitor\ --traces\ -\f[]
.SH WEB SITE
http://www.mono-project.com/Profiler
.SH SEE ALSO
.PP
mono(1)
.SH AUTHORS
Paolo Molaro.
+5 -77
View File
@@ -41,32 +41,8 @@ Validate the project file against the schema
.B \//validate:<schema>
Validate the project file against the specified schema
.TP
.B \//consoleloggerparameters:<params> , /clp:<params>
Parameters for the console logger : PerfomanceSummary, Summary, NoSummary, NoItemAndPropertyList, Verbosity
.TP
.B \//filelogger[n] , /fl[n]
Logs the output to a file, named 'msbuild.log' by default. If the optional number 'n' is
specified, then it logs to 'msbuild[n].log' . Parameters for this logger, including
the log file name can be specified via a corresponding /flp[n] option. Default verbosity
for file loggers is 'detailed. 'n' can be between 1-9.
.TP
.B \//fileloggerparameters[n]:<params> , /flp[n]:<params>
Parameters for a file logger. This implies a corresponding /fl[n]. 'n' can be between
1-9, and is used to add upto 10 file loggers. Parameters can be, besides the ones available
for console logger:
.RS
.TP
.I LogFile=<file>
File to which the build log will be written.
.TP
.I Append
If this is used, then the log file is appended to, else a new one will be created.
.TP
.I Encoding=<encoding>
Encoding to use for the log file, eg. UTF-8, ASCII.
.TP
Eg: xbuild foo.csproj /flp:Verbosity=normal "/flp1:LogFile=build.log;Append;Encoding=ASCII"
.RE
.B \//consoleloggerparameters:<params>
Parameters for the console logger : PerfomanceSummary, NoSummary, NoItemAndPropertyList
.TP
.B \//nologo
Don't show the initial xbuild banner
@@ -98,57 +74,13 @@ to $prefix/lib/mono/xbuild . When used in Import, like:
xbuild tries various values for the msbuild property $(MSBuildExtensionsPath), in order:
1. Paths specified in the environment variable $MSBuildExtensionsPath.
2. /Library/Frameworks/Mono.framework/External/xbuild on Mac OSX.
3. $XDG_CONFIG_HOME/xbuild/tasks (or Environment.SpecialFolder.ApplicationData)
4. $prefix/lib/mono/xbuild (default location)
2. $XDG_CONFIG_HOME/xbuild/tasks (or Environment.SpecialFolder.ApplicationData)
3. $prefix/lib/mono/xbuild (default location)
Anywhere else in the project files, $(MSBuildExtensionsPath) will always resolve to the default
location. This is a xbuild-only feature.
This is also applicable for the properties $(MSBuildExtensionsPath32) and $(MSBuildExtensionsPath64),
and the environment variables have the corresponding names - MSBuildExtensionsPath32/64 .
.TP
.I "XBUILD_FRAMEWORK_FOLDERS_PATH"
With ToolsVersion 4.0, projects can target arbitrary frameworks referenced by TargetFrameworkMoniker,
which is of the format:
Identifier,Version=<version>[,Profile=<profile>]
Eg. ".NETFramework,Version=v4.0"
The 3 parts of the moniker are given by the msbuild properties:
$(TargetFrameworkIdentifier), $(TargetFrameworkVersion) and $(TargetFrameworkProfile)
This moniker maps to a framework description file on disk:
<framework_root>/Identifier/Version/[Profile]/RedistList/FrameworkList.xml
This file is used to determine the path where to find the framework assemblies for this particular framework.
Framework root here is configurable and is resolved in the following order:
.nf
1. Paths specified in the environment variable $XBUILD_FRAMEWORK_FOLDERS_PATH
2. /Library/Frameworks/Mono.framework/External/xbuild-frameworks on Mac OSX.
3. MSBuild property $(TargetFrameworkRoot)
4. $prefix/lib/mono/xbuild-frameworks (default location)
.fi
XBuild tries the paths given above, in order, till it finds a FrameworkList.xml for the moniker.
Running with /v:detailed or higher verbosity will show the various paths that it tries.
The FrameworkList.xml itself just has a root element like:
<FileList Name=".NET Framework 3.5" TargetFrameworkDirectory="..\\..\\..\\..\\3.5" IncludeFramework="v3.0">
</FileList>
Here the TargetFrameworkDirectory attribute specifies the directory where the assemblies for
this particular framework can be found. If this is not set, then the parent of the folder
containing the xml file is taken as the framework directory.
IncludeFramework attribute specifies the version of a framework (under the *same* $(TargetFrameworkIdentifier))
which should be included in the final list of Target framework directories.
.TP
.I "XBUILD_COLORS"
If this variable is set, it contains a string of the form
@@ -179,14 +111,10 @@ For example, you could set this variable from your shell:
You can disable the built-in color scheme by setting this variable to
"disable".
.SH NOTES
On Mac OSX, for locating pkg-config (.pc) files, xbuild additionally
looks in "/Library/Frameworks/Mono.framework/External/pkgconfig" .
.SH SEE ALSO
.BR mono(1), mcs(1)
.SH COPYRIGHT
Copyright (C) 2011 Novell, Inc (http://www.novell.com)
Copyright (C) 2009 Novell, Inc (http://www.novell.com)
.SH MAILING LISTS
Visit http://lists.ximian.com/mailman/listinfo/mono-devel-list for details.
.SH WEB SITE
+2 -1
View File
@@ -13,8 +13,9 @@ tests/?mcs.log
tests/gtest-*.dll
tests/test-*.dll
tests/xml-*.xml
tests/?xml-*.xml
tests/test-*.netmodule
tests/gxml-*.xml
tests/test-*.xml
tests/data.xml
class/Mono.Data.Sqlite/test.db
class/Mono.CSharp/Mono.CSharp.dll.sources
+20 -13
View File
@@ -3,13 +3,16 @@ thisdir := .
SUBDIRS := build jay mcs class nunit24 ilasm tools tests errors docs
basic_SUBDIRS := build jay mcs class tools
net_2_0_SUBDIRS := build class nunit24 ilasm tools tests errors mcs
moonlight_raw_SUBDIRS := build class tools mcs
moonlight_SUBDIRS := tools
monodroid_SUBDIRS := build class mcs
monotouch_SUBDIRS := build class mcs
net_2_0_bootstrap_SUBDIRS := build tools
net_2_0_SUBDIRS := build mcs class nunit24 ilasm tools tests errors
moonlight_bootstrap_SUBDIRS := build mcs class
moonlight_raw_SUBDIRS := build mcs class tools
moonlight_SUBDIRS := tools tests errors
monotouch_SUBDIRS := build mcs class
monotouch_bootstrap_SUBDIRS := build mcs class
net_3_5_SUBDIRS := build class tools/xbuild
net_4_0_SUBDIRS := build class nunit24 ilasm tools tests errors mcs docs
net_4_0_bootstrap_SUBDIRS := build mcs class tools
net_4_0_SUBDIRS := build mcs class nunit24 ilasm tools tests errors docs
# List of test subdirs that should pass 100%
centum_tests := \
@@ -100,13 +103,16 @@ profiles-do--run-test:
# Orchestrate the bootstrap here.
_boot_ = all clean install
$(_boot_:%=profile-do--net_4_0--%): profile-do--net_4_0--%: profile-do--basic--%
$(_boot_:%=profile-do--net_4_0--%): profile-do--net_4_0--%: profile-do--net_4_0_bootstrap--%
$(_boot_:%=profile-do--net_4_0_bootstrap--%): profile-do--net_4_0_bootstrap--%: profile-do--net_2_0--%
$(_boot_:%=profile-do--net_3_5--%): profile-do--net_3_5--%: profile-do--net_2_0--%
$(_boot_:%=profile-do--moonlight--%): profile-do--moonlight--%: profile-do--moonlight_raw--%
$(_boot_:%=profile-do--monodroid--%): profile-do--monodroid--%: profile-do--basic--%
$(_boot_:%=profile-do--monotouch--%): profile-do--monotouch--%: profile-do--basic--%
$(_boot_:%=profile-do--moonlight_raw--%): profile-do--moonlight_raw--%: profile-do--basic--%
$(_boot_:%=profile-do--net_2_0--%): profile-do--net_2_0--%: profile-do--basic--%
$(_boot_:%=profile-do--moonlight--%): profile-do--moonlight--%: profile-do--moonlight_raw--%
$(_boot_:%=profile-do--monotouch--%): profile-do--monotouch--%: profile-do--monotouch_bootstrap--%
$(_boot_:%=profile-do--monotouch_bootstrap--%): profile-do--monotouch_bootstrap--%: profile-do--net_2_0--%
$(_boot_:%=profile-do--moonlight_raw--%): profile-do--moonlight_raw--%: profile-do--moonlight_bootstrap--%
$(_boot_:%=profile-do--moonlight_bootstrap--%): profile-do--moonlight_bootstrap--%: profile-do--basic--%
$(_boot_:%=profile-do--net_2_0--%): profile-do--net_2_0--%: profile-do--net_2_0_bootstrap--%
$(_boot_:%=profile-do--net_2_0_bootstrap--%): profile-do--net_2_0_bootstrap--%: profile-do--basic--%
testcorlib:
@cd class/corlib && $(MAKE) test run-test
@@ -132,7 +138,8 @@ DISTFILES = \
MonoIcon.png \
README \
ScalableMonoIcon.svg \
winexe.in
winexe.in \
nunit.key
dist-local: dist-default
+3
View File
@@ -17,10 +17,13 @@ common/Consts.cs: common/Consts.cs.in $(wildcard config.make)
PLATFORMS = darwin linux win32
PROFILES = \
basic \
net_2_0_bootstrap \
net_2_0 \
moonlight_bootstrap \
moonlight_raw \
moonlight \
net_3_5 \
net_4_0_bootstrap \
net_4_0
COMMON_SRCS = \
+5 -3
View File
@@ -39,7 +39,7 @@ static class Consts
public const string MonoProduct = "MONO Common language infrastructure";
public const string MonoCopyright = "(c) various MONO Authors";
#if NET_4_0
#if NET_4_0 || BOOTSTRAP_NET_4_0
public const string FxVersion = "4.0.0.0";
public const string FxFileVersion = "4.0.30319.1";
@@ -62,7 +62,7 @@ static class Consts
public const string VsVersion = "9.0.0.0"; // unused, but needed for compilation
public const string FxFileVersion = "4.0.50524.0";
public const string VsFileVersion = "9.0.50727.42"; // unused, but needed for compilation
#elif NET_2_0
#elif NET_2_0 || BOOTSTRAP_NET_2_0
// Versions of .NET Framework 2.0 RTM
public const string FxVersion = "2.0.0.0";
public const string VsVersion = "8.0.0.0";
@@ -82,7 +82,9 @@ static class Consts
public const string AssemblyI18N = "I18N, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=0738eb9f132ed756";
public const string AssemblyMicrosoft_VisualStudio = "Microsoft.VisualStudio, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
#if NET_2_0
public const string AssemblyMicrosoft_VisualStudio_Web = "Microsoft.VisualStudio.Web, Version=" + VsVersion + ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
#endif
public const string AssemblyMicrosoft_VSDesigner = "Microsoft.VSDesigner, Version=" + VsVersion + ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
public const string AssemblyMono_Http = "Mono.Http, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=0738eb9f132ed756";
public const string AssemblyMono_Posix = "Mono.Posix, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=0738eb9f132ed756";
@@ -100,7 +102,7 @@ static class Consts
public const string AssemblySystem_ServiceProcess = "System.ServiceProcess, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
public const string AssemblySystem_Web = "System.Web, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
public const string AssemblySystem_Windows_Forms = "System.Windows.Forms, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b77a5c561934e089";
#if NET_4_0
#if NET_4_0 || BOOTSTRAP_NET_4_0
public const string AssemblySystem_2_0 = "System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
public const string AssemblySystemCore_3_5 = "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
public const string AssemblySystem_Core = "System.Core, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b77a5c561934e089";
+1 -2
View File
@@ -33,7 +33,7 @@
//
namespace System {
#pragma warning disable 436
[AttributeUsage (AttributeTargets.All, AllowMultiple=true)]
internal class MonoTODOAttribute : Attribute {
@@ -97,5 +97,4 @@ namespace System {
{
}
}
#pragma warning restore 436
}
+2 -4
View File
@@ -233,8 +233,6 @@ $(the_lib): $(build_lib)
$(Q) test ! -f $(build_lib:.dll=.pdb) || mv $(build_lib:.dll=.pdb) $(the_lib:.dll=.pdb)
endif
library_CLEAN_FILES += $(PROFILE)_aot.log
ifdef PLATFORM_AOT_SUFFIX
Q_AOT=$(if $(V),,@echo "AOT [$(PROFILE)] $(notdir $(@))";)
$(the_lib)$(PLATFORM_AOT_SUFFIX): $(the_lib)
@@ -252,7 +250,7 @@ endif
makefrag = $(depsdir)/$(PROFILE)_$(LIBRARY).makefrag
library_CLEAN_FILES += $(makefrag)
$(makefrag): $(sourcefile)
# @echo Creating $@ ...
@echo Creating $@ ...
@sed 's,^,$(build_lib): ,' $< >$@
@if test ! -f $(sourcefile).makefrag; then :; else \
cat $(sourcefile).makefrag >> $@ ; \
@@ -270,7 +268,7 @@ $(response): $(sourcefile)
@echo Converting $(sourcefile) to $@ ...
@cat $(sourcefile) | $(PLATFORM_CHANGE_SEPARATOR_CMD) >$@
endif
endif
-include $(makefrag)
+2 -2
View File
@@ -8,7 +8,7 @@ use_monolite := $(wildcard $(monolite_flag))
ifdef use_monolite
PROFILE_RUNTIME = $(with_mono_path_monolite) $(RUNTIME)
BOOTSTRAP_MCS = $(PROFILE_RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/monolite/mcs.exe
BOOTSTRAP_MCS = $(PROFILE_RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/monolite/gmcs.exe
else
PROFILE_RUNTIME = $(EXTERNAL_RUNTIME)
BOOTSTRAP_MCS = $(EXTERNAL_MCS)
@@ -60,7 +60,7 @@ do-profile-check: $(depsdir)/.stamp
$(MAKE) $(MAKE_Q) $(PROFILE_OUT) || ok=false; \
rm -f $(PROFILE_EXE) $(PROFILE_OUT); \
if $$ok; then :; else \
if test -f $(topdir)/class/lib/monolite/mcs.exe; then \
if test -f $(topdir)/class/lib/monolite/gmcs.exe; then \
$(MAKE) -s do-profile-check-monolite ; \
else \
echo "*** The compiler '$(BOOTSTRAP_MCS)' doesn't appear to be usable." 1>&2; \
-17
View File
@@ -1,17 +0,0 @@
#! -*- makefile -*-
BOOTSTRAP_PROFILE = basic
BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
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:MONODROID -nowarn:1699 -nostdlib -lib:$(topdir)/class/lib/$(PROFILE) $(DEFAULT_REFERENCES)
FRAMEWORK_VERSION = 2.1
NO_TEST = yes
# the tuner takes care of the install
NO_INSTALL = yes
+7 -5
View File
@@ -1,15 +1,17 @@
#! -*- makefile -*-
BOOTSTRAP_PROFILE = basic
my_runtime = $(RUNTIME) $(RUNTIME_FLAGS) --security=temporary-smcs-hack
INTERNAL_SMCS = $(my_runtime) $(topdir)/class/lib/$(PROFILE)/smcs.exe
BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
BOOTSTRAP_PROFILE = monotouch_bootstrap
BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(my_runtime) $(topdir)/class/lib/$(BOOTSTRAP_PROFILE)/smcs.exe
MCS = MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_SMCS)
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:MONOTOUCH -nowarn:1699 -nostdlib -lib:$(topdir)/class/lib/$(PROFILE) $(DEFAULT_REFERENCES)
PROFILE_MCS_FLAGS = -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:MONOTOUCH
FRAMEWORK_VERSION = 2.1
NO_TEST = yes
@@ -0,0 +1,20 @@
#! -*- makefile -*-
INTERNAL_SMCS = $(RUNTIME) $(RUNTIME_FLAGS) --security=temporary-smcs-hack $(topdir)/class/lib/$(PROFILE)/smcs.exe
BOOTSTRAP_PROFILE = net_2_0
BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
MCS = MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_SMCS)
# We can enable this if System.dll depends on features of the mscorlib.dll from this profile
#PROFILE_MCS_HAS_BOOTSTRAP_FALLBACK = yes
profile-check:
@:
PROFILE_MCS_FLAGS = -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:MONOTOUCH
FRAMEWORK_VERSION = 2.1
NO_TEST = yes
# the tuner takes care of the install
NO_INSTALL = yes
@@ -0,0 +1,21 @@
#! -*- makefile -*-
INTERNAL_SMCS = $(RUNTIME) $(RUNTIME_FLAGS) --security=temporary-smcs-hack $(topdir)/class/lib/$(PROFILE)/smcs.exe
INTERNAL_GMCS = $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/basic/gmcs.exe
BOOTSTRAP_PROFILE = basic
BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
MCS = MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_SMCS)
# We can enable this if System.dll depends new features of the mscorlib.dll from this profile
#PROFILE_MCS_HAS_BOOTSTRAP_FALLBACK = yes
profile-check:
@:
PROFILE_MCS_FLAGS = -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:MOONLIGHT
FRAMEWORK_VERSION = 2.1
NO_TEST = yes
# the tuner takes care of the install
NO_INSTALL = yes
+7 -5
View File
@@ -1,15 +1,17 @@
#! -*- makefile -*-
BOOTSTRAP_PROFILE = basic
my_runtime = $(RUNTIME) $(RUNTIME_FLAGS) --security=temporary-smcs-hack
INTERNAL_SMCS = $(my_runtime) $(topdir)/class/lib/$(PROFILE)/smcs.exe
BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
BOOTSTRAP_PROFILE = moonlight_bootstrap
BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(my_runtime) $(topdir)/class/lib/$(BOOTSTRAP_PROFILE)/smcs.exe
MCS = MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_SMCS)
profile-check:
@:
DEFAULT_REFERENCES = -r:mscorlib.dll
PROFILE_MCS_FLAGS = -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:MOONLIGHT -nowarn:1699 -nostdlib -lib:$(topdir)/class/lib/$(PROFILE) $(DEFAULT_REFERENCES)
PROFILE_MCS_FLAGS = -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:MOONLIGHT
FRAMEWORK_VERSION = 2.1
NO_TEST = yes
+3 -4
View File
@@ -1,15 +1,14 @@
# -*- makefile -*-
BOOTSTRAP_PROFILE = basic
BUILD_TOOLS_PROFILE = net_2_0_bootstrap
BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
MCS = MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
# nuttzing!
profile-check:
@:
DEFAULT_REFERENCES = -r:mscorlib.dll
PROFILE_MCS_FLAGS = -d:NET_1_1 -d:NET_2_0 -nowarn:1699 -nostdlib -lib:$(topdir)/class/lib/$(PROFILE) $(DEFAULT_REFERENCES)
PROFILE_MCS_FLAGS = -d:NET_1_1 -d:NET_2_0 -nowarn:1699
FRAMEWORK_VERSION = 2.0
+18
View File
@@ -0,0 +1,18 @@
# -*- makefile -*-
#
# Note that we're using the .NET 1.1 MCS but MONO_PATH points to the net_2_0_bootstrap directory.
# We do it this way to get assembly version references right.
#
BOOTSTRAP_PROFILE = basic
BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(BOOTSTRAP_PROFILE)/gmcs.exe
MCS = $(BOOTSTRAP_MCS)
profile-check:
PROFILE_MCS_FLAGS = -d:NET_1_1 -d:NET_2_0
FRAMEWORK_VERSION = 2.0
NO_SIGN_ASSEMBLY = yes
NO_TEST = yes
NO_INSTALL = yes
Loaded 100 of 5166 files, more files were not shown because too many files have changed in this diff. Show more