1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-28 00:21:52 +03:00

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'.
This commit is contained in:
Samuel Thibault
2018-12-03 14:40:48 +01:00
parent 02cd5c1a8d
commit 7b36d26b22
2 changed files with 6 additions and 1 deletions

View File

@ -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()