Bug 32020

Summary: Don't default to --with-tls=pthread on Solaris/x86
Product: [Mono] Runtime Reporter: Rainer Orth <ro>
Component: GeneralAssignee: Bugzilla <bugzilla>
Severity: normal CC: alexrp, mono-bugs+mono, mono-bugs+runtime
Priority: ---    
Version: 4.0.0   
Target Milestone: ---   
Hardware: PC   
OS: Other   
Tags: Is this bug a regression?: ---
Last known good build:

Description Rainer Orth 2015-07-16 08:22:07 UTC
After an initial build of mono on 64-bit Solaris 11/x86 with --disable-sgen (since that's what I'd needed
with mono 3.2.6 to get a working mono at all), I tried again without to check what happens.  The build aborted here:

usage: mcs [-cdHpVz] [-A file ] [-a string] [-n name] file...
make[6]: *** [build/deps/basic-profile-check.exe] Error 1
*** The compiler 'mcs' doesn't appear to be usable.
*** Trying the 'monolite' directory.
sgen is not supported when using --with-tls=pthread.

When I commented the corresponding clause in configure.ac:

@@ -295,7 +295,7 @@ case "$host" in
 		# This doesn't seem to work on solaris/x86, but the configure test runs
-		with_tls=pthread
+		#with_tls=pthread

and rebuilt, the build went fine.  Contrary to the the make check results with --with-tls=pthread, where 4
different tests hang hard and had to be killed manually, make check with --with-tls=__thread passed without
those hangs.  I've no idea what this comment above refers to, but I'm not aware of any TLS problems on Solaris 10+,
so this seems ill-conceived.  There were all sorts of problems in Solaris 8 and 9, but both are no longer relevant.

Comment 1 Alex Rønne Petersen 2016-04-11 07:54:59 UTC

None of us on the team really test Mono on Solaris regularly, so I'll take your word for it that it works. It's also worth noting that the fallback to pthread TLS was added nearly a decade ago, so it's certainly unlikely that it's needed anymore.

PR: https://github.com/mono/mono/pull/2866
Comment 2 Alex Rønne Petersen 2016-04-11 16:16:13 UTC
PR merged, marking as fixed.