berkeley-db: Correct TLS auto-detection (#32592)
This commit is contained in:
		| @@ -39,6 +39,11 @@ class BerkeleyDb(AutotoolsPackage): | |||||||
|     build_directory = "build_unix" |     build_directory = "build_unix" | ||||||
| 
 | 
 | ||||||
|     patch("drop-docs.patch", when="~docs") |     patch("drop-docs.patch", when="~docs") | ||||||
|  |     # Correct autoconf macro to detect TLS support. | ||||||
|  |     # Patch developed by @eschnett. There is no upstream issue because | ||||||
|  |     # Oracle's web site does not have instructions for submitting such | ||||||
|  |     # an issue or pull request. | ||||||
|  |     patch("tls.patch") | ||||||
| 
 | 
 | ||||||
|     conflicts("%clang@7:", when="@5.3.28") |     conflicts("%clang@7:", when="@5.3.28") | ||||||
|     conflicts("%gcc@8:", when="@5.3.28") |     conflicts("%gcc@8:", when="@5.3.28") | ||||||
|   | |||||||
							
								
								
									
										24
									
								
								var/spack/repos/builtin/packages/berkeley-db/tls.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								var/spack/repos/builtin/packages/berkeley-db/tls.patch
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,24 @@ | |||||||
|  | --- a/dist/aclocal/tls.m4 | ||||||
|  | +++ b/dist/aclocal/tls.m4 | ||||||
|  | @@ -15,7 +15,8 @@ | ||||||
|  |        for ax_tls_defn_keyword in $ax_tls_keywords ""; do | ||||||
|  |            test -z "$ax_tls_decl_keyword" && | ||||||
|  |                test -z "$ax_tls_defn_keyword" && continue | ||||||
|  | -          AC_TRY_COMPILE([template <typename T>class TLSClass { | ||||||
|  | +          AC_TRY_COMPILE([#include <stdlib.h> | ||||||
|  | +              template <typename T>class TLSClass { | ||||||
|  |                public: static ] $ax_tls_decl_keyword [ T *tlsvar; | ||||||
|  |                }; | ||||||
|  |                class TLSClass2 { | ||||||
|  | --- a/dist/configure | ||||||
|  | +++ b/dist/configure | ||||||
|  | @@ -19044,7 +19044,8 @@ | ||||||
|  |                test -z "$ax_tls_defn_keyword" && continue | ||||||
|  |            cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||||||
|  |  /* end confdefs.h.  */ | ||||||
|  | -template <typename T>class TLSClass { | ||||||
|  | +#include <stdlib.h> | ||||||
|  | +              template <typename T>class TLSClass { | ||||||
|  |                public: static  $ax_tls_decl_keyword  T *tlsvar; | ||||||
|  |                }; | ||||||
|  |                class TLSClass2 { | ||||||
		Reference in New Issue
	
	Block a user
	 Erik Schnetter
					Erik Schnetter