qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] tests: vm: auto_install OpenBSD


From: Brad Smith
Subject: Re: [Qemu-devel] [PATCH] tests: vm: auto_install OpenBSD
Date: Fri, 24 Aug 2018 18:13:05 -0400
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

On 8/24/2018 10:46 AM, Peter Maydell wrote:

On 24 August 2018 at 15:43, Daniel P. Berrangé <address@hidden> wrote:
On Fri, Aug 24, 2018 at 10:36:30AM -0400, Brad Smith wrote:
I very much appreciate the effort to bump up to 6.3 as I was going
to suggest doing that at some point. But bumping up to 6.3 at the
moment will fail with the configure script. We've switched from GCC 4.2
to Clang. The TLS check will fail with Clang's emulated TLS. We've
had a local patch for awhile to fix the test but I don't think it is
appropriate to upstream as is.

Index: configure
--- configure.orig
+++ configure
@@ -1876,7 +1876,7 @@ static __thread int tls_var;
  int main(void) { return tls_var; }
  EOF
-if ! compile_prog "-Werror" "" ; then
+if ! compile_prog "-Werror" "-pthread" ; then
      error_exit "Your compiler does not support the __thread specifier for " \
       "Thread-Local Storage (TLS). Please upgrade to a version that does."
  fi
Later on in the configure script there's a check for pthreads that
sets $PTHREAD_LIB to the desired arg.

Best is probably to move that check higher up, and then use $PTHREAD_LIB
as the argument to the compile_prog call you show.
Is emulated TLS a sufficiently complete/performant TLS
implementation for our purposes?

I won't make any claims for performance but it's been used for 2 1/2 years now with QEMU with GCC 4.9 and recently with Clang. The various libraries/apps and so forth that we had issues in the past with TLS all seem to work Ok. It's used on
Android too. Both newer versions of GCC and Clang implement this.

(I think it would be better if OpenBSD just implemented real TLS
like every other host OS we support.)
There is very much a desire to do so and it will be completed at some point. I know some work has gone into our threads library and linker towards implementing TLS but it's hasn't been completed yet. I have no idea how long it will be or what
is currently holding things up but I know it won't be anytime soon.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]