Bug 32020

Summary: Don't default to --with-tls=pthread on Solaris/x86
Product: [Mono] Runtime Reporter: Rainer Orth <ro>
Component: GeneralAssignee: Bugzilla <bugzilla>
Status: RESOLVED FIXED    
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 4.0.2.5 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
 		libmono_cflags="-D_REENTRANT"
 		libgc_threads=pthreads
 		# This doesn't seem to work on solaris/x86, but the configure test runs
-		with_tls=pthread
+		#with_tls=pthread
 		has_dtrace=yes
 		use_sigposix=yes
 		enable_solaris_tar_check=yes

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.

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

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.