]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
scripts/glibcextract.py: Print source code on compiler failure
authorFlorian Weimer <fweimer@redhat.com>
Sat, 20 Jul 2019 08:55:25 +0000 (10:55 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Sun, 21 Jul 2019 20:31:33 +0000 (22:31 +0200)
ChangeLog
scripts/glibcextract.py

index a1fdef9cff1bb816355f60e0aeed4688ece05919..fb14c32c43cf35c5ac14dd949bbda64d93ddb4dd 100644 (file)
--- 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]
index 0ae1371a487ba7ee535fdad9016af799715d6fbd..5e26cf53c3c8ae051897e55ac752a5f32f96e6a1 100644 (file)
@@ -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: