From 76b93e4504defd856b62027371064a5e65a027a5 Mon Sep 17 00:00:00 2001 From: Quellyn Snead Date: Thu, 2 Sep 2021 17:00:48 -0600 Subject: [PATCH] Address external linkage failures in elfutils 0.185: https://bugs.gentoo.org/794601 https://sourceware.org/pipermail/elfutils-devel/2021q2/003862.html Encountered while building within a Spack environment. --- .../elfutils/elfutils-0.185-static-inline.patch | 12 ++++++++++++ var/spack/repos/builtin/packages/elfutils/package.py | 2 ++ 2 files changed, 14 insertions(+) create mode 100644 var/spack/repos/builtin/packages/elfutils/elfutils-0.185-static-inline.patch diff --git a/var/spack/repos/builtin/packages/elfutils/elfutils-0.185-static-inline.patch b/var/spack/repos/builtin/packages/elfutils/elfutils-0.185-static-inline.patch new file mode 100644 index 00000000000..ec1aaf47a33 --- /dev/null +++ b/var/spack/repos/builtin/packages/elfutils/elfutils-0.185-static-inline.patch @@ -0,0 +1,12 @@ +https://bugs.gentoo.org/794601 +--- a/src/elflint.c ++++ b/src/elflint.c +@@ -3434,7 +3434,7 @@ buffer_pos (Elf_Data *data, const unsigned char *p) + return p - (const unsigned char *) data->d_buf; + } + +-inline size_t ++static inline size_t + buffer_left (Elf_Data *data, const unsigned char *p) + { + return (const unsigned char *) data->d_buf + data->d_size - p; diff --git a/var/spack/repos/builtin/packages/elfutils/package.py b/var/spack/repos/builtin/packages/elfutils/package.py index 3786bb0dc49..4e17d6e4d0f 100644 --- a/var/spack/repos/builtin/packages/elfutils/package.py +++ b/var/spack/repos/builtin/packages/elfutils/package.py @@ -54,6 +54,8 @@ class Elfutils(AutotoolsPackage, SourcewarePackage): variant('debuginfod', default=False, description='Enable libdebuginfod support.') + patch('elfutils-0.185-static-inline.patch', when='@0.185') + depends_on('bzip2', type='link', when='+bzip2') depends_on('xz', type='link', when='+xz') depends_on('zlib', type='link')