1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
|
Author: Andreas Beckmann <anbe@debian.org>
Description: make cuda-gdb build from source
cuda-gdb is based on gdb 13.1
fix building and linking against python3 without NVIDIA_PYTHON_DYNLIB
can't use autoreconf because gdb only works with ancient autofoo
Forwarded: not-needed
--- a/cuda-gdb/configure
+++ b/cuda-gdb/configure
@@ -1289,6 +1289,9 @@ do
| --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
x_libraries=$ac_optarg ;;
+ --runstatedir=*)
+ echo "Ignoring $ac_option" ;;
+
-*) as_fn_error $? "unrecognized option: \`$ac_option'
Try \`$0 --help' for more information"
;;
@@ -2042,6 +2045,7 @@ do
for ac_arg
do
case $ac_arg in
+ --runstatedir=*) continue ;;
-no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil)
--- a/cuda-gdb/gdb/doc/gdb.texinfo
+++ b/cuda-gdb/gdb/doc/gdb.texinfo
@@ -48529,7 +48529,7 @@ terminates) is not issued when running i
@item --batch-silent
Run in batch mode, just like @option{--batch}, but totally silent. All @value{GDBN}
-output is supressed (stderr is unaffected). This is much quieter than
+output is suppressed (stderr is unaffected). This is much quieter than
@option{--silent} and would be useless for an interactive session.
This is particularly useful when using targets that give @samp{Loading section}
--- a/cuda-gdb/bfd/Makefile.in
+++ b/cuda-gdb/bfd/Makefile.in
@@ -2506,6 +2506,7 @@ coff-tic54x.lo: coff-tic54x.c
$(MKDOC): doc/chew.stamp ; @true
doc/chew.stamp: $(srcdir)/doc/chew.c doc/$(am__dirstamp)
$(AM_V_CCLD)$(CC_FOR_BUILD) -o doc/chw$$$$$(EXEEXT_FOR_BUILD) $(CFLAGS_FOR_BUILD) \
+ $(CPPFLAGS) \
$(LDFLAGS_FOR_BUILD) $(H_CFLAGS) \
-I. -I$(srcdir) -Idoc -I$(srcdir)/../include -I$(srcdir)/../intl -I../intl \
$(srcdir)/doc/chew.c && \
--- a/cuda-gdb/gdb/main.c
+++ b/cuda-gdb/gdb/main.c
@@ -67,8 +67,12 @@
#ifdef NVIDIA_CUDA_GDB
#ifdef HAVE_PYTHON
+#ifdef NVIDIA_PYTHON_DYNLIB
/* Print the version of the libpython library loaded by the dynlib code */
extern void python_print_library ();
+#else
+inline void python_print_library () {}
+#endif
#endif
#endif
/* The selected interpreter. */
@@ -943,9 +947,11 @@ captured_main_1 (struct captured_main_ar
#ifdef HAVE_PYTHON
case OPT_CUDA_DISABLE_PYTHON:
{
+#ifdef NVIDIA_PYTHON_DYNLIB
/* Whether cuda-gdb should disable dylib python support. */
extern bool cuda_disable_python;
cuda_disable_python = true;
+#endif
break;
}
#endif
--- a/cuda-gdb/gdb/python/python-internal.h
+++ b/cuda-gdb/gdb/python/python-internal.h
@@ -716,6 +716,10 @@ gdb_PyBool_FromLong (long l)
#undef PyBool_FromLong
#define PyBool_FromLong gdb_PyBool_FromLong
+#else /* NVIDIA_PYTHON_DYNLIB */
+
+extern PyThreadState *_PyOS_ReadlineTState;
+
#endif /* NVIDIA_PYTHON_DYNLIB */
/* PyObject_CallMethod's 'method' and 'format' parameters were missing
|