diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2018-12-03 14:40:48 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2018-12-03 14:40:48 +0100 |
commit | 7b36d26b22d147ffc347f427f9fd584700578a94 (patch) | |
tree | 88c4468909951e439665b7784eb9abb366b5806a | |
parent | 02cd5c1a8d033d7f91fea12a66bb44d1bbf85f76 (diff) | |
download | glibc-7b36d26b22d147ffc347f427f9fd584700578a94.zip glibc-7b36d26b22d147ffc347f427f9fd584700578a94.tar.gz glibc-7b36d26b22d147ffc347f427f9fd584700578a94.tar.bz2 |
Fix test-as-const-jmp_buf-ssp.c generation on gnu-i386
hurd's jmp_buf-ssp.sym does not define any symbol.
scripts/gen-as-const.py currently was emitting an empty line in that
case, and the gawk invocation was prepending "asconst_" to it, ending up
with:
.../build/glibc/setjmp/test-as-const-jmp_buf-ssp.c:1:2: error: expected « = », « , », « ; », « asm » or
« __attribute__ » at end of input
1 | asconst_
| ^~~~~~~~
* scripts/gen-as-const.py (main): Avoid emitting empty line when
there is no element in `consts'.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | scripts/gen-as-const.py | 2 |
2 files changed, 6 insertions, 1 deletions
@@ -1,3 +1,8 @@ +2018-12-03 Samuel Thibault <samuel.thibault@ens-lyon.org> + + * scripts/gen-as-const.py (main): Avoid emitting empty line when + there is no element in `consts'. + 2018-12-01 Florian Weimer <fweimer@redhat.com> * support/support_capture_subprocess.c diff --git a/scripts/gen-as-const.py b/scripts/gen-as-const.py index b7a5744..cabf401 100644 --- a/scripts/gen-as-const.py +++ b/scripts/gen-as-const.py @@ -153,7 +153,7 @@ def main(): print(gen_test(sym_data)) else: consts = compute_c_consts(sym_data, args.cc) - print('\n'.join('#define %s %s' % c for c in sorted(consts.items()))) + print(''.join('#define %s %s\n' % c for c in sorted(consts.items())), end='') if __name__ == '__main__': main() |