public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Florian Weimer <fw@sourceware.org>
To: glibc-cvs@sourceware.org
Subject: [glibc/fw/linux-5.2] scripts/glibcextract.py: Print source code on compiler failure
Date: Sat, 20 Jul 2019 21:48:00 -0000 [thread overview]
Message-ID: <20190720214846.61321.qmail@sourceware.org> (raw)
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=332b70b090f5c6d16fecb8e049b9ade0f4895c54
commit 332b70b090f5c6d16fecb8e049b9ade0f4895c54
Author: Florian Weimer <fweimer@redhat.com>
Date: Sat Jul 20 10:55:25 2019 +0200
scripts/glibcextract.py: Print source code on compiler failure
Diff:
---
ChangeLog | 5 +++++
| 7 ++++++-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index a606c5f..688f4d6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2019-07-20 Florian Weimer <fweimer@redhat.com>
+
+ * scripts/glibcextract.py (compute_c_consts): Print source code on
+ compiler failure.
+
2019-07-19 Florian Weimer <fweimer@redhat.com>
* sysdeps/unix/sysv/linux/syscall-names.list: Add system calls
--git a/scripts/glibcextract.py b/scripts/glibcextract.py
index 0ae1371..5e26cf5 100644
--- a/scripts/glibcextract.py
+++ b/scripts/glibcextract.py
@@ -59,7 +59,12 @@ def compute_c_consts(sym_data, cc):
# Compilation has to be from stdin to avoid the temporary file
# name being written into the generated dependencies.
cmd = ('%s -S -o %s -x c - < %s' % (cc, s_file_name, c_file_name))
- subprocess.check_call(cmd, shell=True)
+ try:
+ subprocess.check_call(cmd, shell=True)
+ except:
+ print("Source code failed to compile:")
+ print(out_text)
+ raise
consts = {}
with open(s_file_name, 'r') as s_file:
for line in s_file:
next reply other threads:[~2019-07-20 21:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-20 21:48 Florian Weimer [this message]
2019-07-21 20:31 Florian Weimer
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=20190720214846.61321.qmail@sourceware.org \
--to=fw@sourceware.org \
--cc=glibc-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).