Message ID | 20181201231247.p7z3veulcqxfd2o2@function |
---|---|
State | Committed, archived |
Headers |
Received: (qmail 23740 invoked by alias); 1 Dec 2018 23:12:54 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: <libc-alpha.sourceware.org> List-Unsubscribe: <mailto:libc-alpha-unsubscribe-##L=##H@sourceware.org> List-Subscribe: <mailto:libc-alpha-subscribe@sourceware.org> List-Archive: <http://sourceware.org/ml/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-help@sourceware.org>, <http://sourceware.org/ml/#faqs> Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 23725 invoked by uid 89); 1 Dec 2018 23:12:53 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.6 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_NEUTRAL autolearn=ham version=3.3.2 spammy=H*r:181, H*r:2a01, HContent-Transfer-Encoding:8bit X-HELO: hera.aquilenet.fr Date: Sun, 2 Dec 2018 00:12:47 +0100 From: Samuel Thibault <samuel.thibault@gnu.org> To: libc-alpha@sourceware.org Cc: Joseph Myers <joseph@codesourcery.com> Subject: [PATCH] Fix test-as-const-jmp_buf-ssp.c generation on gnu-i386 Message-ID: <20181201231247.p7z3veulcqxfd2o2@function> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: NeoMutt/20170113 (1.7.2) |
Commit Message
Samuel Thibault
Dec. 1, 2018, 11:12 p.m. UTC
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_ | ^~~~~~~~ 2018-12-01 Samuel Thibault <samuel.thibault@ens-lyon.org> * scripts/gen-as-const.py (main): Avoid emitting empty line when there is no element in `consts'.
Comments
Samuel Thibault, le dim. 02 déc. 2018 00:12:47 +0100, a ecrit: > 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_ > | ^~~~~~~~ That said, it's not enough, gen_test() does not emit a main() function, and thus the test build fails with missing reference to main(). Is there a strong reason for making the emission of code lazy with the started boolean? Samuel
On Sat, 1 Dec 2018, Samuel Thibault wrote: > 2018-12-01 Samuel Thibault <samuel.thibault@ens-lyon.org> > > * scripts/gen-as-const.py (main): Avoid emitting empty line when > there is no element in `consts'. OK, please commit.
Joseph Myers, le lun. 03 déc. 2018 13:23:48 +0000, a ecrit: > On Sat, 1 Dec 2018, Samuel Thibault wrote: > > > 2018-12-01 Samuel Thibault <samuel.thibault@ens-lyon.org> > > > > * scripts/gen-as-const.py (main): Avoid emitting empty line when > > there is no element in `consts'. > > OK, please commit. Done so, thanks. Samuel
On Mon, Dec 3, 2018 at 5:42 AM Samuel Thibault <samuel.thibault@gnu.org> wrote: > > Joseph Myers, le lun. 03 déc. 2018 13:23:48 +0000, a ecrit: > > On Sat, 1 Dec 2018, Samuel Thibault wrote: > > > > > 2018-12-01 Samuel Thibault <samuel.thibault@ens-lyon.org> > > > > > > * scripts/gen-as-const.py (main): Avoid emitting empty line when > > > there is no element in `consts'. > > > > OK, please commit. > > Done so, thanks. I still got /export/ssd/build/tools-build/glibc-many/src/glibc/csu/../sysdeps/i386/start.S:122: undefined reference to `main' collect2: error: ld returned 1 exit status make[4]: *** [../Rules:201: /export/ssd/build/tools-build/glibc-many/build/glibcs/i686-gnu/glibc/setjmp/test-as-const-jmp_buf-ssp] Error 1 make[4]: *** Waiting for unfinished jobs.... rm /export/ssd/build/tools-build/glibc-many/build/glibcs/i686-gnu/glibc/setjmp/test-as-const-jmp_buf-ssp.c make[4]: Leaving directory '/export/ssd/build/tools-build/glibc-many/src/glibc/setjmp' make[3]: *** [Makefile:258: setjmp/tests] Error 2 make[3]: Leaving directory '/export/ssd/build/tools-build/glibc-many/src/glibc' make[2]: *** [Makefile:9: check] Error 2 make[2]: Leaving directory '/export/ssd/build/tools-build/glibc-many/build/glibcs/i686-gnu/glibc' FAIL: glibcs-i686-gnu check
H.J. Lu, le lun. 03 déc. 2018 08:17:23 -0800, a ecrit: > On Mon, Dec 3, 2018 at 5:42 AM Samuel Thibault <samuel.thibault@gnu.org> wrote: > > > > Joseph Myers, le lun. 03 déc. 2018 13:23:48 +0000, a ecrit: > > > On Sat, 1 Dec 2018, Samuel Thibault wrote: > > > > > > > 2018-12-01 Samuel Thibault <samuel.thibault@ens-lyon.org> > > > > > > > > * scripts/gen-as-const.py (main): Avoid emitting empty line when > > > > there is no element in `consts'. > > > > > > OK, please commit. > > > > Done so, thanks. > > I still got > > /export/ssd/build/tools-build/glibc-many/src/glibc/csu/../sysdeps/i386/start.S:122: > undefined reference to `main' Yes, see my second mail in the same thread: “ That said, it's not enough, gen_test() does not emit a main() function, and thus the test build fails with missing reference to main(). Is there a strong reason for making the emission of code lazy with the started boolean? ” which needs to be discussed too. Samuel
diff --git a/scripts/gen-as-const.py b/scripts/gen-as-const.py index b7a5744bb1..cabf401ed1 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()