From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 114868 invoked by alias); 29 Nov 2019 14:43:32 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 114769 invoked by uid 89); 29 Nov 2019 14:43:31 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-19.5 required=5.0 tests=AWL,BAYES_00,FORGED_SPF_HELO,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 spammy= X-HELO: EUR04-VI1-obe.outbound.protection.outlook.com Received: from mail-eopbgr80045.outbound.protection.outlook.com (HELO EUR04-VI1-obe.outbound.protection.outlook.com) (40.107.8.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 29 Nov 2019 14:43:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3uC2SKnzUyb6LJ3QOhlegifgaMPyxOU/ehT+bnl03kA=; b=edqYNdNpzuocvmgSXMEQgFvW1lH+c7YEPnFSTH3kQGPG0TMJFIiuPO826ilDUhz+ho/hyVCzIfp2RaEPGB+iswDgrnQPtnMrBTH4jLhtqGRKdWQB8zVyUWD4sOylJmgcPgaXyXcogpoBlv3QbquiPp6kbL6cQuAD6ny01vhsI20= Received: from VI1PR08CA0157.eurprd08.prod.outlook.com (2603:10a6:800:d1::11) by VI1PR0801MB1856.eurprd08.prod.outlook.com (2603:10a6:800:57::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2495.20; Fri, 29 Nov 2019 14:43:25 +0000 Received: from AM5EUR03FT009.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e08::201) by VI1PR08CA0157.outlook.office365.com (2603:10a6:800:d1::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2495.18 via Frontend Transport; Fri, 29 Nov 2019 14:43:25 +0000 Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; gcc.gnu.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;gcc.gnu.org; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT009.mail.protection.outlook.com (10.152.16.110) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2495.18 via Frontend Transport; Fri, 29 Nov 2019 14:43:25 +0000 Received: ("Tessian outbound 224ffa173bf0:v37"); Fri, 29 Nov 2019 14:43:25 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 9d3d0ece40d68af7 X-CR-MTA-TID: 64aa7808 Received: from 2bfcc4b641ff.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id BC237961-3D1B-47B1-BBA9-FC7FBA3F679F.1; Fri, 29 Nov 2019 14:43:20 +0000 Received: from EUR02-AM5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 2bfcc4b641ff.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 29 Nov 2019 14:43:20 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=F4Vmujo0Xjwvk9avC6lyl/N4lZpREx5eqFvbxrd5D2pY6yM17WWlqtubqXrEzqtGG2PhngVyRF09eQEiM5fBBejJFRarExUJXN75dDBHA3E7K4KEn8FB3oWizpS7vkzc6Vqi5n83IHMag80Dl0oeRSgHae1MUHubkePy7ofT6ZFVh8s8lrINtpU8fZ0iG1EqVkGpsoIW8/kci+oK8yoaQAVaExnSVNiSRX2g1+m0AsIRoLMBIRlPlZ6wTg5ED4JIAZAVuPchJV2YBbhw8aUXcfebf0T+eGzfnpYdIWG8jlm80STxIJ+wsegFrEjOghPyVKwgicFaFwoXCi76+XbAWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3uC2SKnzUyb6LJ3QOhlegifgaMPyxOU/ehT+bnl03kA=; b=VlDqLOotVj4fekVKsGYub8wcNZE1m+cRdeSwLcSxhsFBFwcZJEodsUrgPl1117x600KWwmw09pnF+Z+KDdepYJ9sqtRDDSIhDSOp9gNqyyaYOFx/lG10HgvWk/y1AbSOy3LyI0hM6JnK7bleACwV9hiLrWSLoNmYJ/0Qii2F1NE8W80ZxpJ3obVZBH4NYcYR80P+3RXr7Gs2dm+pfVBZoN/eGlcb1f3bPs1AjGSRXqg+k3um+wjRuq30yRGeY6O73e3JzQI4VmZC85pgMZCqlXZnLm8n0LGrTIS9ontC3h6p50iLsfMhdrWkydBE2joXj4EdiG1EHc+Pn7KBBRqYog== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3uC2SKnzUyb6LJ3QOhlegifgaMPyxOU/ehT+bnl03kA=; b=edqYNdNpzuocvmgSXMEQgFvW1lH+c7YEPnFSTH3kQGPG0TMJFIiuPO826ilDUhz+ho/hyVCzIfp2RaEPGB+iswDgrnQPtnMrBTH4jLhtqGRKdWQB8zVyUWD4sOylJmgcPgaXyXcogpoBlv3QbquiPp6kbL6cQuAD6ny01vhsI20= Received: from VI1PR0801MB2127.eurprd08.prod.outlook.com (10.168.62.22) by VI1PR0801MB2077.eurprd08.prod.outlook.com (10.173.74.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2495.18; Fri, 29 Nov 2019 14:43:18 +0000 Received: from VI1PR0801MB2127.eurprd08.prod.outlook.com ([fe80::2077:6fd9:244d:8d16]) by VI1PR0801MB2127.eurprd08.prod.outlook.com ([fe80::2077:6fd9:244d:8d16%6]) with mapi id 15.20.2495.014; Fri, 29 Nov 2019 14:43:18 +0000 From: Wilco Dijkstra To: =?Windows-1252?Q?Martin_Li=9Aka?= , GCC Patches Subject: Re: [PATCH] PR85678: Change default to -fno-common Date: Fri, 29 Nov 2019 14:46:00 -0000 Message-ID: References: ,<2600d107-dc05-95b0-8864-5a9c4d7bb85e@suse.cz> In-Reply-To: <2600d107-dc05-95b0-8864-5a9c4d7bb85e@suse.cz> Authentication-Results-Original: spf=none (sender IP is ) smtp.mailfrom=Wilco.Dijkstra@arm.com; x-checkrecipientrouted: true x-ms-oob-tlc-oobclassifiers: OLM:8882;OLM:8882; X-Forefront-Antispam-Report-Untrusted: SFV:NSPM;SFS:(10009020)(4636009)(396003)(366004)(376002)(136003)(39860400002)(346002)(189003)(199004)(33656002)(52536014)(110136005)(229853002)(3846002)(606006)(6306002)(6436002)(9686003)(54896002)(6116002)(26005)(7736002)(71200400001)(446003)(74316002)(11346002)(478600001)(66066001)(71190400001)(14454004)(81156014)(8676002)(81166006)(236005)(5660300002)(186003)(6506007)(25786009)(256004)(76116006)(86362001)(102836004)(8936002)(99286004)(6246003)(66946007)(7696005)(55016002)(316002)(66476007)(2906002)(66446008)(76176011)(64756008)(66556008);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR0801MB2077;H:VI1PR0801MB2127.eurprd08.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: qcxu0tH9R4f8kIMOG6KzNHrOk5qEreeP/WXULrjWHhwhp7eLQXnjMXH1nOzG8gydp/3qv2LMJnLi33mhW3C6cGX+v+izd4QtOnmmJk7MtdSaY0RH1kiL8uJBEF5fBP3R+UG9SzwSQ3WkfHZjOGfSrSNFa+qyEN9ayA/YmpBeVHu5mwnD1oUBpTM75fLFuDXQQpySMJ+oLeSfkXWFgn3eJQ81giDZ1m5C8z7Y3XUPZ8IWZ9cahHSv8GhWsEgeT87OcwHYdQbnaZVphfV4lE6+6KjK7O5piYYv2dLAer4OZuleWEU0wU0i+dTy9Z+M1p8Uyydu6vtDC+dBbiNQUetMUc9yEvc5005GAEQ0+LuimcpCjnsWgBhhBKOqmRtE0IpyuS8tS8TjpImIXGISm7ey9DxMGopOVzbZ3zWVceNySijQpxtZ3aCx9txz/lF57b8UXoceiMVb4Tb09FzwmU7zBgmJkyT6wM9PufrVPppdHJQ= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Wilco.Dijkstra@arm.com; Return-Path: Wilco.Dijkstra@arm.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT009.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 84d4c5f6-002c-4b09-9990-08d774da795f X-SW-Source: 2019-11/txt/msg02663.txt.bz2 Hi Martin, > I've noticed quite significant package failures caused by the revision. How significant? Is it mostly the common mistake of forgetting extern? > Would you please consider documenting this change in porting_to.html > (and in changes.html) for GCC 10 release? Sure, I already had a patch for changes.html - I've added an initial portin= g_to as well: [wwwdocs] Document -fcommon default change Add an entry for the default change. Passes the W3 validator. -- diff --git a/htdocs/gcc-10/changes.html b/htdocs/gcc-10/changes.html index f0f0d312171a54afede176f06ce76f9c8abaebc4..980e4e591781d04aa888ba59889= 81006bd30dd1f 100644 --- a/htdocs/gcc-10/changes.html +++ b/htdocs/gcc-10/changes.html @@ -47,6 +47,13 @@ a work-in-progress.

=20

General Improvements

+

The following GCC command line options have been introduced or improved= .

+
    +
  • GCC now defaults to -fno-common. In C, global variable= s with + multiple tentative definitions will result in linker errors. + Global variable accesses are also more efficient on various targets. +
  • +
=20

The following built-in functions have been introduced.

    diff --git a/htdocs/gcc-10/porting_to.html b/htdocs/gcc-10/porting_to.html new file mode 100644 index 0000000000000000000000000000000000000000..2e652f6aa4bd3259a316af0c72a= b7eb96bab53b7 --- /dev/null +++ b/htdocs/gcc-10/porting_to.html @@ -0,0 +1,65 @@ + + + + + +Porting to GCC 10 + + + + +

    Porting to GCC 10

    + +

    +The GCC 10 release series differs from previous GCC releases in +a number of ways. Some of these are a result +of bug fixing, and some old behaviors have been intentionally changed +to support new standards, or relaxed in standards-conforming ways to +facilitate compilation or run-time performance. +

    + +

    +Some of these changes are user visible and can cause grief when +porting to GCC 10. This document is an effort to identify common issues +and provide solutions. Let us know if you have suggestions for improvement= s! +

    + + + + +

    C language issues

    + +

    Default to -fno-common

    + +

    + A common mistake in C is omitting extern when declaring a g= lobal + variable in a header file. If the header is included by several files it + results in multiple definitions of the same variable. In previous GCC + versions this error is ignored. GCC 10 defaults to -fno-common, + which means a linker error will now be reported. + To fix this, use extern in header files when declaring glob= al + variables, and ensure each global is defined in exactly one C file. + As a workaround, legacy C code can be compiled with -fcommon. +

    +
    
    +      int x;  // tentative definition - avoid in header files
    +
    +      extern int y;  // correct declaration in a header file
    +  
    + + + + +=20 + + + +