From patchwork Tue Aug 9 12:17:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Edlinger X-Patchwork-Id: 657248 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 3s7tbX2SVNz9sxR for ; Tue, 9 Aug 2016 22:18:16 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=wNNRGSH5; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:content-type:mime-version; q=dns; s=default; b=LXb5l0oHItPXKw2SkcirHkbImdqXnyNei3kyfoRoD2UgFCIhAn I1SrT4Jq4Ntmiawu1HcwTueaObUDllJvU8c/2uCvUC5r70pup2WscAg4cP5vzObT 4bEx2O1iKr762K/Vn+rN16I1FbLDsWWo7y4MXFfyhbQtf4gaTigkuDVvM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:content-type:mime-version; s= default; bh=z/KC7lnWinN1lgEwrVzJRhtis60=; b=wNNRGSH52VA3+nAFlctH mtca9ncJ8XPCq0W3qvL6ro8inZX7ZqEYKsLCuakKqIJbs+M4qmCOZ6/e7jPEsXqZ bRAVGs+WybUOiwptw55+WwIybvmmtc7skRk/0bugkBIFyDFfWkU87UHtGoZ0f6SQ tpkpF6fZfvrjcEDGJ5Wt5Nk= Received: (qmail 129711 invoked by alias); 9 Aug 2016 12:18:04 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 129593 invoked by uid 89); 9 Aug 2016 12:18:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=no version=3.3.2 spammy=1, 12, 239193, Mode, Hx-spam-relays-external:sk:EUR01-V X-HELO: BAY004-OMC2S22.hotmail.com Received: from bay004-omc2s22.hotmail.com (HELO BAY004-OMC2S22.hotmail.com) (65.54.190.97) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA256 encrypted) ESMTPS; Tue, 09 Aug 2016 12:17:53 +0000 Received: from EUR01-VE1-obe.outbound.protection.outlook.com ([65.54.190.123]) by BAY004-OMC2S22.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008); Tue, 9 Aug 2016 05:17:51 -0700 Received: from DB5EUR01FT031.eop-EUR01.prod.protection.outlook.com (10.152.4.53) by DB5EUR01HT173.eop-EUR01.prod.protection.outlook.com (10.152.5.29) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.567.7; Tue, 9 Aug 2016 12:17:39 +0000 Received: from AM4PR0701MB2162.eurprd07.prod.outlook.com (10.152.4.52) by DB5EUR01FT031.mail.protection.outlook.com (10.152.4.253) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.567.7 via Frontend Transport; Tue, 9 Aug 2016 12:17:39 +0000 Received: from AM4PR0701MB2162.eurprd07.prod.outlook.com ([10.167.132.147]) by AM4PR0701MB2162.eurprd07.prod.outlook.com ([10.167.132.147]) with mapi id 15.01.0549.025; Tue, 9 Aug 2016 12:17:38 +0000 From: Bernd Edlinger To: Bruce Korb CC: "gcc-patches@gcc.gnu.org" Subject: [PATCH, fixincludes] Fix PR bootstrap/72833 Date: Tue, 9 Aug 2016 12:17:37 +0000 Message-ID: authentication-results: spf=softfail (sender IP is 10.152.4.52) smtp.mailfrom=hotmail.de; gnu.org; dkim=none (message not signed) header.d=none; gnu.org; dmarc=none action=none header.from=hotmail.de; received-spf: SoftFail (protection.outlook.com: domain of transitioning hotmail.de discourages use of 10.152.4.52 as permitted sender) x-ms-exchange-messagesentrepresentingtype: 1 x-eopattributedmessage: 0 x-forefront-antispam-report: CIP:10.152.4.52; IPV:NLI; CTRY:; EFV:NLI; SFV:NSPM; SFS:(10019020)(98900003); DIR:OUT; SFP:1102; SCL:1; SRVR:DB5EUR01HT173; H:AM4PR0701MB2162.eurprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; x-microsoft-exchange-diagnostics: 1; DB5EUR01HT173; 6:H7nc3K/8d8VBhUSHa+41DC+76xNgCiC+2A0b3P92kbj8DgKJM1ii5g3f7raI2wvTaYuVpoUGY2MeGCVERZ45e92rcqJdAU7L5TDxEpg3CaZ66JqgBOweGUP6rfrWa9cImYaEGvoEs1o2vobLwn/O8xr/cnS+MeZ2HvD3mDL1bu9MC6hLPGZTDeG8ZG9THBpsHkp2TELxHeNkEmGm8XH/6yBIJA3Hfg4rx1Be+CFYzfTkrZmPouqnHAAnflqFbaR9dCq48M+kolqcKl1yw0nqjnYlNLXN77CZwlOha16OJmU79Ykl/a7xKDhUdGk5q2aS; 5:CFhcGSBxRR7VQBNSb0S/AvzQG1z/mReEv99jhTBkeBEkRJj8zdy7sjDGi/V+56XNSKSvGrUFouQYEdonAi7Gknj/1Gipd2LEVZ6lubVCqwhtLQy19YSIV+Ng3n7jsvJVg184vknRtjUhEj9TFyJg4Q==; 24:qymoG3Byp7x10Ewzj5M+udTn2ifl27LB10sOLE1tJYyu+4yM10k0vAaDsYVtcV3zJBJg3ivX55KgO+qA/8SFbdG61/Zl6RcspA6ZH56I8bc=; 7:ZJtqqFqSI2nEkxY3DAwuC3EkXB6sJu0EVgHpQccxD7vLFS161kc3WJiNIv3EUGYxqJuXBd2pToduu9UlDkX5IS1t1L3OyFnZ7uoQm9CVyIO39xZfH4tAz94RVu/Uc5kwHV4JyNYWQnM89Dn5W1Anj5A5KZwKEFV0l5hKgb26rERoRwlkAUCmSvBtvH9EZGuTxMlao5MFXM6p7IcR1ISpiGACLQMj6A8Pv5c6klm3OGZ1GwlyDtncUM4CCt5fHR99 x-ms-office365-filtering-correlation-id: 8516b666-0339-40f5-e101-08d3c04f2680 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(1601124038)(1601125047); SRVR:DB5EUR01HT173; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(432015012)(102415321)(82015046); SRVR:DB5EUR01HT173; BCL:0; PCL:0; RULEID:; SRVR:DB5EUR01HT173; x-forefront-prvs: 0029F17A3F spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Aug 2016 12:17:37.9909 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5EUR01HT173 Hi! Due to my recent cleanup of special_function_p the darwin bootstrap is currently broken because the longjmp function misses the noreturn attribute. Therefore I revived an old solaris_longjmp_noreturn fixinclude rule. See the attached patch. Boot-strap on i686-apple-darwin11 and x86_64-apple-darwin11 was successful. Is it OK for trunk? Thanks Bernd. 2016-08-09 Bernd Edlinger PR bootstrap/72833 * fixincl.tpl (version-compare): Fix generation with autogen 5.18. * inclhack.def (darwin_longjmp_noreturn): New fix. * fixincl.x: Regenerated. * tests/base/i386/setjmp.h [DARWIN_LONGJMP_NORETURN_CHECK]: new test. Index: fixincludes/fixincl.tpl =================================================================== --- fixincludes/fixincl.tpl (revision 239193) +++ fixincludes/fixincl.tpl (working copy) @@ -1,7 +1,7 @@ [= AutoGen5 Template -*- Mode: C -*- x=fixincl.x =] [= - (if (version-compare >= autogen-version "5.18") + (if (version-compare >= autogen-version "5.18.1") (dne "-D" " * " "/* ") (dne " * " "/* ") ) =] */ Index: fixincludes/fixincl.x =================================================================== --- fixincludes/fixincl.x (revision 239193) +++ fixincludes/fixincl.x (working copy) @@ -1,12 +1,12 @@ /* -*- buffer-read-only: t -*- vi: set ro: - * + * * DO NOT EDIT THIS FILE (fixincl.x) - * - * It has been AutoGen-ed June 10, 2016 at 12:56:52 PM by AutoGen 5.18.3 + * + * It has been AutoGen-ed August 8, 2016 at 08:46:37 PM by AutoGen 5.18 * From the definitions inclhack.def * and the template file fixincl */ -/* DO NOT SVN-MERGE THIS FILE, EITHER Fri Jun 10 12:56:52 UTC 2016 +/* DO NOT SVN-MERGE THIS FILE, EITHER Mon Aug 8 20:46:37 CEST 2016 * * You must regenerate it. Use the ./genfixes script. * @@ -15,7 +15,7 @@ * certain ANSI-incompatible system header files which are fixed to work * correctly with ANSI C and placed in a directory that GNU C will search. * - * This file contains 235 fixup descriptions. + * This file contains 236 fixup descriptions. * * See README for more information. * @@ -2699,6 +2699,50 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * + * Description of Darwin_Longjmp_Noreturn fix + */ +tSCC zDarwin_Longjmp_NoreturnName[] = + "darwin_longjmp_noreturn"; + +/* + * File name selection pattern + */ +tSCC zDarwin_Longjmp_NoreturnList[] = + "i386/setjmp.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzDarwin_Longjmp_NoreturnMachs[] = { + "*-*-darwin*", + (const char*)NULL }; + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zDarwin_Longjmp_NoreturnSelect0[] = + "(.*longjmp\\(.*jmp_buf.*[^)]+\\));"; + +/* + * content bypass pattern - skip fix if pattern found + */ +tSCC zDarwin_Longjmp_NoreturnBypass0[] = + "__dead2"; + +#define DARWIN_LONGJMP_NORETURN_TEST_CT 2 +static tTestDesc aDarwin_Longjmp_NoreturnTests[] = { + { TT_NEGREP, zDarwin_Longjmp_NoreturnBypass0, (regex_t*)NULL }, + { TT_EGREP, zDarwin_Longjmp_NoreturnSelect0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Darwin_Longjmp_Noreturn + */ +static const char* apzDarwin_Longjmp_NoreturnPatch[] = { + "format", + "%1 __attribute__ ((__noreturn__));", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * * Description of Darwin_Private_Extern fix */ tSCC zDarwin_Private_ExternName[] = @@ -9633,9 +9677,9 @@ * * List of all fixes */ -#define REGEX_COUNT 272 +#define REGEX_COUNT 274 #define MACH_LIST_SIZE_LIMIT 187 -#define FIX_COUNT 235 +#define FIX_COUNT 236 /* * Enumerate the fixes @@ -9703,6 +9747,7 @@ DARWIN_9_LONG_DOUBLE_FUNCS_2_FIXIDX, DARWIN_EXTERNC_FIXIDX, DARWIN_GCC4_BREAKAGE_FIXIDX, + DARWIN_LONGJMP_NORETURN_FIXIDX, DARWIN_PRIVATE_EXTERN_FIXIDX, DARWIN_STDINT_1_FIXIDX, DARWIN_STDINT_2_FIXIDX, @@ -10189,6 +10234,11 @@ DARWIN_GCC4_BREAKAGE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aDarwin_Gcc4_BreakageTests, apzDarwin_Gcc4_BreakagePatch, 0 }, + { zDarwin_Longjmp_NoreturnName, zDarwin_Longjmp_NoreturnList, + apzDarwin_Longjmp_NoreturnMachs, + DARWIN_LONGJMP_NORETURN_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aDarwin_Longjmp_NoreturnTests, apzDarwin_Longjmp_NoreturnPatch, 0 }, + { zDarwin_Private_ExternName, zDarwin_Private_ExternList, apzDarwin_Private_ExternMachs, DARWIN_PRIVATE_EXTERN_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, Index: fixincludes/inclhack.def =================================================================== --- fixincludes/inclhack.def (revision 239193) +++ fixincludes/inclhack.def (working copy) @@ -1395,6 +1395,21 @@ }; /* + * Before Mac OS X 10.8 doesn't mark longjump noreturn. + */ +fix = { + hackname = darwin_longjmp_noreturn; + mach = "*-*-darwin*"; + files = "i386/setjmp.h"; + bypass = "__dead2"; + select = "(.*longjmp\\(.*jmp_buf.*[^)]+\\));"; + c_fix = format; + c_fix_arg = "%1 __attribute__ ((__noreturn__));"; + + test_text = "void siglongjmp(sigjmp_buf, int);"; +}; + +/* * __private_extern__ doesn't exist in FSF GCC. Even if it did, * why would you ever put it in a system header file? */ Index: fixincludes/tests/base/i386/setjmp.h =================================================================== --- fixincludes/tests/base/i386/setjmp.h (revision 0) +++ fixincludes/tests/base/i386/setjmp.h (working copy) @@ -0,0 +1,14 @@ +/* DO NOT EDIT THIS FILE. + + It has been auto-edited by fixincludes from: + + "fixinc/tests/inc/i386/setjmp.h" + + This had to be done to correct non-standard usages in the + original, manufacturer supplied header file. */ + + + +#if defined( DARWIN_LONGJMP_NORETURN_CHECK ) +void siglongjmp(sigjmp_buf, int) __attribute__ ((__noreturn__)); +#endif /* DARWIN_LONGJMP_NORETURN_CHECK */