summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorRobert Mijakovic <robert.mijakovic@gmail.com>2021-03-24 11:55:19 +0100
committerGitHub <noreply@github.com>2021-03-24 11:55:19 +0100
commit0722f59cb2989f18d67bef5324695b77585b8678 (patch)
tree0900a3ca28e6a8269d1d308d3507d034057227a3 /var
parentc41c7ce63832e4106512c879e5b26982cf8358da (diff)
downloadspack-0722f59cb2989f18d67bef5324695b77585b8678.tar.gz
spack-0722f59cb2989f18d67bef5324695b77585b8678.tar.bz2
spack-0722f59cb2989f18d67bef5324695b77585b8678.tar.xz
spack-0722f59cb2989f18d67bef5324695b77585b8678.zip
gdb: resolve issue with libintl_gettext (#22478)
Co-authored-by: Robert Mijakovic <robert.mijakovic@lrz.de>
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/gdb/gdb-libintl.patch12
-rw-r--r--var/spack/repos/builtin/packages/gdb/package.py4
2 files changed, 16 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/gdb/gdb-libintl.patch b/var/spack/repos/builtin/packages/gdb/gdb-libintl.patch
new file mode 100644
index 0000000000..5d990d6305
--- /dev/null
+++ b/var/spack/repos/builtin/packages/gdb/gdb-libintl.patch
@@ -0,0 +1,12 @@
+diff -Naur gdbserver/Makefile.in gdbserver/Makefile.in
+--- gdbserver/Makefile.in 2020-10-24 06:23:02.000000000 +0200
++++ gdbserver/Makefile.in 2021-02-15 13:41:31.732000000 +0100
+@@ -388,7 +388,7 @@
+ $(SILENCE) rm -f $(IPA_LIB)
+ $(ECHO_CXXLD) $(CC_LD) -shared -fPIC -Wl,--soname=$(IPA_LIB) \
+ -Wl,--no-undefined $(INTERNAL_CFLAGS) $(INTERNAL_LDFLAGS) \
+- -o $(IPA_LIB) ${IPA_OBJS} -ldl -pthread
++ -o $(IPA_LIB) ${IPA_OBJS} $(INTL) -ldl -pthread
+
+ # Put the proper machine-specific files first, so M-. on a machine
+ # specific routine gets the one for the correct machine.
diff --git a/var/spack/repos/builtin/packages/gdb/package.py b/var/spack/repos/builtin/packages/gdb/package.py
index 47f986be57..0e6b942c68 100644
--- a/var/spack/repos/builtin/packages/gdb/package.py
+++ b/var/spack/repos/builtin/packages/gdb/package.py
@@ -45,6 +45,10 @@ class Gdb(AutotoolsPackage, GNUMirrorPackage):
variant('ld', default=False, description='Enable ld')
variant('tui', default=False, description='Enable tui')
+ # Resolves the undefined references to libintl_gettext while linking gdbserver
+ # https://www.gnu.org/software/gettext/FAQ.html#integrating_undefined
+ patch('gdb-libintl.patch', level=0, when='@10.1')
+
# Required dependency
depends_on('texinfo', type='build')