From patchwork Tue Aug 22 10:01:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Darbyshire-Bryant X-Patchwork-Id: 804368 X-Patchwork-Delegate: hauke@hauke-m.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133; helo=bombadil.infradead.org; envelope-from=lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="WiYm4EIa"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.b="ATIKJuGT"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=darbyshire-bryant.me.uk header.i=@darbyshire-bryant.me.uk header.b="xVEuOzU8"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xc5zl6zRzz9s78 for ; Tue, 22 Aug 2017 20:15:47 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:Message-Id:Date:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=R57NuRBErvHnGSD0s0P2AuOC5DSKBD3IVMeJeuoU7+k=; b=WiYm4EIaKJV1Ue WaAW/8eRWkzW87vddyJjrstwU5ZZxdDr8qTMhm82O05flo1qdqlkZVuQbmgamVHNNOkx7DX79ryzj q1L/i1c3sHtd+chDkIyJmexZBAbQc74s35o47pvt4i5ztpozV1oNS+lNiDm0NLOmDG48BrVDNp69i qliaxrZ4JwRbp3JzVQJDhlZRJ1kBPs8dt6/gCed0nlvYaEXR4o2XmFkuaNYHWL5gd6lsNyNIft+Ei IsB58oYKdCESuieMCTj9w7JZZk2IhiOtuxkh3lBli2QEgo4fyKaIlPBYaJvh+dlkVhSRam+nifAcq Pry1C1mDvHxbOtKcC/cw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dk6Dg-0004Yv-VW; Tue, 22 Aug 2017 10:15:37 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dk6D9-0002yD-Ag for lede-dev@bombadil.infradead.org; Tue, 22 Aug 2017 10:15:04 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Type:MIME-Version:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=h17rGcpbRoD/NZY/TnmNyg2LoAb2/i3ruF8DFhj04jM=; b=ATIKJuGTTvSmke8vbJT7nvTuZl ZB/eJQWYEoKRtYzvtbCBeDoFYFMft0D2e6GES5IUUnexCTqM/sNavjh0U3eY/U0OlJhlmwfyHl06f Rz3bq9DjTOoG8tkl5sjDvgMzetakEgBXqX1QmsyjOQOydfKMcOwUyxLRZwbP/3tRpYp3qBb80mslS RXRWo+tFyWc8+WWyp7jLdsrieChj468FvFTIn4USBp+4jp2tpfYOjCrdScBv4J34dTQqL4S4XCAYP bRFUXm+2+W00UvccdshPuls2LQCy7afKkDsAkClHFM7UV2NCnYNLbRvjjQBvCpNcCpzJIFKj/waYK +u+Ts6pg==; Received: from mail-eopbgr20055.outbound.protection.outlook.com ([40.107.2.55] helo=EUR02-VE1-obe.outbound.protection.outlook.com) by casper.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dk60F-00021z-NX for lede-dev@lists.infradead.org; Tue, 22 Aug 2017 10:01:50 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=darbyshire-bryant.me.uk; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=h17rGcpbRoD/NZY/TnmNyg2LoAb2/i3ruF8DFhj04jM=; b=xVEuOzU8UfPZBmissaTBdm9z1vQ+/ZlQCNMyZQUnIPwvRRQtjCouakXtRxk4+RyidQRURY7m8cA9k47NFl+ImJ9g0YSEYH7eX2TrCG+JztKM3fM1Un+HsJxcbIzwheKcEN2TuNKMrZKYeb9TkC0ImWw48x1gQoRhq3bgsRwgoGw= Received: from Animal.darbyshire-bryant.me.uk (2a02:c7f:1220:bf20::fb0e) by HE1PR07MB1036.eurprd07.prod.outlook.com (2a01:111:e400:581b::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1385.4; Tue, 22 Aug 2017 10:01:17 +0000 From: Kevin Darbyshire-Bryant To: lede-dev@lists.infradead.org Date: Tue, 22 Aug 2017 11:01:07 +0100 Message-Id: <1503396068-26205-1-git-send-email-kevin@darbyshire-bryant.me.uk> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [2a02:c7f:1220:bf20::fb0e] X-ClientProxiedBy: DB6P189CA0033.EURP189.PROD.OUTLOOK.COM (2603:10a6:6:2e::46) To HE1PR07MB1036.eurprd07.prod.outlook.com (2a01:111:e400:581b::28) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 73ff21db-ec12-4942-330d-08d4e944bbb4 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(300000502095)(300135100095)(22001)(2017030254152)(2017082002075)(300000503095)(300135400095)(201703131423075)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:HE1PR07MB1036; X-Microsoft-Exchange-Diagnostics: 1; HE1PR07MB1036; 3:EIrMXbz8V+/MKprcLl07xQjbo3w01MW5mV0EOBSrWRj6Hl1ZUobqqGLdY7+ZdmVZLeXo00njSa0nw7Y4n8263NXy7XyVqwc1z0lwtISHS83SLkyalrs1AvRdeI2cBE+rys6/+UC7DAN/CjDypT2Lm/OgazVktebIPlmFgBLjoR8hah9dC21Xw+TChsMbGShp0OuLv4SEPeugT9RN5E8CE5PGpTyoCORdV2JijLoJKzr1p4GGN06gaxupVtDATPbr; 25:uFOAQzu2C7XGBjJG0IBqLTlW/NTfcuySoJbVE5/vlRLrjGuwFVuibjyfQd2W0R2RSEpHn2QfS8OHJ/MU3AlLztl1UgcsLBIotZNMuxHUoo20860srwa9nYvO59PF34awAdiSeOpzc74y+XsjyixODx0LeODLEce8GcVlOMWSB1h+sTwwfP/kunL2d5Qwnsl50sx7+lq41K5QmQluymWFomMGvZUANzwRl2jSsZFzPTcVPNENGCIfXAShz/BdDj5I8d3TSqBJix5eYd+LZqqI+oREzu/K2b2a2s9NEnrYrNRnxlB7vk5EfiVaN66NliylkNlc0qtJmP3uxqoeQpxqjg==; 31:wrzxCZrQU57cD3b9UJYYi1yUT0lh+XM1vKw56UiKGqMbL2u/n2/XvU2NOdzp1LWf8epBZTo/Itey7f2UcpGsvjSUjuGu6kOYST/SeM+Y5ugVp2GQh0T1/kMzSW7XNQzadp2yhz1njy4g+S6TrJu99Lkk1NLpfYcHhzsYYjlObHvfaFwxJnUsIH0ASBRJaDfLJFaeyBazbC3VC0G6irfEUEoNABohN0nDA78cjjfhGak= X-MS-TrafficTypeDiagnostic: HE1PR07MB1036: X-Exchange-Antispam-Report-Test: UriScan:(250305191791016)(22074186197030)(183786458502308); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(3002001)(93006095)(93001095)(100000703101)(100105400095)(10201501046)(6041248)(20161123558100)(20161123560025)(201703131423075)(201703061421075)(2016111802025)(20161123555025)(20161123564025)(20161123562025)(6043046)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:HE1PR07MB1036; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:HE1PR07MB1036; X-Microsoft-Exchange-Diagnostics: 1; HE1PR07MB1036; 4:CpVZvMa8tvSEckOGSMHePfWURBLsNwp4daxJ883n3FrvW4QY5puKII8xkSUpUsrqJU1rCOwJw6qYCSeQdUKiPVti2Wvc8ETekIvGcG8qz1xtORmjxkTjB57Ppmh8fnxwx/oSWuvIyRWY8M1dOE+8muS6vJsZ+oSltRGIXo1u1rC0263Wy87cCEiyW8tYR3obzga2yUzY/b1J95mQOdLDyfIdZ89k99wGyVZxfF4LjCr4JPdV07HqEm0vUc3uOQ8d4nmjdcRru6OzZCj52858ea5pyMJpFAqZzOKUgXdx2y8yuaMoImEdIdt216IPcMZgoSEieFJZm/bPIky4JCqMZSVVRjTaj/U5FnYnAHJw2SRomGQX7SNinXVCb3iGWMb+ X-Forefront-PRVS: 04073E895A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(7370300001)(6009001)(377424004)(24454002)(288314003)(377454003)(189002)(199003)(10710500007)(15650500001)(53946003)(2420400007)(7350300001)(575784001)(6916009)(107886003)(110136004)(53936002)(86362001)(6666003)(42882006)(74482002)(6306002)(16200700003)(36756003)(53546010)(6116002)(5003940100001)(68736007)(966005)(5890100001)(97736004)(69596002)(106356001)(2361001)(53416004)(50986999)(508600001)(105586002)(8676002)(7736002)(42186005)(5660300001)(81156014)(50466002)(189998001)(81166006)(4326008)(50226002)(6486002)(47776003)(7110500001)(2906002)(48376002)(25786009)(305945005)(101416001)(16799955002)(33646002)(2351001)(46800400004)(579004)(569006); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR07MB1036; H:Animal.darbyshire-bryant.me.uk; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: darbyshire-bryant.me.uk does not designate permitted sender hosts) Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=kevin@darbyshire-bryant.me.uk; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR07MB1036; 23:RcwbOVV3/7yXaXesfzhJdIVj38ReleZAl9HVES/He?= =?us-ascii?Q?z+ciRGU6RJtRckwFLp5p7TOzVI0AgllBzDlwbp+6w906Neqzdhq4mko77sLi?= =?us-ascii?Q?81xlVkz8ABkGuqqPZnRA5Wyej99uRq2D/3EfDFKtAuk0dAg25PhJBsEETxDM?= =?us-ascii?Q?VhQh4Fx8NozqinfkGnSCnrQEu8+sp0vWCd9urRCJ/1l7P7Bv2ub+0kgIH94K?= =?us-ascii?Q?ilH4AY8cZeB3Ekfm7gBI6oZyPs2O0jcxs80/q49QQ5Me4EAVorRuycyV4eF8?= =?us-ascii?Q?EawtIWNYD4qCyQ+6HzydYf8rxDJqjpSjDf/xm+3bVkKx25jZrOfwkIH1US1H?= =?us-ascii?Q?FdOojuSQkdtO++sv0kZuPaia3Y6UwHszacZgk1/kfgBKlG9Y3LX73Zt6Lvod?= =?us-ascii?Q?peT/zgT/yBGz9em+WzQhzuLtSXfH7/tAjwZwC1lzumZLkjuUKY8g8qGDDevF?= =?us-ascii?Q?B/wvFIrBrVOen1HcE9llKwKGIcftPT72WeiiW4OFngwCffXU8U2cvXkbz4j+?= =?us-ascii?Q?AtNiY/Ckp5HBx8QGasxb4xiIZM+gQyQdENWQkRRKcGAjoQIBmmKJLWJS73YZ?= =?us-ascii?Q?8kg7Pz56V99K8o47g+2B7sCDuaaV6A0jYvZ6JFyzRWxDXrUtBeZjR5CoUeQS?= =?us-ascii?Q?kBHtUkv1fpoHCUo+Z0Hf2BPtybQAqtZqUdUsHLJo3uxuymT8oGt6PbnJmhLq?= =?us-ascii?Q?qnUkoP9B+6gHMYC/WB0IpMziMBUdCbxnAnG/nT55c9EwbtPDy3GUJVONKN92?= =?us-ascii?Q?IyroJ/Y7zQk6TOTeFElc3Zwlwaof4FO7z4/nIDyoIpu2QRcnJSKxxrZRVTpd?= =?us-ascii?Q?wH1ygQLZEeBRtWY/sR5QBwnSqogNWqFlYWOqUuJ8nDUUHiUj9U+/UjZQg2Ok?= =?us-ascii?Q?MTerAwD+DvewnIodhjUT6CJ2Bdg9xG0Vs+E4q6NdS8sBsBj6eTz1UFq4UZjP?= =?us-ascii?Q?jSczbm1xHPCojgd0lnfUiRQ7tEBRoHSLCCKM1BiTHhXZav+1NmrfBbSuDwox?= =?us-ascii?Q?aNz1LxxMSpT6087QHjQg9TzrvDr2dqS5uuwzx2+Vio25Bypu6SZChtFx9YuI?= =?us-ascii?Q?0jZ4nhTMarm9P3iY87kLGnfOX5rFtxIHBqOmMqdd7C7xLvQvICRe799a/p2l?= =?us-ascii?Q?StnKAjBbxRg/JmSi+46f9ablFiYZ5L4aziUg+hFIIkDOISHH3sAmTK5ggGYy?= =?us-ascii?Q?8SdwZI8GWcyLOx1gG7vSHKu+cQzCDFjDVKmtGqpnteWNuh97n0W1rDHsHJJo?= =?us-ascii?Q?+HXrECuOBugK2dejUqOcdoGVHJlbfAIa7jizp95rZZUzvNGDW9E4YFe26e0/?= =?us-ascii?Q?S1vGihnN93bY0vpPEsJCZJ7VmmGT2qnsIFxN0JoohCbGQY6GuVK35+jlTOOW?= =?us-ascii?Q?nS6tgC4Hp1VyjgfhYXpBwisWAZ85HDPwDfijOgvwCOXvT7LUUZ29Ic/RdMqy?= =?us-ascii?Q?fY3yZ+zwiyRoMK+04um2nzL6qPK17v8D/qKb+/UaeRyK6pGquRX2E8AuGeze?= =?us-ascii?Q?Iemi0rjm9DEQubCGXYyrccYsdjBQ8V/Hd76LLzwvswcq9Rspj8LJygjRZY+f?= =?us-ascii?Q?Nf/7gpWg6XLQe6pag=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; HE1PR07MB1036; 6:vF80ciExjknQnjBjOSNaxpQ3uAHS/miBPacBM4wQqirf55YhdOlaZOtFTK00C8w6JGqRj6N+wD32Y2jsMBntVye4SV7upJGw68ZGwGKpYqLWvnHAtnACDpu2WCCKo5xKUbm072gBX5NWIPqMbgCooJan1sAzmHLq+I9BPzHeNaGBeeKrF0u/gPmGNWH15K5UBeyv4cahbfmIHp6vhJ88bnZZgL9OBeTa3d3mLWsfCcTDo55noOEjjA3nY3dCCYUSLKchrJOwFC6ubJ+jXpHKtvTbBqW1SqNpZgQYQdYVTyf5N0zNiZzBET2gtH/LzLN2VVA66gjBgIgKwpxJhSRz+Q==; 5:SWCOj0KQYqyEbZ6ASHc8TYvZEFBVx9GDynIJp3ulZk2qsRLJvqL9qTqHj1ENvEVpjed/LlIFLjKjXIwHe7oiJoxamsCOUrhLK4Tf6A+81FzEplzt8EM5gZUf9MgKtamypdZsTtppS0VNZbDiyp7ung==; 24:QHiPY4kRwQ3W6qGX+Um9mXXwdMouVb9hlgP/d9frp+FvIVQ9+yZOXOKBNujqnNJeJdZClpHvz51x2QVlCoMGYTziav8taukjClxL3W++J78=; 7:Ws+ofF7a/L2EoI2HYGkx10qoF3SfpGzMqGSkORshPxr6oQqhjryYNjoUl/siDJEntRLb+tmJW+ZlIUkAVJ/x0cci9XRj5dkQtrmqbmx6H/v9lSlCvOfdN3QaCHHO6qGNXT2tD/fM/HByz2L/l52tOo4xG4pVg72dHfLN2bb459oMGvg+Oi7KjKaXUDKujccC5Izm7gJemAV6tgvM2sXR154Vad/8xZ3rK23IeuK3b2I= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: darbyshire-bryant.me.uk X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Aug 2017 10:01:17.9466 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR07MB1036 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170822_110144_172292_8475D8FB X-CRM114-Status: GOOD ( 13.36 ) X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.4.1 on casper.infradead.org summary: Content analysis details: (-2.0 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [40.107.2.55 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [40.107.2.55 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders Subject: [LEDE-DEV] [PATCH 1/2] toolchain: gcc: update 7.x to 7.2.0 X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Darbyshire-Bryant Sender: "Lede-dev" Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Bump gcc from 7.1 to 7.2 Compile & run tested: ar71xx Trace history of current patches and update with commit ref & comment to give more clue as to why they're still around/needed. Some have changed form since the original commit but some clue is better than no clue at all. Signed-off-by: Kevin Darbyshire-Bryant Tested-by: Koen Vandeputte --- toolchain/gcc/Config.version | 2 +- toolchain/gcc/common.mk | 5 +- .../7.1.0/001-revert_register_mode_search.patch | 65 -------- .../gcc/patches/7.1.0/002-case_insensitive.patch | 14 -- .../gcc/patches/7.1.0/010-documentation.patch | 23 --- toolchain/gcc/patches/7.1.0/230-musl_libssp.patch | 13 -- .../7.1.0/300-mips_Os_cpu_rtx_cost_model.patch | 11 -- .../patches/7.1.0/800-arm_v5te_no_ldrd_strd.patch | 11 -- .../patches/7.1.0/810-arm-softfloat-libgcc.patch | 25 --- toolchain/gcc/patches/7.1.0/820-libgcc_pic.patch | 36 ---- .../7.1.0/840-armv4_pass_fix-v4bx_to_ld.patch | 19 --- .../gcc/patches/7.1.0/850-use_shared_libgcc.patch | 47 ------ .../gcc/patches/7.1.0/851-libgcc_no_compat.patch | 12 -- .../gcc/patches/7.1.0/870-ppc_no_crtsavres.patch | 11 -- .../gcc/patches/7.1.0/881-no_tm_section.patch | 11 -- .../gcc/patches/7.1.0/900-bad-mips16-crt.patch | 9 - toolchain/gcc/patches/7.1.0/910-mbsd_multi.patch | 140 ---------------- .../patches/7.1.0/920-specs_nonfatal_getenv.patch | 15 -- .../patches/7.1.0/930-fix-mips-noexecstack.patch | 111 ------------- .../patches/7.1.0/940-no-clobber-stamp-bits.patch | 11 -- .../7.1.0/950-cpp_file_path_translation.patch | 171 ------------------- .../7.2.0/001-revert_register_mode_search.patch | 77 +++++++++ .../gcc/patches/7.2.0/002-case_insensitive.patch | 24 +++ .../gcc/patches/7.2.0/010-documentation.patch | 35 ++++ toolchain/gcc/patches/7.2.0/230-musl_libssp.patch | 28 ++++ .../7.2.0/300-mips_Os_cpu_rtx_cost_model.patch | 21 +++ .../patches/7.2.0/800-arm_v5te_no_ldrd_strd.patch | 32 ++++ .../patches/7.2.0/810-arm-softfloat-libgcc.patch | 33 ++++ toolchain/gcc/patches/7.2.0/820-libgcc_pic.patch | 44 +++++ .../7.2.0/840-armv4_pass_fix-v4bx_to_ld.patch | 28 ++++ .../gcc/patches/7.2.0/850-use_shared_libgcc.patch | 54 ++++++ .../gcc/patches/7.2.0/851-libgcc_no_compat.patch | 22 +++ .../gcc/patches/7.2.0/870-ppc_no_crtsavres.patch | 18 ++ .../gcc/patches/7.2.0/881-no_tm_section.patch | 22 +++ .../gcc/patches/7.2.0/900-bad-mips16-crt.patch | 30 ++++ toolchain/gcc/patches/7.2.0/910-mbsd_multi.patch | 146 +++++++++++++++++ .../patches/7.2.0/920-specs_nonfatal_getenv.patch | 22 +++ .../patches/7.2.0/930-fix-mips-noexecstack.patch | 111 +++++++++++++ .../patches/7.2.0/940-no-clobber-stamp-bits.patch | 33 ++++ .../7.2.0/950-cpp_file_path_translation.patch | 181 +++++++++++++++++++++ 40 files changed, 965 insertions(+), 758 deletions(-) delete mode 100644 toolchain/gcc/patches/7.1.0/001-revert_register_mode_search.patch delete mode 100644 toolchain/gcc/patches/7.1.0/002-case_insensitive.patch delete mode 100644 toolchain/gcc/patches/7.1.0/010-documentation.patch delete mode 100644 toolchain/gcc/patches/7.1.0/230-musl_libssp.patch delete mode 100644 toolchain/gcc/patches/7.1.0/300-mips_Os_cpu_rtx_cost_model.patch delete mode 100644 toolchain/gcc/patches/7.1.0/800-arm_v5te_no_ldrd_strd.patch delete mode 100644 toolchain/gcc/patches/7.1.0/810-arm-softfloat-libgcc.patch delete mode 100644 toolchain/gcc/patches/7.1.0/820-libgcc_pic.patch delete mode 100644 toolchain/gcc/patches/7.1.0/840-armv4_pass_fix-v4bx_to_ld.patch delete mode 100644 toolchain/gcc/patches/7.1.0/850-use_shared_libgcc.patch delete mode 100644 toolchain/gcc/patches/7.1.0/851-libgcc_no_compat.patch delete mode 100644 toolchain/gcc/patches/7.1.0/870-ppc_no_crtsavres.patch delete mode 100644 toolchain/gcc/patches/7.1.0/881-no_tm_section.patch delete mode 100644 toolchain/gcc/patches/7.1.0/900-bad-mips16-crt.patch delete mode 100644 toolchain/gcc/patches/7.1.0/910-mbsd_multi.patch delete mode 100644 toolchain/gcc/patches/7.1.0/920-specs_nonfatal_getenv.patch delete mode 100644 toolchain/gcc/patches/7.1.0/930-fix-mips-noexecstack.patch delete mode 100644 toolchain/gcc/patches/7.1.0/940-no-clobber-stamp-bits.patch delete mode 100644 toolchain/gcc/patches/7.1.0/950-cpp_file_path_translation.patch create mode 100644 toolchain/gcc/patches/7.2.0/001-revert_register_mode_search.patch create mode 100644 toolchain/gcc/patches/7.2.0/002-case_insensitive.patch create mode 100644 toolchain/gcc/patches/7.2.0/010-documentation.patch create mode 100644 toolchain/gcc/patches/7.2.0/230-musl_libssp.patch create mode 100644 toolchain/gcc/patches/7.2.0/300-mips_Os_cpu_rtx_cost_model.patch create mode 100644 toolchain/gcc/patches/7.2.0/800-arm_v5te_no_ldrd_strd.patch create mode 100644 toolchain/gcc/patches/7.2.0/810-arm-softfloat-libgcc.patch create mode 100644 toolchain/gcc/patches/7.2.0/820-libgcc_pic.patch create mode 100644 toolchain/gcc/patches/7.2.0/840-armv4_pass_fix-v4bx_to_ld.patch create mode 100644 toolchain/gcc/patches/7.2.0/850-use_shared_libgcc.patch create mode 100644 toolchain/gcc/patches/7.2.0/851-libgcc_no_compat.patch create mode 100644 toolchain/gcc/patches/7.2.0/870-ppc_no_crtsavres.patch create mode 100644 toolchain/gcc/patches/7.2.0/881-no_tm_section.patch create mode 100644 toolchain/gcc/patches/7.2.0/900-bad-mips16-crt.patch create mode 100644 toolchain/gcc/patches/7.2.0/910-mbsd_multi.patch create mode 100644 toolchain/gcc/patches/7.2.0/920-specs_nonfatal_getenv.patch create mode 100644 toolchain/gcc/patches/7.2.0/930-fix-mips-noexecstack.patch create mode 100644 toolchain/gcc/patches/7.2.0/940-no-clobber-stamp-bits.patch create mode 100644 toolchain/gcc/patches/7.2.0/950-cpp_file_path_translation.patch diff --git a/toolchain/gcc/Config.version b/toolchain/gcc/Config.version index 86c723d..0432188 100644 --- a/toolchain/gcc/Config.version +++ b/toolchain/gcc/Config.version @@ -6,7 +6,7 @@ config GCC_VERSION string default "arc-2017.03-release" if GCC_VERSION_6_3_ARC default "6.3.0" if GCC_USE_VERSION_6 - default "7.1.0" if GCC_USE_VERSION_7 + default "7.2.0" if GCC_USE_VERSION_7 default "5.4.0" config GCC_VERSION_6_3 diff --git a/toolchain/gcc/common.mk b/toolchain/gcc/common.mk index ec4d9fc..f1203b0 100644 --- a/toolchain/gcc/common.mk +++ b/toolchain/gcc/common.mk @@ -36,8 +36,9 @@ ifeq ($(PKG_VERSION),6.3.0) PKG_HASH:=f06ae7f3f790fbf0f018f6d40e844451e6bc3b7bc96e128e63b09825c1f8b29f endif -ifeq ($(PKG_VERSION),7.1.0) - PKG_HASH:=8a8136c235f64c6fef69cac0d73a46a1a09bb250776a050aec8f9fc880bebc17 +ifeq ($(PKG_VERSION),7.2.0) + PKG_HASH:=1cf7adf8ff4b5aa49041c8734bbcf1ad18cc4c94d0029aae0f4e48841088479a + PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz endif ifneq ($(CONFIG_GCC_VERSION_6_3_ARC),) diff --git a/toolchain/gcc/patches/7.1.0/001-revert_register_mode_search.patch b/toolchain/gcc/patches/7.1.0/001-revert_register_mode_search.patch deleted file mode 100644 index adcc7c3..0000000 --- a/toolchain/gcc/patches/7.1.0/001-revert_register_mode_search.patch +++ /dev/null @@ -1,65 +0,0 @@ -Revert of: - -commit 275035b56823b26d5fb7e90fad945b998648edf2 -Author: bergner -Date: Thu Sep 5 14:09:07 2013 +0000 - - PR target/58139 - * reginfo.c (choose_hard_reg_mode): Scan through all mode classes - looking for widest mode. - - - git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202286 138bc75d-0d04-0410-961f-82ee72b054a4 - - ---- a/gcc/reginfo.c -+++ b/gcc/reginfo.c -@@ -637,35 +637,40 @@ choose_hard_reg_mode (unsigned int regno - mode = GET_MODE_WIDER_MODE (mode)) - if ((unsigned) hard_regno_nregs[regno][mode] == nregs - && HARD_REGNO_MODE_OK (regno, mode) -- && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)) -- && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode)) -+ && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))) - found_mode = mode; - -+ if (found_mode != VOIDmode) -+ return found_mode; -+ - for (mode = GET_CLASS_NARROWEST_MODE (MODE_FLOAT); - mode != VOIDmode; - mode = GET_MODE_WIDER_MODE (mode)) - if ((unsigned) hard_regno_nregs[regno][mode] == nregs - && HARD_REGNO_MODE_OK (regno, mode) -- && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)) -- && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode)) -+ && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))) - found_mode = mode; - -+ if (found_mode != VOIDmode) -+ return found_mode; -+ - for (mode = GET_CLASS_NARROWEST_MODE (MODE_VECTOR_FLOAT); - mode != VOIDmode; - mode = GET_MODE_WIDER_MODE (mode)) - if ((unsigned) hard_regno_nregs[regno][mode] == nregs - && HARD_REGNO_MODE_OK (regno, mode) -- && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)) -- && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode)) -+ && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))) - found_mode = mode; - -+ if (found_mode != VOIDmode) -+ return found_mode; -+ - for (mode = GET_CLASS_NARROWEST_MODE (MODE_VECTOR_INT); - mode != VOIDmode; - mode = GET_MODE_WIDER_MODE (mode)) - if ((unsigned) hard_regno_nregs[regno][mode] == nregs - && HARD_REGNO_MODE_OK (regno, mode) -- && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)) -- && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode)) -+ && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))) - found_mode = mode; - - if (found_mode != VOIDmode) diff --git a/toolchain/gcc/patches/7.1.0/002-case_insensitive.patch b/toolchain/gcc/patches/7.1.0/002-case_insensitive.patch deleted file mode 100644 index b3d2dbe..0000000 --- a/toolchain/gcc/patches/7.1.0/002-case_insensitive.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/include/filenames.h -+++ b/include/filenames.h -@@ -43,11 +43,6 @@ extern "C" { - # define IS_DIR_SEPARATOR(c) IS_DOS_DIR_SEPARATOR (c) - # define IS_ABSOLUTE_PATH(f) IS_DOS_ABSOLUTE_PATH (f) - #else /* not DOSish */ --# if defined(__APPLE__) --# ifndef HAVE_CASE_INSENSITIVE_FILE_SYSTEM --# define HAVE_CASE_INSENSITIVE_FILE_SYSTEM 1 --# endif --# endif /* __APPLE__ */ - # define HAS_DRIVE_SPEC(f) (0) - # define IS_DIR_SEPARATOR(c) IS_UNIX_DIR_SEPARATOR (c) - # define IS_ABSOLUTE_PATH(f) IS_UNIX_ABSOLUTE_PATH (f) diff --git a/toolchain/gcc/patches/7.1.0/010-documentation.patch b/toolchain/gcc/patches/7.1.0/010-documentation.patch deleted file mode 100644 index 46fe81f..0000000 --- a/toolchain/gcc/patches/7.1.0/010-documentation.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- a/gcc/Makefile.in -+++ b/gcc/Makefile.in -@@ -3120,18 +3120,10 @@ doc/gcc.info: $(TEXI_GCC_FILES) - doc/gccint.info: $(TEXI_GCCINT_FILES) - doc/cppinternals.info: $(TEXI_CPPINT_FILES) - --doc/%.info: %.texi -- if [ x$(BUILD_INFO) = xinfo ]; then \ -- $(MAKEINFO) $(MAKEINFOFLAGS) -I . -I $(gcc_docdir) \ -- -I $(gcc_docdir)/include -o $@ $<; \ -- fi -+doc/%.info: - - # Duplicate entry to handle renaming of gccinstall.info --doc/gccinstall.info: $(TEXI_GCCINSTALL_FILES) -- if [ x$(BUILD_INFO) = xinfo ]; then \ -- $(MAKEINFO) $(MAKEINFOFLAGS) -I $(gcc_docdir) \ -- -I $(gcc_docdir)/include -o $@ $<; \ -- fi -+doc/gccinstall.info: - - doc/cpp.dvi: $(TEXI_CPP_FILES) - doc/gcc.dvi: $(TEXI_GCC_FILES) diff --git a/toolchain/gcc/patches/7.1.0/230-musl_libssp.patch b/toolchain/gcc/patches/7.1.0/230-musl_libssp.patch deleted file mode 100644 index 65b5710..0000000 --- a/toolchain/gcc/patches/7.1.0/230-musl_libssp.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/gcc/gcc.c -+++ b/gcc/gcc.c -@@ -861,7 +861,9 @@ proper position among the other output f - #endif - - #ifndef LINK_SSP_SPEC --#ifdef TARGET_LIBC_PROVIDES_SSP -+#if DEFAULT_LIBC == LIBC_MUSL -+#define LINK_SSP_SPEC "-lssp_nonshared" -+#elif defined(TARGET_LIBC_PROVIDES_SSP) - #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ - "|fstack-protector-strong|fstack-protector-explicit:}" - #else diff --git a/toolchain/gcc/patches/7.1.0/300-mips_Os_cpu_rtx_cost_model.patch b/toolchain/gcc/patches/7.1.0/300-mips_Os_cpu_rtx_cost_model.patch deleted file mode 100644 index 21cff87..0000000 --- a/toolchain/gcc/patches/7.1.0/300-mips_Os_cpu_rtx_cost_model.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/gcc/config/mips/mips.c -+++ b/gcc/config/mips/mips.c -@@ -19784,7 +19784,7 @@ mips_option_override (void) - flag_pcc_struct_return = 0; - - /* Decide which rtx_costs structure to use. */ -- if (optimize_size) -+ if (0 && optimize_size) - mips_cost = &mips_rtx_cost_optimize_size; - else - mips_cost = &mips_rtx_cost_data[mips_tune]; diff --git a/toolchain/gcc/patches/7.1.0/800-arm_v5te_no_ldrd_strd.patch b/toolchain/gcc/patches/7.1.0/800-arm_v5te_no_ldrd_strd.patch deleted file mode 100644 index 435f571..0000000 --- a/toolchain/gcc/patches/7.1.0/800-arm_v5te_no_ldrd_strd.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/gcc/config/arm/arm.h -+++ b/gcc/config/arm/arm.h -@@ -150,7 +150,7 @@ extern tree arm_fp16_type_node; - /* Thumb-1 only. */ - #define TARGET_THUMB1_ONLY (TARGET_THUMB1 && !arm_arch_notm) - --#define TARGET_LDRD (arm_arch5e && ARM_DOUBLEWORD_ALIGN \ -+#define TARGET_LDRD (arm_arch6 && ARM_DOUBLEWORD_ALIGN \ - && !TARGET_THUMB1) - - #define TARGET_CRC32 (arm_arch_crc) diff --git a/toolchain/gcc/patches/7.1.0/810-arm-softfloat-libgcc.patch b/toolchain/gcc/patches/7.1.0/810-arm-softfloat-libgcc.patch deleted file mode 100644 index a437d81..0000000 --- a/toolchain/gcc/patches/7.1.0/810-arm-softfloat-libgcc.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- a/libgcc/config/arm/t-linux -+++ b/libgcc/config/arm/t-linux -@@ -1,6 +1,10 @@ - LIB1ASMSRC = arm/lib1funcs.S - LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx _clzsi2 _clzdi2 \ -- _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 -+ _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 \ -+ _arm_negdf2 _arm_muldivdf3 _arm_cmpdf2 _arm_unorddf2 \ -+ _arm_fixdfsi _arm_fixunsdfsi _arm_truncdfsf2 \ -+ _arm_negsf2 _arm_muldivsf3 _arm_cmpsf2 _arm_unordsf2 \ -+ _arm_fixsfsi _arm_fixunssfsi - - # Just for these, we omit the frame pointer since it makes such a big - # difference. ---- a/gcc/config/arm/linux-elf.h -+++ b/gcc/config/arm/linux-elf.h -@@ -58,8 +58,6 @@ - %{shared:-lc} \ - %{!shared:%{profile:-lc_p}%{!profile:-lc}}" - --#define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc" -- - #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" - - #define LINUX_TARGET_LINK_SPEC "%{h*} \ diff --git a/toolchain/gcc/patches/7.1.0/820-libgcc_pic.patch b/toolchain/gcc/patches/7.1.0/820-libgcc_pic.patch deleted file mode 100644 index cd539d8..0000000 --- a/toolchain/gcc/patches/7.1.0/820-libgcc_pic.patch +++ /dev/null @@ -1,36 +0,0 @@ ---- a/libgcc/Makefile.in -+++ b/libgcc/Makefile.in -@@ -920,11 +920,12 @@ $(libgcov-driver-objects): %$(objext): $ - - # Static libraries. - libgcc.a: $(libgcc-objects) -+libgcc_pic.a: $(libgcc-s-objects) - libgcov.a: $(libgcov-objects) - libunwind.a: $(libunwind-objects) - libgcc_eh.a: $(libgcc-eh-objects) - --libgcc.a libgcov.a libunwind.a libgcc_eh.a: -+libgcc.a libgcov.a libunwind.a libgcc_eh.a libgcc_pic.a: - -rm -f $@ - - objects="$(objects)"; \ -@@ -945,7 +946,7 @@ all: libunwind.a - endif - - ifeq ($(enable_shared),yes) --all: libgcc_eh.a libgcc_s$(SHLIB_EXT) -+all: libgcc_eh.a libgcc_pic.a libgcc_s$(SHLIB_EXT) - ifneq ($(LIBUNWIND),) - all: libunwind$(SHLIB_EXT) - libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_EXT) -@@ -1151,6 +1152,10 @@ install-shared: - chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_eh.a - $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_eh.a - -+ $(INSTALL_DATA) libgcc_pic.a $(mapfile) $(DESTDIR)$(inst_libdir)/ -+ chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_pic.a -+ $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_pic.a -+ - $(subst @multilib_dir@,$(MULTIDIR),$(subst \ - @shlib_base_name@,libgcc_s,$(subst \ - @shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(SHLIB_INSTALL)))) diff --git a/toolchain/gcc/patches/7.1.0/840-armv4_pass_fix-v4bx_to_ld.patch b/toolchain/gcc/patches/7.1.0/840-armv4_pass_fix-v4bx_to_ld.patch deleted file mode 100644 index 9cae1c9..0000000 --- a/toolchain/gcc/patches/7.1.0/840-armv4_pass_fix-v4bx_to_ld.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- a/gcc/config/arm/linux-eabi.h -+++ b/gcc/config/arm/linux-eabi.h -@@ -88,10 +88,15 @@ - #define MUSL_DYNAMIC_LINKER \ - "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.so.1" - -+/* For armv4 we pass --fix-v4bx to linker to support EABI */ -+#undef TARGET_FIX_V4BX_SPEC -+#define TARGET_FIX_V4BX_SPEC " %{mcpu=arm8|mcpu=arm810|mcpu=strongarm*"\ -+ "|march=armv4|mcpu=fa526|mcpu=fa626:--fix-v4bx}" -+ - /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to - use the GNU/Linux version, not the generic BPABI version. */ - #undef LINK_SPEC --#define LINK_SPEC EABI_LINK_SPEC \ -+#define LINK_SPEC EABI_LINK_SPEC TARGET_FIX_V4BX_SPEC \ - LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC, \ - LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC) - diff --git a/toolchain/gcc/patches/7.1.0/850-use_shared_libgcc.patch b/toolchain/gcc/patches/7.1.0/850-use_shared_libgcc.patch deleted file mode 100644 index 5d09d6e..0000000 --- a/toolchain/gcc/patches/7.1.0/850-use_shared_libgcc.patch +++ /dev/null @@ -1,47 +0,0 @@ ---- a/gcc/config/arm/linux-eabi.h -+++ b/gcc/config/arm/linux-eabi.h -@@ -126,10 +126,6 @@ - "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} " \ - LINUX_OR_ANDROID_LD (GNU_USER_TARGET_ENDFILE_SPEC, ANDROID_ENDFILE_SPEC) - --/* Use the default LIBGCC_SPEC, not the version in linux-elf.h, as we -- do not use -lfloat. */ --#undef LIBGCC_SPEC -- - /* Clear the instruction cache from `beg' to `end'. This is - implemented in lib1funcs.S, so ensure an error if this definition - is used. */ ---- a/gcc/config/linux.h -+++ b/gcc/config/linux.h -@@ -53,6 +53,10 @@ see the files COPYING3 and COPYING.RUNTI - builtin_assert ("system=posix"); \ - } while (0) - -+#ifndef LIBGCC_SPEC -+#define LIBGCC_SPEC "%{static|static-libgcc:-lgcc}%{!static:%{!static-libgcc:-lgcc_s}}" -+#endif -+ - /* Determine which dynamic linker to use depending on whether GLIBC or - uClibc or Bionic or musl is the default C library and whether - -muclibc or -mglibc or -mbionic or -mmusl has been passed to change ---- a/libgcc/mkmap-symver.awk -+++ b/libgcc/mkmap-symver.awk -@@ -136,5 +136,5 @@ function output(lib) { - else if (inherit[lib]) - printf("} %s;\n", inherit[lib]); - else -- printf ("\n local:\n\t*;\n};\n"); -+ printf ("\n\t*;\n};\n"); - } ---- a/gcc/config/rs6000/linux.h -+++ b/gcc/config/rs6000/linux.h -@@ -60,6 +60,9 @@ - #undef CPP_OS_DEFAULT_SPEC - #define CPP_OS_DEFAULT_SPEC "%(cpp_os_linux)" - -+#undef LIBGCC_SPEC -+#define LIBGCC_SPEC "%{!static:%{!static-libgcc:-lgcc_s}} -lgcc" -+ - #undef LINK_SHLIB_SPEC - #define LINK_SHLIB_SPEC "%{shared:-shared} %{!shared: %{static:-static}}" - diff --git a/toolchain/gcc/patches/7.1.0/851-libgcc_no_compat.patch b/toolchain/gcc/patches/7.1.0/851-libgcc_no_compat.patch deleted file mode 100644 index 80c3476..0000000 --- a/toolchain/gcc/patches/7.1.0/851-libgcc_no_compat.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/libgcc/config/t-libunwind -+++ b/libgcc/config/t-libunwind -@@ -2,8 +2,7 @@ - - HOST_LIBGCC2_CFLAGS += -DUSE_GAS_SYMVER - --LIB2ADDEH = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c \ -- $(srcdir)/unwind-compat.c $(srcdir)/unwind-dw2-fde-compat.c -+LIB2ADDEH = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c - LIB2ADDEHSTATIC = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c - - # Override the default value from t-slibgcc-elf-ver and mention -lunwind diff --git a/toolchain/gcc/patches/7.1.0/870-ppc_no_crtsavres.patch b/toolchain/gcc/patches/7.1.0/870-ppc_no_crtsavres.patch deleted file mode 100644 index 332b8b6..0000000 --- a/toolchain/gcc/patches/7.1.0/870-ppc_no_crtsavres.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/gcc/config/rs6000/rs6000.c -+++ b/gcc/config/rs6000/rs6000.c -@@ -26889,7 +26889,7 @@ rs6000_savres_strategy (rs6000_stack_t * - /* Define cutoff for using out-of-line functions to save registers. */ - if (DEFAULT_ABI == ABI_V4 || TARGET_ELF) - { -- if (!optimize_size) -+ if (1) - { - strategy |= SAVE_INLINE_FPRS | REST_INLINE_FPRS; - strategy |= SAVE_INLINE_GPRS | REST_INLINE_GPRS; diff --git a/toolchain/gcc/patches/7.1.0/881-no_tm_section.patch b/toolchain/gcc/patches/7.1.0/881-no_tm_section.patch deleted file mode 100644 index fab5db3..0000000 --- a/toolchain/gcc/patches/7.1.0/881-no_tm_section.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/libgcc/crtstuff.c -+++ b/libgcc/crtstuff.c -@@ -152,7 +152,7 @@ call_ ## FUNC (void) \ - #endif - - #if !defined(USE_TM_CLONE_REGISTRY) && defined(OBJECT_FORMAT_ELF) --# define USE_TM_CLONE_REGISTRY 1 -+# define USE_TM_CLONE_REGISTRY 0 - #endif - - /* We do not want to add the weak attribute to the declarations of these diff --git a/toolchain/gcc/patches/7.1.0/900-bad-mips16-crt.patch b/toolchain/gcc/patches/7.1.0/900-bad-mips16-crt.patch deleted file mode 100644 index dd6e9dc..0000000 --- a/toolchain/gcc/patches/7.1.0/900-bad-mips16-crt.patch +++ /dev/null @@ -1,9 +0,0 @@ ---- a/libgcc/config/mips/t-mips16 -+++ b/libgcc/config/mips/t-mips16 -@@ -43,3 +43,6 @@ SYNC_CFLAGS = -mno-mips16 - - # Version these symbols if building libgcc.so. - SHLIB_MAPFILES += $(srcdir)/config/mips/libgcc-mips16.ver -+ -+CRTSTUFF_T_CFLAGS += -mno-mips16 -+CRTSTUFF_T_CFLAGS_S += -mno-mips16 diff --git a/toolchain/gcc/patches/7.1.0/910-mbsd_multi.patch b/toolchain/gcc/patches/7.1.0/910-mbsd_multi.patch deleted file mode 100644 index 5b664ff..0000000 --- a/toolchain/gcc/patches/7.1.0/910-mbsd_multi.patch +++ /dev/null @@ -1,140 +0,0 @@ - - This patch brings over a feature from MirBSD: - * -fhonour-copts - If this option is not given, it's warned (depending - on environment variables). This is to catch errors - of misbuilt packages which override CFLAGS themselves. - - This patch was authored by Thorsten Glaser - with copyright assignment to the FSF in effect. - ---- a/gcc/c-family/c-opts.c -+++ b/gcc/c-family/c-opts.c -@@ -108,6 +108,9 @@ static int class_dump_flags; - /* Whether any standard preincluded header has been preincluded. */ - static bool done_preinclude; - -+/* Check if a port honours COPTS. */ -+static int honour_copts = 0; -+ - static void handle_OPT_d (const char *); - static void set_std_cxx98 (int); - static void set_std_cxx11 (int); -@@ -456,6 +459,12 @@ c_common_handle_option (size_t scode, co - flag_no_builtin = !value; - break; - -+ case OPT_fhonour_copts: -+ if (c_language == clk_c) { -+ honour_copts++; -+ } -+ break; -+ - case OPT_fconstant_string_class_: - constant_string_class_name = arg; - break; -@@ -1084,6 +1093,47 @@ c_common_init (void) - return false; - } - -+ if (c_language == clk_c) { -+ char *ev = getenv ("GCC_HONOUR_COPTS"); -+ int evv; -+ if (ev == NULL) -+ evv = -1; -+ else if ((*ev == '0') || (*ev == '\0')) -+ evv = 0; -+ else if (*ev == '1') -+ evv = 1; -+ else if (*ev == '2') -+ evv = 2; -+ else if (*ev == 's') -+ evv = -1; -+ else { -+ warning (0, "unknown GCC_HONOUR_COPTS value, assuming 1"); -+ evv = 1; /* maybe depend this on something like MIRBSD_NATIVE? */ -+ } -+ if (evv == 1) { -+ if (honour_copts == 0) { -+ error ("someone does not honour COPTS at all in lenient mode"); -+ return false; -+ } else if (honour_copts != 1) { -+ warning (0, "someone does not honour COPTS correctly, passed %d times", -+ honour_copts); -+ } -+ } else if (evv == 2) { -+ if (honour_copts == 0) { -+ error ("someone does not honour COPTS at all in strict mode"); -+ return false; -+ } else if (honour_copts != 1) { -+ error ("someone does not honour COPTS correctly, passed %d times", -+ honour_copts); -+ return false; -+ } -+ } else if (evv == 0) { -+ if (honour_copts != 1) -+ inform (0, "someone does not honour COPTS correctly, passed %d times", -+ honour_copts); -+ } -+ } -+ - return true; - } - ---- a/gcc/c-family/c.opt -+++ b/gcc/c-family/c.opt -@@ -1412,6 +1412,9 @@ C++ ObjC++ Optimization Alias(fexception - fhonor-std - C++ ObjC++ Ignore Warn(switch %qs is no longer supported) - -+fhonour-copts -+C ObjC C++ ObjC++ RejectNegative -+ - fhosted - C ObjC - Assume normal C execution environment. ---- a/gcc/common.opt -+++ b/gcc/common.opt -@@ -1510,6 +1510,9 @@ fguess-branch-probability - Common Report Var(flag_guess_branch_prob) Optimization - Enable guessing of branch probabilities. - -+fhonour-copts -+Common RejectNegative -+ - ; Nonzero means ignore `#ident' directives. 0 means handle them. - ; Generate position-independent code for executables if possible - ; On SVR4 targets, it also controls whether or not to emit a ---- a/gcc/opts.c -+++ b/gcc/opts.c -@@ -1921,6 +1921,9 @@ common_handle_option (struct gcc_options - opts, opts_set, loc, dc); - break; - -+ case OPT_fhonour_copts: -+ break; -+ - case OPT_Wlarger_than_: - opts->x_larger_than_size = value; - opts->x_warn_larger_than = value != -1; ---- a/gcc/doc/invoke.texi -+++ b/gcc/doc/invoke.texi -@@ -6565,6 +6565,17 @@ This option is only supported for C and - @option{-Wall} and by @option{-Wpedantic}, which can be disabled with - @option{-Wno-pointer-sign}. - -+@item -fhonour-copts -+@opindex fhonour-copts -+If @env{GCC_HONOUR_COPTS} is set to 1, abort if this option is not -+given at least once, and warn if it is given more than once. -+If @env{GCC_HONOUR_COPTS} is set to 2, abort if this option is not -+given exactly once. -+If @env{GCC_HONOUR_COPTS} is set to 0 or unset, warn if this option -+is not given exactly once. -+The warning is quelled if @env{GCC_HONOUR_COPTS} is set to @samp{s}. -+This flag and environment variable only affect the C language. -+ - @item -Wstack-protector - @opindex Wstack-protector - @opindex Wno-stack-protector - diff --git a/toolchain/gcc/patches/7.1.0/920-specs_nonfatal_getenv.patch b/toolchain/gcc/patches/7.1.0/920-specs_nonfatal_getenv.patch deleted file mode 100644 index 56dbe33..0000000 --- a/toolchain/gcc/patches/7.1.0/920-specs_nonfatal_getenv.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- a/gcc/gcc.c -+++ b/gcc/gcc.c -@@ -9277,8 +9277,10 @@ getenv_spec_function (int argc, const ch - value = varname; - - if (!value) -- fatal_error (input_location, -- "environment variable %qs not defined", varname); -+ { -+ warning (input_location, "environment variable %qs not defined", varname); -+ value = ""; -+ } - - /* We have to escape every character of the environment variable so - they are not interpreted as active spec characters. A diff --git a/toolchain/gcc/patches/7.1.0/930-fix-mips-noexecstack.patch b/toolchain/gcc/patches/7.1.0/930-fix-mips-noexecstack.patch deleted file mode 100644 index 90d10f1..0000000 --- a/toolchain/gcc/patches/7.1.0/930-fix-mips-noexecstack.patch +++ /dev/null @@ -1,111 +0,0 @@ -From da45b3fde60095756f5f6030f6012c23a3d34429 Mon Sep 17 00:00:00 2001 -From: Andrew McDonnell -Date: Fri, 3 Oct 2014 19:09:00 +0930 -Subject: Add .note.GNU-stack section - -See http://lists.busybox.net/pipermail/uclibc/2014-October/048671.html -Below copied from https://gcc.gnu.org/ml/gcc-patches/2014-09/msg02430.html - -Re: [Patch, MIPS] Add .note.GNU-stack section - - From: Steve Ellcey - -On Wed, 2014-09-10 at 10:15 -0700, Eric Christopher wrote: -> -> -> On Wed, Sep 10, 2014 at 9:27 AM, wrote: - -> This works except you did not update the assembly files in -> libgcc or glibc. We (Cavium) have the same patch in our tree -> for a few released versions. - -> Mind just checking yours in then Andrew? - -> Thanks! -> -eric - -I talked to Andrew about what files he changed in GCC and created and -tested this new patch. Andrew also mentioned changing some assembly -files in glibc but I don't see any use of '.section .note.GNU-stack' in -any assembly files in glibc (for any platform) so I wasn't planning on -creating a glibc to add them to mips glibc assembly language files. - -OK to check in this patch? - -Steve Ellcey -sellcey@mips.com - - - -2014-09-26 Steve Ellcey ---- - gcc/config/mips/mips.c | 3 +++ - libgcc/config/mips/crti.S | 4 ++++ - libgcc/config/mips/crtn.S | 3 +++ - libgcc/config/mips/mips16.S | 4 ++++ - libgcc/config/mips/vr4120-div.S | 4 ++++ - 5 files changed, 18 insertions(+) - ---- a/gcc/config/mips/mips.c -+++ b/gcc/config/mips/mips.c -@@ -22561,6 +22561,9 @@ mips_promote_function_mode (const_tree t - #undef TARGET_CUSTOM_FUNCTION_DESCRIPTORS - #define TARGET_CUSTOM_FUNCTION_DESCRIPTORS 2 - -+#undef TARGET_ASM_FILE_END -+#define TARGET_ASM_FILE_END file_end_indicate_exec_stack -+ - struct gcc_target targetm = TARGET_INITIALIZER; - - #include "gt-mips.h" ---- a/libgcc/config/mips/crti.S -+++ b/libgcc/config/mips/crti.S -@@ -21,6 +21,10 @@ a copy of the GCC Runtime Library Except - see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - . */ - -+ -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ - /* 4 slots for argument spill area. 1 for cpreturn, 1 for stack. - Return spill offset of 40 and 20. Aligned to 16 bytes for n32. */ - ---- a/libgcc/config/mips/crtn.S -+++ b/libgcc/config/mips/crtn.S -@@ -21,6 +21,9 @@ a copy of the GCC Runtime Library Except - see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - . */ - -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ - /* 4 slots for argument spill area. 1 for cpreturn, 1 for stack. - Return spill offset of 40 and 20. Aligned to 16 bytes for n32. */ - ---- a/libgcc/config/mips/mips16.S -+++ b/libgcc/config/mips/mips16.S -@@ -48,6 +48,10 @@ see the files COPYING3 and COPYING.RUNTI - values using the soft-float calling convention, but do the actual - operation using the hard floating point instructions. */ - -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ .previous -+ - #if defined _MIPS_SIM && (_MIPS_SIM == _ABIO32 || _MIPS_SIM == _ABIO64) - - /* This file contains 32-bit assembly code. */ ---- a/libgcc/config/mips/vr4120-div.S -+++ b/libgcc/config/mips/vr4120-div.S -@@ -26,6 +26,10 @@ see the files COPYING3 and COPYING.RUNTI - -mfix-vr4120. div and ddiv do not give the correct result when one - of the operands is negative. */ - -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ .previous -+ - .set nomips16 - - #define DIV \ diff --git a/toolchain/gcc/patches/7.1.0/940-no-clobber-stamp-bits.patch b/toolchain/gcc/patches/7.1.0/940-no-clobber-stamp-bits.patch deleted file mode 100644 index 9e5e599..0000000 --- a/toolchain/gcc/patches/7.1.0/940-no-clobber-stamp-bits.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/libstdc++-v3/include/Makefile.in -+++ b/libstdc++-v3/include/Makefile.in -@@ -1475,7 +1475,7 @@ stamp-bits: ${bits_headers} - @$(STAMP) stamp-bits - - stamp-bits-sup: stamp-bits ${bits_sup_headers} -- @-cd ${bits_builddir} && $(LN_S) $? . 2>/dev/null -+ @-cd ${bits_builddir} && $(LN_S) $(filter-out stamp-bits,$?) . 2>/dev/null - @$(STAMP) stamp-bits-sup - - stamp-c_base: ${c_base_headers} diff --git a/toolchain/gcc/patches/7.1.0/950-cpp_file_path_translation.patch b/toolchain/gcc/patches/7.1.0/950-cpp_file_path_translation.patch deleted file mode 100644 index ac85c1d..0000000 --- a/toolchain/gcc/patches/7.1.0/950-cpp_file_path_translation.patch +++ /dev/null @@ -1,171 +0,0 @@ -Forward ported from attachment to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47047 - ---- a/gcc/c-family/c-opts.c -+++ b/gcc/c-family/c-opts.c -@@ -588,6 +588,10 @@ c_common_handle_option (size_t scode, co - add_path (xstrdup (arg), SYSTEM, 0, true); - break; - -+ case OPT_iremap: -+ add_cpp_remap_path (arg); -+ break; -+ - case OPT_iwithprefix: - add_prefixed_path (arg, SYSTEM); - break; ---- a/gcc/c-family/c.opt -+++ b/gcc/c-family/c.opt -@@ -1825,6 +1825,10 @@ iquote - C ObjC C++ ObjC++ Joined Separate MissingArgError(missing path after %qs) - -iquote Add to the end of the quote include path. - -+iremap -+C ObjC C++ ObjC++ Joined Separate -+-iremap Convert to if it occurs as prefix in __FILE__. -+ - iwithprefix - C ObjC C++ ObjC++ Joined Separate - -iwithprefix Add to the end of the system include path. ---- a/gcc/doc/cpp.texi -+++ b/gcc/doc/cpp.texi -@@ -4272,6 +4272,7 @@ Refer to the GCC manual for full documen - @c man begin SYNOPSIS - cpp [@option{-D}@var{macro}[=@var{defn}]@dots{}] [@option{-U}@var{macro}] - [@option{-I}@var{dir}@dots{}] [@option{-iquote}@var{dir}@dots{}] -+ [@option{-iremap}@var{src}:@var{dst}] - [@option{-M}|@option{-MM}] [@option{-MG}] [@option{-MF} @var{filename}] - [@option{-MP}] [@option{-MQ} @var{target}@dots{}] - [@option{-MT} @var{target}@dots{}] ---- a/gcc/doc/cppopts.texi -+++ b/gcc/doc/cppopts.texi -@@ -220,6 +220,12 @@ extensions @samp{.i}, @samp{.ii} or @sam - extensions that GCC uses for preprocessed files created by - @option{-save-temps}. - -+@item -iremap @var{src}:@var{dst} -+@opindex iremap -+Replace the prefix @var{src} in __FILE__ with @var{dst} at expansion time. -+This option can be specified more than once. Processing stops at the first -+match. -+ - @item -fdirectives-only - @opindex fdirectives-only - When preprocessing, handle directives, but do not expand macros. ---- a/gcc/doc/invoke.texi -+++ b/gcc/doc/invoke.texi -@@ -11861,6 +11861,12 @@ by @option{-fplugin=@var{name}} instead - @option{-fplugin=@var{path}/@var{name}.so}. This option is not meant - to be used by the user, but only passed by the driver. - -+@item -iremap @var{src}:@var{dst} -+@opindex iremap -+Replace the prefix @var{src} in __FILE__ with @var{dst} at expansion time. -+This option can be specified more than once. Processing stops at the first -+match. -+ - @item -L@var{dir} - @opindex L - Add directory @var{dir} to the list of directories to be searched ---- a/libcpp/include/cpplib.h -+++ b/libcpp/include/cpplib.h -@@ -820,6 +820,9 @@ extern void cpp_set_lang (cpp_reader *, - /* Set the include paths. */ - extern void cpp_set_include_chains (cpp_reader *, cpp_dir *, cpp_dir *, int); - -+/* Provide src:dst pair for __FILE__ remapping. */ -+extern void add_cpp_remap_path (const char *); -+ - /* Call these to get pointers to the options, callback, and deps - structures for a given reader. These pointers are good until you - call cpp_finish on that reader. You can either edit the callbacks ---- a/libcpp/macro.c -+++ b/libcpp/macro.c -@@ -227,6 +227,64 @@ static const char * const monthnames[] = - "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" - }; - -+static size_t remap_pairs; -+static char **remap_src; -+static char **remap_dst; -+ -+void -+add_cpp_remap_path (const char *arg) -+{ -+ const char *arg_dst; -+ size_t len; -+ -+ arg_dst = strchr(arg, ':'); -+ if (arg_dst == NULL) -+ { -+ fprintf(stderr, "Invalid argument for -iremap\n"); -+ exit(1); -+ } -+ -+ len = arg_dst - arg; -+ ++arg_dst; -+ -+ remap_src = (char **) xrealloc(remap_src, sizeof(char *) * (remap_pairs + 1)); -+ remap_dst = (char **) xrealloc(remap_dst, sizeof(char *) * (remap_pairs + 1)); -+ -+ remap_src[remap_pairs] = (char *) xmalloc(len + 1); -+ memcpy(remap_src[remap_pairs], arg, len); -+ remap_src[remap_pairs][len] = '\0'; -+ remap_dst[remap_pairs] = xstrdup(arg_dst); -+ ++remap_pairs; -+} -+ -+static const char * -+cpp_remap_file (const char *arg, char **tmp_name) -+{ -+ char *result; -+ size_t i, len; -+ -+ for (i = 0; i < remap_pairs; ++i) -+ { -+ len = strlen (remap_src[i]); -+ if (strncmp (remap_src[i], arg, len)) -+ continue; -+ if (arg[len] == '\0') -+ return xstrdup (remap_dst[i]); -+ if (arg[len] != '/') -+ continue; -+ arg += len; -+ len = strlen (remap_dst[i]); -+ result = (char *) xmalloc (len + strlen (arg) + 1); -+ memcpy(result, remap_dst[i], len); -+ strcpy(result + len, arg); -+ *tmp_name = result; -+ -+ return result; -+ } -+ -+ return arg; -+} -+ - /* Helper function for builtin_macro. Returns the text generated by - a builtin macro. */ - const uchar * -@@ -290,6 +348,7 @@ _cpp_builtin_macro_text (cpp_reader *pfi - { - unsigned int len; - const char *name; -+ char *tmp_name = NULL; - uchar *buf; - - if (node->value.builtin == BT_FILE) -@@ -301,6 +360,7 @@ _cpp_builtin_macro_text (cpp_reader *pfi - if (!name) - abort (); - } -+ name = cpp_remap_file (name, &tmp_name); - len = strlen (name); - buf = _cpp_unaligned_alloc (pfile, len * 2 + 3); - result = buf; -@@ -308,6 +368,7 @@ _cpp_builtin_macro_text (cpp_reader *pfi - buf = cpp_quote_string (buf + 1, (const unsigned char *) name, len); - *buf++ = '"'; - *buf = '\0'; -+ free (tmp_name); - } - break; - diff --git a/toolchain/gcc/patches/7.2.0/001-revert_register_mode_search.patch b/toolchain/gcc/patches/7.2.0/001-revert_register_mode_search.patch new file mode 100644 index 0000000..63e3fee --- /dev/null +++ b/toolchain/gcc/patches/7.2.0/001-revert_register_mode_search.patch @@ -0,0 +1,77 @@ +commit 31285a20390a5e53a74a2a71d1b5c82f366ddd5a +Author: Felix Fietkau +Date: Tue May 6 11:49:05 2014 +0000 + + gcc: revert an upstream patch that is causing a regression on powerpc + + https://forum.openwrt.org/viewtopic.php?pid=232494#p232494 + + Signed-off-by: Felix Fietkau + + SVN-Revision: 40709 + +Revert of: + +commit 275035b56823b26d5fb7e90fad945b998648edf2 +Author: bergner +Date: Thu Sep 5 14:09:07 2013 +0000 + + PR target/58139 + * reginfo.c (choose_hard_reg_mode): Scan through all mode classes + looking for widest mode. + + + git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202286 138bc75d-0d04-0410-961f-82ee72b054a4 + + +--- a/gcc/reginfo.c ++++ b/gcc/reginfo.c +@@ -637,35 +637,40 @@ choose_hard_reg_mode (unsigned int regno + mode = GET_MODE_WIDER_MODE (mode)) + if ((unsigned) hard_regno_nregs[regno][mode] == nregs + && HARD_REGNO_MODE_OK (regno, mode) +- && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)) +- && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode)) ++ && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))) + found_mode = mode; + ++ if (found_mode != VOIDmode) ++ return found_mode; ++ + for (mode = GET_CLASS_NARROWEST_MODE (MODE_FLOAT); + mode != VOIDmode; + mode = GET_MODE_WIDER_MODE (mode)) + if ((unsigned) hard_regno_nregs[regno][mode] == nregs + && HARD_REGNO_MODE_OK (regno, mode) +- && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)) +- && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode)) ++ && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))) + found_mode = mode; + ++ if (found_mode != VOIDmode) ++ return found_mode; ++ + for (mode = GET_CLASS_NARROWEST_MODE (MODE_VECTOR_FLOAT); + mode != VOIDmode; + mode = GET_MODE_WIDER_MODE (mode)) + if ((unsigned) hard_regno_nregs[regno][mode] == nregs + && HARD_REGNO_MODE_OK (regno, mode) +- && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)) +- && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode)) ++ && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))) + found_mode = mode; + ++ if (found_mode != VOIDmode) ++ return found_mode; ++ + for (mode = GET_CLASS_NARROWEST_MODE (MODE_VECTOR_INT); + mode != VOIDmode; + mode = GET_MODE_WIDER_MODE (mode)) + if ((unsigned) hard_regno_nregs[regno][mode] == nregs + && HARD_REGNO_MODE_OK (regno, mode) +- && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)) +- && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode)) ++ && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))) + found_mode = mode; + + if (found_mode != VOIDmode) diff --git a/toolchain/gcc/patches/7.2.0/002-case_insensitive.patch b/toolchain/gcc/patches/7.2.0/002-case_insensitive.patch new file mode 100644 index 0000000..3442076 --- /dev/null +++ b/toolchain/gcc/patches/7.2.0/002-case_insensitive.patch @@ -0,0 +1,24 @@ +commit 81cc26c706b2bc8c8c1eb1a322e5c5157900836e +Author: Felix Fietkau +Date: Sun Oct 19 21:45:51 2014 +0000 + + gcc: do not assume that the Mac OS X filesystem is case insensitive + + Signed-off-by: Felix Fietkau + + SVN-Revision: 42973 + +--- a/include/filenames.h ++++ b/include/filenames.h +@@ -43,11 +43,6 @@ extern "C" { + # define IS_DIR_SEPARATOR(c) IS_DOS_DIR_SEPARATOR (c) + # define IS_ABSOLUTE_PATH(f) IS_DOS_ABSOLUTE_PATH (f) + #else /* not DOSish */ +-# if defined(__APPLE__) +-# ifndef HAVE_CASE_INSENSITIVE_FILE_SYSTEM +-# define HAVE_CASE_INSENSITIVE_FILE_SYSTEM 1 +-# endif +-# endif /* __APPLE__ */ + # define HAS_DRIVE_SPEC(f) (0) + # define IS_DIR_SEPARATOR(c) IS_UNIX_DIR_SEPARATOR (c) + # define IS_ABSOLUTE_PATH(f) IS_UNIX_ABSOLUTE_PATH (f) diff --git a/toolchain/gcc/patches/7.2.0/010-documentation.patch b/toolchain/gcc/patches/7.2.0/010-documentation.patch new file mode 100644 index 0000000..0106814 --- /dev/null +++ b/toolchain/gcc/patches/7.2.0/010-documentation.patch @@ -0,0 +1,35 @@ +commit 098bd91f5eae625c7d2ee621e10930fc4434e5e2 +Author: Luka Perkov +Date: Tue Feb 26 16:16:33 2013 +0000 + + gcc: don't build documentation + + This closes #13039. + + Signed-off-by: Luka Perkov + + SVN-Revision: 35807 + +--- a/gcc/Makefile.in ++++ b/gcc/Makefile.in +@@ -3121,18 +3121,10 @@ doc/gcc.info: $(TEXI_GCC_FILES) + doc/gccint.info: $(TEXI_GCCINT_FILES) + doc/cppinternals.info: $(TEXI_CPPINT_FILES) + +-doc/%.info: %.texi +- if [ x$(BUILD_INFO) = xinfo ]; then \ +- $(MAKEINFO) $(MAKEINFOFLAGS) -I . -I $(gcc_docdir) \ +- -I $(gcc_docdir)/include -o $@ $<; \ +- fi ++doc/%.info: + + # Duplicate entry to handle renaming of gccinstall.info +-doc/gccinstall.info: $(TEXI_GCCINSTALL_FILES) +- if [ x$(BUILD_INFO) = xinfo ]; then \ +- $(MAKEINFO) $(MAKEINFOFLAGS) -I $(gcc_docdir) \ +- -I $(gcc_docdir)/include -o $@ $<; \ +- fi ++doc/gccinstall.info: + + doc/cpp.dvi: $(TEXI_CPP_FILES) + doc/gcc.dvi: $(TEXI_GCC_FILES) diff --git a/toolchain/gcc/patches/7.2.0/230-musl_libssp.patch b/toolchain/gcc/patches/7.2.0/230-musl_libssp.patch new file mode 100644 index 0000000..eebee91 --- /dev/null +++ b/toolchain/gcc/patches/7.2.0/230-musl_libssp.patch @@ -0,0 +1,28 @@ +commit 1877bc9d8f2be143fbe530347a945850d0ecd234 +Author: Steven Barth +Date: Mon Jun 22 10:31:07 2015 +0000 + + gcc/musl: rework SSP-support + + Make musl provide libssp_nonshared.a and make GCC link it unconditionally + if musl is used. This should be a no-op if SSP is disabled and seems to be + the only reliable way of dealing with SSP over all packages due to the mess + that is linkerflags handling in packages. + + Signed-off-by: Steven Barth + + SVN-Revision: 46108 + +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -861,7 +861,9 @@ proper position among the other output f + #endif + + #ifndef LINK_SSP_SPEC +-#ifdef TARGET_LIBC_PROVIDES_SSP ++#if DEFAULT_LIBC == LIBC_MUSL ++#define LINK_SSP_SPEC "-lssp_nonshared" ++#elif defined(TARGET_LIBC_PROVIDES_SSP) + #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ + "|fstack-protector-strong|fstack-protector-explicit:}" + #else diff --git a/toolchain/gcc/patches/7.2.0/300-mips_Os_cpu_rtx_cost_model.patch b/toolchain/gcc/patches/7.2.0/300-mips_Os_cpu_rtx_cost_model.patch new file mode 100644 index 0000000..84c0fda --- /dev/null +++ b/toolchain/gcc/patches/7.2.0/300-mips_Os_cpu_rtx_cost_model.patch @@ -0,0 +1,21 @@ +commit ecf7671b769fe96f7b5134be442089f8bdba55d2 +Author: Felix Fietkau +Date: Thu Aug 4 20:29:45 2016 +0200 + +gcc: add a patch to generate better code with Os on mips + +Also happens to reduce compressed code size a bit + +Signed-off-by: Felix Fietkau + +--- a/gcc/config/mips/mips.c ++++ b/gcc/config/mips/mips.c +@@ -19784,7 +19784,7 @@ mips_option_override (void) + flag_pcc_struct_return = 0; + + /* Decide which rtx_costs structure to use. */ +- if (optimize_size) ++ if (0 && optimize_size) + mips_cost = &mips_rtx_cost_optimize_size; + else + mips_cost = &mips_rtx_cost_data[mips_tune]; diff --git a/toolchain/gcc/patches/7.2.0/800-arm_v5te_no_ldrd_strd.patch b/toolchain/gcc/patches/7.2.0/800-arm_v5te_no_ldrd_strd.patch new file mode 100644 index 0000000..76200a1 --- /dev/null +++ b/toolchain/gcc/patches/7.2.0/800-arm_v5te_no_ldrd_strd.patch @@ -0,0 +1,32 @@ +commit b050f87d13b5dc7ed82feb9a90f4529de58bdf25 +Author: Felix Fietkau +Date: Wed Feb 19 19:20:10 2014 +0000 + + gcc: prevent the use of LDRD/STRD on ARMv5TE + + These instructions are for 64-bit load/store. On ARMv5TE, the CPU + requires addresses to be aligned to 64-bit. When misaligned, behavior is + undefined (effectively either loads the same word twice on LDRD, or + corrupts surrounding memory on STRD). + + On ARMv6 and newer, unaligned access is safe. + + Removing these instructions for ARMv5TE is necessary, because GCC + ignores alignment information in pointers and does unsafe optimizations + that have shown up as bugs in various places. + + Signed-off-by: Felix Fietkau + + SVN-Revision: 39638 + +--- a/gcc/config/arm/arm.h ++++ b/gcc/config/arm/arm.h +@@ -150,7 +150,7 @@ extern tree arm_fp16_type_node; + /* Thumb-1 only. */ + #define TARGET_THUMB1_ONLY (TARGET_THUMB1 && !arm_arch_notm) + +-#define TARGET_LDRD (arm_arch5e && ARM_DOUBLEWORD_ALIGN \ ++#define TARGET_LDRD (arm_arch6 && ARM_DOUBLEWORD_ALIGN \ + && !TARGET_THUMB1) + + #define TARGET_CRC32 (arm_arch_crc) diff --git a/toolchain/gcc/patches/7.2.0/810-arm-softfloat-libgcc.patch b/toolchain/gcc/patches/7.2.0/810-arm-softfloat-libgcc.patch new file mode 100644 index 0000000..5c9d86a --- /dev/null +++ b/toolchain/gcc/patches/7.2.0/810-arm-softfloat-libgcc.patch @@ -0,0 +1,33 @@ +commit 8570c4be394cff7282f332f97da2ff569a927ddb +Author: Imre Kaloz +Date: Wed Feb 2 20:06:12 2011 +0000 + + fixup arm soft-float symbols + + SVN-Revision: 25325 + +--- a/libgcc/config/arm/t-linux ++++ b/libgcc/config/arm/t-linux +@@ -1,6 +1,10 @@ + LIB1ASMSRC = arm/lib1funcs.S + LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx _clzsi2 _clzdi2 \ +- _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 ++ _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 \ ++ _arm_negdf2 _arm_muldivdf3 _arm_cmpdf2 _arm_unorddf2 \ ++ _arm_fixdfsi _arm_fixunsdfsi _arm_truncdfsf2 \ ++ _arm_negsf2 _arm_muldivsf3 _arm_cmpsf2 _arm_unordsf2 \ ++ _arm_fixsfsi _arm_fixunssfsi + + # Just for these, we omit the frame pointer since it makes such a big + # difference. +--- a/gcc/config/arm/linux-elf.h ++++ b/gcc/config/arm/linux-elf.h +@@ -58,8 +58,6 @@ + %{shared:-lc} \ + %{!shared:%{profile:-lc_p}%{!profile:-lc}}" + +-#define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc" +- + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" + + #define LINUX_TARGET_LINK_SPEC "%{h*} \ diff --git a/toolchain/gcc/patches/7.2.0/820-libgcc_pic.patch b/toolchain/gcc/patches/7.2.0/820-libgcc_pic.patch new file mode 100644 index 0000000..0cc1e07 --- /dev/null +++ b/toolchain/gcc/patches/7.2.0/820-libgcc_pic.patch @@ -0,0 +1,44 @@ +commit c96312958c0621e72c9b32da5bc224ffe2161384 +Author: Felix Fietkau +Date: Mon Oct 19 23:26:09 2009 +0000 + + gcc: create a proper libgcc_pic.a static library for relinking (4.3.3+ for now, backport will follow) + + SVN-Revision: 18086 + +--- a/libgcc/Makefile.in ++++ b/libgcc/Makefile.in +@@ -920,11 +920,12 @@ $(libgcov-driver-objects): %$(objext): $ + + # Static libraries. + libgcc.a: $(libgcc-objects) ++libgcc_pic.a: $(libgcc-s-objects) + libgcov.a: $(libgcov-objects) + libunwind.a: $(libunwind-objects) + libgcc_eh.a: $(libgcc-eh-objects) + +-libgcc.a libgcov.a libunwind.a libgcc_eh.a: ++libgcc.a libgcov.a libunwind.a libgcc_eh.a libgcc_pic.a: + -rm -f $@ + + objects="$(objects)"; \ +@@ -945,7 +946,7 @@ all: libunwind.a + endif + + ifeq ($(enable_shared),yes) +-all: libgcc_eh.a libgcc_s$(SHLIB_EXT) ++all: libgcc_eh.a libgcc_pic.a libgcc_s$(SHLIB_EXT) + ifneq ($(LIBUNWIND),) + all: libunwind$(SHLIB_EXT) + libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_EXT) +@@ -1151,6 +1152,10 @@ install-shared: + chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_eh.a + $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_eh.a + ++ $(INSTALL_DATA) libgcc_pic.a $(mapfile) $(DESTDIR)$(inst_libdir)/ ++ chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_pic.a ++ $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_pic.a ++ + $(subst @multilib_dir@,$(MULTIDIR),$(subst \ + @shlib_base_name@,libgcc_s,$(subst \ + @shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(SHLIB_INSTALL)))) diff --git a/toolchain/gcc/patches/7.2.0/840-armv4_pass_fix-v4bx_to_ld.patch b/toolchain/gcc/patches/7.2.0/840-armv4_pass_fix-v4bx_to_ld.patch new file mode 100644 index 0000000..b9c9b16 --- /dev/null +++ b/toolchain/gcc/patches/7.2.0/840-armv4_pass_fix-v4bx_to_ld.patch @@ -0,0 +1,28 @@ +commit 7edc8ca5456d9743dd0075eb3cc5b04f4f24c8cc +Author: Imre Kaloz +Date: Wed Feb 2 19:34:36 2011 +0000 + + add armv4 fixup patches + + SVN-Revision: 25322 + + +--- a/gcc/config/arm/linux-eabi.h ++++ b/gcc/config/arm/linux-eabi.h +@@ -88,10 +88,15 @@ + #define MUSL_DYNAMIC_LINKER \ + "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.so.1" + ++/* For armv4 we pass --fix-v4bx to linker to support EABI */ ++#undef TARGET_FIX_V4BX_SPEC ++#define TARGET_FIX_V4BX_SPEC " %{mcpu=arm8|mcpu=arm810|mcpu=strongarm*"\ ++ "|march=armv4|mcpu=fa526|mcpu=fa626:--fix-v4bx}" ++ + /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to + use the GNU/Linux version, not the generic BPABI version. */ + #undef LINK_SPEC +-#define LINK_SPEC EABI_LINK_SPEC \ ++#define LINK_SPEC EABI_LINK_SPEC TARGET_FIX_V4BX_SPEC \ + LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC, \ + LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC) + diff --git a/toolchain/gcc/patches/7.2.0/850-use_shared_libgcc.patch b/toolchain/gcc/patches/7.2.0/850-use_shared_libgcc.patch new file mode 100644 index 0000000..1d07efe --- /dev/null +++ b/toolchain/gcc/patches/7.2.0/850-use_shared_libgcc.patch @@ -0,0 +1,54 @@ +commit dcfc40358b5a3cae7320c17f8d1cebd5ad5540cd +Author: Felix Fietkau +Date: Sun Feb 12 20:25:47 2012 +0000 + + gcc 4.6: port over the missing patch 850-use_shared_libgcc.patch to prevent libgcc crap from leaking into every single binary + + SVN-Revision: 30486 +--- a/gcc/config/arm/linux-eabi.h ++++ b/gcc/config/arm/linux-eabi.h +@@ -126,10 +126,6 @@ + "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} " \ + LINUX_OR_ANDROID_LD (GNU_USER_TARGET_ENDFILE_SPEC, ANDROID_ENDFILE_SPEC) + +-/* Use the default LIBGCC_SPEC, not the version in linux-elf.h, as we +- do not use -lfloat. */ +-#undef LIBGCC_SPEC +- + /* Clear the instruction cache from `beg' to `end'. This is + implemented in lib1funcs.S, so ensure an error if this definition + is used. */ +--- a/gcc/config/linux.h ++++ b/gcc/config/linux.h +@@ -53,6 +53,10 @@ see the files COPYING3 and COPYING.RUNTI + builtin_assert ("system=posix"); \ + } while (0) + ++#ifndef LIBGCC_SPEC ++#define LIBGCC_SPEC "%{static|static-libgcc:-lgcc}%{!static:%{!static-libgcc:-lgcc_s}}" ++#endif ++ + /* Determine which dynamic linker to use depending on whether GLIBC or + uClibc or Bionic or musl is the default C library and whether + -muclibc or -mglibc or -mbionic or -mmusl has been passed to change +--- a/libgcc/mkmap-symver.awk ++++ b/libgcc/mkmap-symver.awk +@@ -136,5 +136,5 @@ function output(lib) { + else if (inherit[lib]) + printf("} %s;\n", inherit[lib]); + else +- printf ("\n local:\n\t*;\n};\n"); ++ printf ("\n\t*;\n};\n"); + } +--- a/gcc/config/rs6000/linux.h ++++ b/gcc/config/rs6000/linux.h +@@ -60,6 +60,9 @@ + #undef CPP_OS_DEFAULT_SPEC + #define CPP_OS_DEFAULT_SPEC "%(cpp_os_linux)" + ++#undef LIBGCC_SPEC ++#define LIBGCC_SPEC "%{!static:%{!static-libgcc:-lgcc_s}} -lgcc" ++ + #undef LINK_SHLIB_SPEC + #define LINK_SHLIB_SPEC "%{shared:-shared} %{!shared: %{static:-static}}" + diff --git a/toolchain/gcc/patches/7.2.0/851-libgcc_no_compat.patch b/toolchain/gcc/patches/7.2.0/851-libgcc_no_compat.patch new file mode 100644 index 0000000..d710e40 --- /dev/null +++ b/toolchain/gcc/patches/7.2.0/851-libgcc_no_compat.patch @@ -0,0 +1,22 @@ +commit 64661de100da1ec1061ef3e5e400285dce115e6b +Author: Felix Fietkau +Date: Sun May 10 13:16:35 2015 +0000 + + gcc: add some size optimization patches + + Signed-off-by: Felix Fietkau + + SVN-Revision: 45664 + +--- a/libgcc/config/t-libunwind ++++ b/libgcc/config/t-libunwind +@@ -2,8 +2,7 @@ + + HOST_LIBGCC2_CFLAGS += -DUSE_GAS_SYMVER + +-LIB2ADDEH = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c \ +- $(srcdir)/unwind-compat.c $(srcdir)/unwind-dw2-fde-compat.c ++LIB2ADDEH = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c + LIB2ADDEHSTATIC = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c + + # Override the default value from t-slibgcc-elf-ver and mention -lunwind diff --git a/toolchain/gcc/patches/7.2.0/870-ppc_no_crtsavres.patch b/toolchain/gcc/patches/7.2.0/870-ppc_no_crtsavres.patch new file mode 100644 index 0000000..156468b --- /dev/null +++ b/toolchain/gcc/patches/7.2.0/870-ppc_no_crtsavres.patch @@ -0,0 +1,18 @@ +commit d8c570a1531035c3e26bcd94741e5f5b9c36b5d9 +Author: Felix Fietkau +Date: Mon Mar 5 00:51:01 2012 +0000 + + gcc: do not emit references to _savegpr_* and _restgpr_* on powerpc, as they are tricky to deal with wrt. libgcc. they cannot be linked dynamically + + SVN-Revision: 30814 +--- a/gcc/config/rs6000/rs6000.c ++++ b/gcc/config/rs6000/rs6000.c +@@ -26936,7 +26936,7 @@ rs6000_savres_strategy (rs6000_stack_t * + /* Define cutoff for using out-of-line functions to save registers. */ + if (DEFAULT_ABI == ABI_V4 || TARGET_ELF) + { +- if (!optimize_size) ++ if (1) + { + strategy |= SAVE_INLINE_FPRS | REST_INLINE_FPRS; + strategy |= SAVE_INLINE_GPRS | REST_INLINE_GPRS; diff --git a/toolchain/gcc/patches/7.2.0/881-no_tm_section.patch b/toolchain/gcc/patches/7.2.0/881-no_tm_section.patch new file mode 100644 index 0000000..a58dc27 --- /dev/null +++ b/toolchain/gcc/patches/7.2.0/881-no_tm_section.patch @@ -0,0 +1,22 @@ +commit 565988ab47bd9b96b50608564aee2104aeb4b7ae +Author: Felix Fietkau +Date: Tue Dec 13 14:20:49 2016 +0100 + + gcc: rip out transactional memory related bloat from crtbegin + + Slightly improves compression for each executable, saving about 4k from + the default ar71xx rootfs + + Signed-off-by: Felix Fietkau + +--- a/libgcc/crtstuff.c ++++ b/libgcc/crtstuff.c +@@ -152,7 +152,7 @@ call_ ## FUNC (void) \ + #endif + + #if !defined(USE_TM_CLONE_REGISTRY) && defined(OBJECT_FORMAT_ELF) +-# define USE_TM_CLONE_REGISTRY 1 ++# define USE_TM_CLONE_REGISTRY 0 + #endif + + /* We do not want to add the weak attribute to the declarations of these diff --git a/toolchain/gcc/patches/7.2.0/900-bad-mips16-crt.patch b/toolchain/gcc/patches/7.2.0/900-bad-mips16-crt.patch new file mode 100644 index 0000000..f5cc0a7 --- /dev/null +++ b/toolchain/gcc/patches/7.2.0/900-bad-mips16-crt.patch @@ -0,0 +1,30 @@ +commit 9dc38e48f7a6f88b7ac7bfaced91f53660204e46 +Author: Florian Fainelli +Date: Fri Apr 5 12:36:06 2013 +0000 + + toolchain/gcc: .init and .fini need to pick one ISA + + The .init and .fini sections are built by concatenating code + fragments. Putting mips16 code in the middle of a mips32 code block + doesn't work. Make gcc built the magic crt stuff in no-mips16 mode. + + This is specific to 4.6-linaro but is probably portable to other gcc + flavors. Adding this to the t-libgcc-mips16 makefile fragment is a + hack not suitable for pushing upstream, but there is no mips/t-linux + or mips/t-uclibc and I am not going to touch gcc/configure for two + lines. + + Signed-off-by: Jay Carlson + Signed-off-by: Florian Fainelli + + SVN-Revision: 36200 + +--- a/libgcc/config/mips/t-mips16 ++++ b/libgcc/config/mips/t-mips16 +@@ -43,3 +43,6 @@ SYNC_CFLAGS = -mno-mips16 + + # Version these symbols if building libgcc.so. + SHLIB_MAPFILES += $(srcdir)/config/mips/libgcc-mips16.ver ++ ++CRTSTUFF_T_CFLAGS += -mno-mips16 ++CRTSTUFF_T_CFLAGS_S += -mno-mips16 diff --git a/toolchain/gcc/patches/7.2.0/910-mbsd_multi.patch b/toolchain/gcc/patches/7.2.0/910-mbsd_multi.patch new file mode 100644 index 0000000..286cfad --- /dev/null +++ b/toolchain/gcc/patches/7.2.0/910-mbsd_multi.patch @@ -0,0 +1,146 @@ +commit 99368862e44740ff4fd33760893f04e14f9dbdf1 +Author: Felix Fietkau +Date: Tue Jul 31 00:52:27 2007 +0000 + + Port the mbsd_multi patch from freewrt, which adds -fhonour-copts. This will emit warnings in packages that don't use our target cflags properly + + SVN-Revision: 8256 + + This patch brings over a feature from MirBSD: + * -fhonour-copts + If this option is not given, it's warned (depending + on environment variables). This is to catch errors + of misbuilt packages which override CFLAGS themselves. + + This patch was authored by Thorsten Glaser + with copyright assignment to the FSF in effect. + +--- a/gcc/c-family/c-opts.c ++++ b/gcc/c-family/c-opts.c +@@ -108,6 +108,9 @@ static int class_dump_flags; + /* Whether any standard preincluded header has been preincluded. */ + static bool done_preinclude; + ++/* Check if a port honours COPTS. */ ++static int honour_copts = 0; ++ + static void handle_OPT_d (const char *); + static void set_std_cxx98 (int); + static void set_std_cxx11 (int); +@@ -456,6 +459,12 @@ c_common_handle_option (size_t scode, co + flag_no_builtin = !value; + break; + ++ case OPT_fhonour_copts: ++ if (c_language == clk_c) { ++ honour_copts++; ++ } ++ break; ++ + case OPT_fconstant_string_class_: + constant_string_class_name = arg; + break; +@@ -1084,6 +1093,47 @@ c_common_init (void) + return false; + } + ++ if (c_language == clk_c) { ++ char *ev = getenv ("GCC_HONOUR_COPTS"); ++ int evv; ++ if (ev == NULL) ++ evv = -1; ++ else if ((*ev == '0') || (*ev == '\0')) ++ evv = 0; ++ else if (*ev == '1') ++ evv = 1; ++ else if (*ev == '2') ++ evv = 2; ++ else if (*ev == 's') ++ evv = -1; ++ else { ++ warning (0, "unknown GCC_HONOUR_COPTS value, assuming 1"); ++ evv = 1; /* maybe depend this on something like MIRBSD_NATIVE? */ ++ } ++ if (evv == 1) { ++ if (honour_copts == 0) { ++ error ("someone does not honour COPTS at all in lenient mode"); ++ return false; ++ } else if (honour_copts != 1) { ++ warning (0, "someone does not honour COPTS correctly, passed %d times", ++ honour_copts); ++ } ++ } else if (evv == 2) { ++ if (honour_copts == 0) { ++ error ("someone does not honour COPTS at all in strict mode"); ++ return false; ++ } else if (honour_copts != 1) { ++ error ("someone does not honour COPTS correctly, passed %d times", ++ honour_copts); ++ return false; ++ } ++ } else if (evv == 0) { ++ if (honour_copts != 1) ++ inform (0, "someone does not honour COPTS correctly, passed %d times", ++ honour_copts); ++ } ++ } ++ + return true; + } + +--- a/gcc/c-family/c.opt ++++ b/gcc/c-family/c.opt +@@ -1412,6 +1412,9 @@ C++ ObjC++ Optimization Alias(fexception + fhonor-std + C++ ObjC++ Ignore Warn(switch %qs is no longer supported) + ++fhonour-copts ++C ObjC C++ ObjC++ RejectNegative ++ + fhosted + C ObjC + Assume normal C execution environment. +--- a/gcc/common.opt ++++ b/gcc/common.opt +@@ -1510,6 +1510,9 @@ fguess-branch-probability + Common Report Var(flag_guess_branch_prob) Optimization + Enable guessing of branch probabilities. + ++fhonour-copts ++Common RejectNegative ++ + ; Nonzero means ignore `#ident' directives. 0 means handle them. + ; Generate position-independent code for executables if possible + ; On SVR4 targets, it also controls whether or not to emit a +--- a/gcc/opts.c ++++ b/gcc/opts.c +@@ -1928,6 +1928,9 @@ common_handle_option (struct gcc_options + opts, opts_set, loc, dc); + break; + ++ case OPT_fhonour_copts: ++ break; ++ + case OPT_Wlarger_than_: + opts->x_larger_than_size = value; + opts->x_warn_larger_than = value != -1; +--- a/gcc/doc/invoke.texi ++++ b/gcc/doc/invoke.texi +@@ -6567,6 +6567,17 @@ This option is only supported for C and + @option{-Wall} and by @option{-Wpedantic}, which can be disabled with + @option{-Wno-pointer-sign}. + ++@item -fhonour-copts ++@opindex fhonour-copts ++If @env{GCC_HONOUR_COPTS} is set to 1, abort if this option is not ++given at least once, and warn if it is given more than once. ++If @env{GCC_HONOUR_COPTS} is set to 2, abort if this option is not ++given exactly once. ++If @env{GCC_HONOUR_COPTS} is set to 0 or unset, warn if this option ++is not given exactly once. ++The warning is quelled if @env{GCC_HONOUR_COPTS} is set to @samp{s}. ++This flag and environment variable only affect the C language. ++ + @item -Wstack-protector + @opindex Wstack-protector + @opindex Wno-stack-protector diff --git a/toolchain/gcc/patches/7.2.0/920-specs_nonfatal_getenv.patch b/toolchain/gcc/patches/7.2.0/920-specs_nonfatal_getenv.patch new file mode 100644 index 0000000..69b4062 --- /dev/null +++ b/toolchain/gcc/patches/7.2.0/920-specs_nonfatal_getenv.patch @@ -0,0 +1,22 @@ +Author: Jo-Philipp Wich +Date: Sat Apr 21 03:02:39 2012 +0000 + + gcc: add patch to make the getenv() spec function nonfatal if requested environment variable is unset + + SVN-Revision: 31390 + +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -9280,8 +9280,10 @@ getenv_spec_function (int argc, const ch + value = varname; + + if (!value) +- fatal_error (input_location, +- "environment variable %qs not defined", varname); ++ { ++ warning (input_location, "environment variable %qs not defined", varname); ++ value = ""; ++ } + + /* We have to escape every character of the environment variable so + they are not interpreted as active spec characters. A diff --git a/toolchain/gcc/patches/7.2.0/930-fix-mips-noexecstack.patch b/toolchain/gcc/patches/7.2.0/930-fix-mips-noexecstack.patch new file mode 100644 index 0000000..90d10f1 --- /dev/null +++ b/toolchain/gcc/patches/7.2.0/930-fix-mips-noexecstack.patch @@ -0,0 +1,111 @@ +From da45b3fde60095756f5f6030f6012c23a3d34429 Mon Sep 17 00:00:00 2001 +From: Andrew McDonnell +Date: Fri, 3 Oct 2014 19:09:00 +0930 +Subject: Add .note.GNU-stack section + +See http://lists.busybox.net/pipermail/uclibc/2014-October/048671.html +Below copied from https://gcc.gnu.org/ml/gcc-patches/2014-09/msg02430.html + +Re: [Patch, MIPS] Add .note.GNU-stack section + + From: Steve Ellcey + +On Wed, 2014-09-10 at 10:15 -0700, Eric Christopher wrote: +> +> +> On Wed, Sep 10, 2014 at 9:27 AM, wrote: + +> This works except you did not update the assembly files in +> libgcc or glibc. We (Cavium) have the same patch in our tree +> for a few released versions. + +> Mind just checking yours in then Andrew? + +> Thanks! +> -eric + +I talked to Andrew about what files he changed in GCC and created and +tested this new patch. Andrew also mentioned changing some assembly +files in glibc but I don't see any use of '.section .note.GNU-stack' in +any assembly files in glibc (for any platform) so I wasn't planning on +creating a glibc to add them to mips glibc assembly language files. + +OK to check in this patch? + +Steve Ellcey +sellcey@mips.com + + + +2014-09-26 Steve Ellcey +--- + gcc/config/mips/mips.c | 3 +++ + libgcc/config/mips/crti.S | 4 ++++ + libgcc/config/mips/crtn.S | 3 +++ + libgcc/config/mips/mips16.S | 4 ++++ + libgcc/config/mips/vr4120-div.S | 4 ++++ + 5 files changed, 18 insertions(+) + +--- a/gcc/config/mips/mips.c ++++ b/gcc/config/mips/mips.c +@@ -22561,6 +22561,9 @@ mips_promote_function_mode (const_tree t + #undef TARGET_CUSTOM_FUNCTION_DESCRIPTORS + #define TARGET_CUSTOM_FUNCTION_DESCRIPTORS 2 + ++#undef TARGET_ASM_FILE_END ++#define TARGET_ASM_FILE_END file_end_indicate_exec_stack ++ + struct gcc_target targetm = TARGET_INITIALIZER; + + #include "gt-mips.h" +--- a/libgcc/config/mips/crti.S ++++ b/libgcc/config/mips/crti.S +@@ -21,6 +21,10 @@ a copy of the GCC Runtime Library Except + see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + . */ + ++ ++/* An executable stack is *not* required for these functions. */ ++ .section .note.GNU-stack,"",%progbits ++ + /* 4 slots for argument spill area. 1 for cpreturn, 1 for stack. + Return spill offset of 40 and 20. Aligned to 16 bytes for n32. */ + +--- a/libgcc/config/mips/crtn.S ++++ b/libgcc/config/mips/crtn.S +@@ -21,6 +21,9 @@ a copy of the GCC Runtime Library Except + see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + . */ + ++/* An executable stack is *not* required for these functions. */ ++ .section .note.GNU-stack,"",%progbits ++ + /* 4 slots for argument spill area. 1 for cpreturn, 1 for stack. + Return spill offset of 40 and 20. Aligned to 16 bytes for n32. */ + +--- a/libgcc/config/mips/mips16.S ++++ b/libgcc/config/mips/mips16.S +@@ -48,6 +48,10 @@ see the files COPYING3 and COPYING.RUNTI + values using the soft-float calling convention, but do the actual + operation using the hard floating point instructions. */ + ++/* An executable stack is *not* required for these functions. */ ++ .section .note.GNU-stack,"",%progbits ++ .previous ++ + #if defined _MIPS_SIM && (_MIPS_SIM == _ABIO32 || _MIPS_SIM == _ABIO64) + + /* This file contains 32-bit assembly code. */ +--- a/libgcc/config/mips/vr4120-div.S ++++ b/libgcc/config/mips/vr4120-div.S +@@ -26,6 +26,10 @@ see the files COPYING3 and COPYING.RUNTI + -mfix-vr4120. div and ddiv do not give the correct result when one + of the operands is negative. */ + ++/* An executable stack is *not* required for these functions. */ ++ .section .note.GNU-stack,"",%progbits ++ .previous ++ + .set nomips16 + + #define DIV \ diff --git a/toolchain/gcc/patches/7.2.0/940-no-clobber-stamp-bits.patch b/toolchain/gcc/patches/7.2.0/940-no-clobber-stamp-bits.patch new file mode 100644 index 0000000..8b88b40 --- /dev/null +++ b/toolchain/gcc/patches/7.2.0/940-no-clobber-stamp-bits.patch @@ -0,0 +1,33 @@ +commit 548d9a008ff265e9eaa3c7e0e6e301c6bd5645e6 +Author: Felix Fietkau +Date: Fri Dec 12 17:01:57 2014 +0000 + + gcc: don't clobber stamp-bits with a symlink to itself + + Several versions of gcc have an issue in libstdc++v3 where the build may + clobber stamp-bits with a link to itself. This doesn't manifest itself + on all systems. On several Ubuntu systems, this doesn't appear to be a + problem, but it is an issue on Fedora 16 systems. + + To fix the issue, we'll simply filter out stamp-bits from the symlinks + to be generated. + + Note: gcc 4.4.7 is unaffected by this issue, so no fix is necessary + there. + + Signed-off-by: John Szakmeister + + SVN-Revision: 43669 + + +--- a/libstdc++-v3/include/Makefile.in ++++ b/libstdc++-v3/include/Makefile.in +@@ -1476,7 +1476,7 @@ stamp-bits: ${bits_headers} + @$(STAMP) stamp-bits + + stamp-bits-sup: stamp-bits ${bits_sup_headers} +- @-cd ${bits_builddir} && $(LN_S) $? . 2>/dev/null ++ @-cd ${bits_builddir} && $(LN_S) $(filter-out stamp-bits,$?) . 2>/dev/null + @$(STAMP) stamp-bits-sup + + stamp-c_base: ${c_base_headers} diff --git a/toolchain/gcc/patches/7.2.0/950-cpp_file_path_translation.patch b/toolchain/gcc/patches/7.2.0/950-cpp_file_path_translation.patch new file mode 100644 index 0000000..60729dd --- /dev/null +++ b/toolchain/gcc/patches/7.2.0/950-cpp_file_path_translation.patch @@ -0,0 +1,181 @@ +commit 331735a357a73c7b8adc205241ac3cc6543d985e +Author: Felix Fietkau +Date: Tue Nov 17 12:38:22 2015 +0000 + + gcc: add a patch to 5.x that supports translation of __FILE__ paths + + Signed-off-by: Felix Fietkau + + SVN-Revision: 47490 + +Forward ported from attachment to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47047 + +--- a/gcc/c-family/c-opts.c ++++ b/gcc/c-family/c-opts.c +@@ -588,6 +588,10 @@ c_common_handle_option (size_t scode, co + add_path (xstrdup (arg), SYSTEM, 0, true); + break; + ++ case OPT_iremap: ++ add_cpp_remap_path (arg); ++ break; ++ + case OPT_iwithprefix: + add_prefixed_path (arg, SYSTEM); + break; +--- a/gcc/c-family/c.opt ++++ b/gcc/c-family/c.opt +@@ -1825,6 +1825,10 @@ iquote + C ObjC C++ ObjC++ Joined Separate MissingArgError(missing path after %qs) + -iquote Add to the end of the quote include path. + ++iremap ++C ObjC C++ ObjC++ Joined Separate ++-iremap Convert to if it occurs as prefix in __FILE__. ++ + iwithprefix + C ObjC C++ ObjC++ Joined Separate + -iwithprefix Add to the end of the system include path. +--- a/gcc/doc/cpp.texi ++++ b/gcc/doc/cpp.texi +@@ -4272,6 +4272,7 @@ Refer to the GCC manual for full documen + @c man begin SYNOPSIS + cpp [@option{-D}@var{macro}[=@var{defn}]@dots{}] [@option{-U}@var{macro}] + [@option{-I}@var{dir}@dots{}] [@option{-iquote}@var{dir}@dots{}] ++ [@option{-iremap}@var{src}:@var{dst}] + [@option{-M}|@option{-MM}] [@option{-MG}] [@option{-MF} @var{filename}] + [@option{-MP}] [@option{-MQ} @var{target}@dots{}] + [@option{-MT} @var{target}@dots{}] +--- a/gcc/doc/cppopts.texi ++++ b/gcc/doc/cppopts.texi +@@ -220,6 +220,12 @@ extensions @samp{.i}, @samp{.ii} or @sam + extensions that GCC uses for preprocessed files created by + @option{-save-temps}. + ++@item -iremap @var{src}:@var{dst} ++@opindex iremap ++Replace the prefix @var{src} in __FILE__ with @var{dst} at expansion time. ++This option can be specified more than once. Processing stops at the first ++match. ++ + @item -fdirectives-only + @opindex fdirectives-only + When preprocessing, handle directives, but do not expand macros. +--- a/gcc/doc/invoke.texi ++++ b/gcc/doc/invoke.texi +@@ -11863,6 +11863,12 @@ by @option{-fplugin=@var{name}} instead + @option{-fplugin=@var{path}/@var{name}.so}. This option is not meant + to be used by the user, but only passed by the driver. + ++@item -iremap @var{src}:@var{dst} ++@opindex iremap ++Replace the prefix @var{src} in __FILE__ with @var{dst} at expansion time. ++This option can be specified more than once. Processing stops at the first ++match. ++ + @item -L@var{dir} + @opindex L + Add directory @var{dir} to the list of directories to be searched +--- a/libcpp/include/cpplib.h ++++ b/libcpp/include/cpplib.h +@@ -820,6 +820,9 @@ extern void cpp_set_lang (cpp_reader *, + /* Set the include paths. */ + extern void cpp_set_include_chains (cpp_reader *, cpp_dir *, cpp_dir *, int); + ++/* Provide src:dst pair for __FILE__ remapping. */ ++extern void add_cpp_remap_path (const char *); ++ + /* Call these to get pointers to the options, callback, and deps + structures for a given reader. These pointers are good until you + call cpp_finish on that reader. You can either edit the callbacks +--- a/libcpp/macro.c ++++ b/libcpp/macro.c +@@ -227,6 +227,64 @@ static const char * const monthnames[] = + "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" + }; + ++static size_t remap_pairs; ++static char **remap_src; ++static char **remap_dst; ++ ++void ++add_cpp_remap_path (const char *arg) ++{ ++ const char *arg_dst; ++ size_t len; ++ ++ arg_dst = strchr(arg, ':'); ++ if (arg_dst == NULL) ++ { ++ fprintf(stderr, "Invalid argument for -iremap\n"); ++ exit(1); ++ } ++ ++ len = arg_dst - arg; ++ ++arg_dst; ++ ++ remap_src = (char **) xrealloc(remap_src, sizeof(char *) * (remap_pairs + 1)); ++ remap_dst = (char **) xrealloc(remap_dst, sizeof(char *) * (remap_pairs + 1)); ++ ++ remap_src[remap_pairs] = (char *) xmalloc(len + 1); ++ memcpy(remap_src[remap_pairs], arg, len); ++ remap_src[remap_pairs][len] = '\0'; ++ remap_dst[remap_pairs] = xstrdup(arg_dst); ++ ++remap_pairs; ++} ++ ++static const char * ++cpp_remap_file (const char *arg, char **tmp_name) ++{ ++ char *result; ++ size_t i, len; ++ ++ for (i = 0; i < remap_pairs; ++i) ++ { ++ len = strlen (remap_src[i]); ++ if (strncmp (remap_src[i], arg, len)) ++ continue; ++ if (arg[len] == '\0') ++ return xstrdup (remap_dst[i]); ++ if (arg[len] != '/') ++ continue; ++ arg += len; ++ len = strlen (remap_dst[i]); ++ result = (char *) xmalloc (len + strlen (arg) + 1); ++ memcpy(result, remap_dst[i], len); ++ strcpy(result + len, arg); ++ *tmp_name = result; ++ ++ return result; ++ } ++ ++ return arg; ++} ++ + /* Helper function for builtin_macro. Returns the text generated by + a builtin macro. */ + const uchar * +@@ -290,6 +348,7 @@ _cpp_builtin_macro_text (cpp_reader *pfi + { + unsigned int len; + const char *name; ++ char *tmp_name = NULL; + uchar *buf; + + if (node->value.builtin == BT_FILE) +@@ -301,6 +360,7 @@ _cpp_builtin_macro_text (cpp_reader *pfi + if (!name) + abort (); + } ++ name = cpp_remap_file (name, &tmp_name); + len = strlen (name); + buf = _cpp_unaligned_alloc (pfile, len * 2 + 3); + result = buf; +@@ -308,6 +368,7 @@ _cpp_builtin_macro_text (cpp_reader *pfi + buf = cpp_quote_string (buf + 1, (const unsigned char *) name, len); + *buf++ = '"'; + *buf = '\0'; ++ free (tmp_name); + } + break; +