Received: from eggs.gnu.org ([2001:4830:134:3::10]:49864) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ftKKN-0003fV-1f for qemu-devel@nongnu.org; Fri, 24 Aug 2018 18:13:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ftKKJ-0004Yx-Og for qemu-devel@nongnu.org; Fri, 24 Aug 2018 18:13:10 -0400 Received: from speedy.comstyle.com ([2001:470:1d:8c::2]:15378 helo=mail.comstyle.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ftKKJ-0004XU-DE for qemu-devel@nongnu.org; Fri, 24 Aug 2018 18:13:07 -0400 References: <20180824012126.22721-1-famz@redhat.com> <8d039be4-486e-e017-88ca-5cb6ebd89519@comstyle.com> <20180824144341.GU3430@redhat.com> From: Brad Smith Message-ID: <1c7b3f83-3a12-37dc-bdae-513dccae8226@comstyle.com> Date: Fri, 24 Aug 2018 18:13:05 -0400 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] tests: vm: auto_install OpenBSD List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell , "=?UTF-8?Q?Daniel_P._Berrang=c3=a9?=" Cc: Fam Zheng , QEMU Developers , =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= , =?UTF-8?Q?Alex_Benn=c3=a9e?= On 8/24/2018 10:46 AM, Peter Maydell wrote: > On 24 August 2018 at 15:43, Daniel P. Berrang=C3=A9 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 specifi= er 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_L= IB >> 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=20 years now with QEMU with GCC 4.9 and recently with Clang. The various=20 libraries/apps and so forth that we had issues in the past with TLS all seem to work Ok.=20 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=20 point. I know some work has gone into our threads library and linker towards=20 implementing TLS but it's hasn't been completed yet. I have no idea how long it will=20 be or what is currently holding things up but I know it won't be anytime soon.