public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/fw/linux-5.2] scripts/glibcextract.py: Print source code on compiler failure
@ 2019-07-20 21:48 Florian Weimer
  0 siblings, 0 replies; 2+ messages in thread
From: Florian Weimer @ 2019-07-20 21:48 UTC (permalink / raw)
  To: glibc-cvs

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 +++++
 scripts/glibcextract.py | 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
diff --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:


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [glibc/fw/linux-5.2] scripts/glibcextract.py: Print source code on compiler failure
@ 2019-07-21 20:31 Florian Weimer
  0 siblings, 0 replies; 2+ messages in thread
From: Florian Weimer @ 2019-07-21 20:31 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=719d81f129206d51bf168076ed1578e7414c2506

commit 719d81f129206d51bf168076ed1578e7414c2506
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 +++++
 scripts/glibcextract.py | 7 ++++++-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index a1fdef9..fb14c32 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-20  Egor Kobylkin  <egor@kobylkin.com>
 
 	[BZ #2872]
diff --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:


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-07-21 20:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-20 21:48 [glibc/fw/linux-5.2] scripts/glibcextract.py: Print source code on compiler failure Florian Weimer
2019-07-21 20:31 Florian Weimer

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).