public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@sourceware.org>
To: gdb-cvs@sourceware.org
Subject: [binutils-gdb] Wrap python_write_bytecode with HAVE_PYTHON ifdef
Date: Thu, 21 Jul 2022 00:12:47 +0000 (GMT)	[thread overview]
Message-ID: <20220721001247.F16EC3858D1E@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=0679db296682575b4d34fc8686fbbeb305b283e9

commit 0679db296682575b4d34fc8686fbbeb305b283e9
Author: Kevin Buettner <kevinb@redhat.com>
Date:   Wed Jul 20 17:00:24 2022 -0700

    Wrap python_write_bytecode with HAVE_PYTHON ifdef
    
    This commit fixes a build error on machines lacking python headers
    and/or libraries.

Diff:
---
 gdb/python/python.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gdb/python/python.c b/gdb/python/python.c
index c719e3dc90c..8fa935c8286 100644
--- a/gdb/python/python.c
+++ b/gdb/python/python.c
@@ -1855,6 +1855,7 @@ show_python_dont_write_bytecode (struct ui_file *file, int from_tty,
 		value);
 }
 
+#ifdef HAVE_PYTHON
 /* Return value to assign to PyConfig.write_bytecode or, when
    negated (via !), Py_DontWriteBytecodeFlag.  Py_DontWriteBytecodeFlag
    is deprecated in Python 3.12.  */
@@ -1872,6 +1873,7 @@ python_write_bytecode ()
 
   return wbc;
 }
+#endif /* HAVE_PYTHON */
 
 /* Implement 'set python dont-write-bytecode'.  This sets Python's internal
    flag no matter when the command is issued, however, if this is used


                 reply	other threads:[~2022-07-21  0:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220721001247.F16EC3858D1E@sourceware.org \
    --to=kevinb@sourceware.org \
    --cc=gdb-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).