diff options
author | Erik Schnetter <schnetter@gmail.com> | 2022-09-14 00:13:50 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-13 22:13:50 -0600 |
commit | 9543716d81bc51c17e2849bb8e071f5bba641ea4 (patch) | |
tree | 71e3105dd6e59fe734aed84cf25740bd3359f89d | |
parent | 4ebdc5643eaff583e44111e4963c8e8fa62cc71a (diff) | |
download | spack-9543716d81bc51c17e2849bb8e071f5bba641ea4.tar.gz spack-9543716d81bc51c17e2849bb8e071f5bba641ea4.tar.bz2 spack-9543716d81bc51c17e2849bb8e071f5bba641ea4.tar.xz spack-9543716d81bc51c17e2849bb8e071f5bba641ea4.zip |
berkeley-db: Correct TLS auto-detection (#32592)
-rw-r--r-- | var/spack/repos/builtin/packages/berkeley-db/package.py | 5 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/berkeley-db/tls.patch | 24 |
2 files changed, 29 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/berkeley-db/package.py b/var/spack/repos/builtin/packages/berkeley-db/package.py index 9d0f89c4c2..5a35b7fa64 100644 --- a/var/spack/repos/builtin/packages/berkeley-db/package.py +++ b/var/spack/repos/builtin/packages/berkeley-db/package.py @@ -39,6 +39,11 @@ class BerkeleyDb(AutotoolsPackage): build_directory = "build_unix" 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("%gcc@8:", when="@5.3.28") diff --git a/var/spack/repos/builtin/packages/berkeley-db/tls.patch b/var/spack/repos/builtin/packages/berkeley-db/tls.patch new file mode 100644 index 0000000000..7e308a72fc --- /dev/null +++ b/var/spack/repos/builtin/packages/berkeley-db/tls.patch @@ -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 { |