From patchwork Sat Dec 1 23:12:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 1006437 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-97879-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gnu.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="F85Uv1Tt"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 436n9R30D7z9s8r for ; Sun, 2 Dec 2018 10:12:59 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:cc:subject:message-id :mime-version:content-type:content-transfer-encoding; q=dns; s= default; b=oNzlINSd30F7uFpz7oczAUy+J4Ka5xkImBchB/qNCQo5KuLgx0Kae ErhJT8Hom4KZEwnCkCediBsl4gDb7WXkfM4uiXQtZbKm2Hxmy4J3jC/S9FBqwwJ1 upQ5/rUP9zOvpYv4cH2bo0HOciWiSq63HMh2hLpJc5Wmrq5W21pmJs= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:cc:subject:message-id :mime-version:content-type:content-transfer-encoding; s=default; bh=G7pxBo7OJpkPunarUsnDyEAk918=; b=F85Uv1Tt0LiO2jZ0UxT0htRRIJv3 q27lgs6EWhDSe2PpbVLHdeLYgp1ow9V19LnOYd1NDPKXfz57ADQEIzd3Q+bHaFGQ 0+3lujX371rNyrHk8OD3VKRzECwBQb0V89cLXxcoMq7Q6J8kHX0e/6zGl5WX1Otc My0BC0B48D2QELc= 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: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , 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 To: libc-alpha@sourceware.org Cc: Joseph Myers Subject: [PATCH] Fix test-as-const-jmp_buf-ssp.c generation on gnu-i386 Message-ID: <20181201231247.p7z3veulcqxfd2o2@function> MIME-Version: 1.0 Content-Disposition: inline User-Agent: NeoMutt/20170113 (1.7.2) 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 * scripts/gen-as-const.py (main): Avoid emitting empty line when there is no element in `consts'. 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()