From patchwork Wed Aug 24 19:15:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Szabolcs Nagy X-Patchwork-Id: 662489 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3sKH8x58Gmz9sCg for ; Thu, 25 Aug 2016 05:16:17 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=MnajBjyz; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:content-type; q=dns; s=default; b=p9wQ7dOYPiELfDaUZM09dyCgbMpmQceGlYgBxDtIlF2 4LITrKETP1CG9zMDJZjmr0jFdTtLLMXAj/F0dkYRuoWNW7LQ6uHLGewZpsAk4/Pv ZE7i2wzFyICoj0tzybEehQrNW+vkCzfFhgrYmKpWbdCUW7VQZ4hFvROHMViBtf3s = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:content-type; s=default; bh=g5xfJgmpgP71zRhq0IXFG62xs+E=; b=MnajBjyzNm4RDUYUR aprTM2THUBHwaua6/A36a2hI5A1DbeHBFFkc24VWH45b9vMavHTWmsl6Q6UelKRu NAiGy3okZgD9wESUHJAXj5cMhgLzew4dhXEcTi1qbLBHVAY0J8Dk1ykIlVvE0JU4 P7iivEIgpR0BIbXe3merGebIPc= Received: (qmail 17305 invoked by alias); 24 Aug 2016 19:16:08 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 16542 invoked by uid 89); 24 Aug 2016 19:16:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL, BAYES_00, SPF_PASS autolearn=ham version=3.3.2 spammy=mips64r6, UD:0, Hx-languages-length:1733, H*r:sk:EUR01-H X-HELO: eu-smtp-delivery-143.mimecast.com Received: from eu-smtp-delivery-143.mimecast.com (HELO eu-smtp-delivery-143.mimecast.com) (207.82.80.143) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 24 Aug 2016 19:15:57 +0000 Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01lp0209.outbound.protection.outlook.com [213.199.154.209]) (Using TLS) by eu-smtp-1.mimecast.com with ESMTP id uk-mta-52-h5xS8N6VNTOOKUKxdu_vhA-1; Wed, 24 Aug 2016 20:15:53 +0100 Received: from [10.2.206.73] (217.140.96.140) by VI1PR0802MB2158.eurprd08.prod.outlook.com (10.172.12.15) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.587.9; Wed, 24 Aug 2016 19:15:51 +0000 Message-ID: <57BDF264.8020500@arm.com> Date: Wed, 24 Aug 2016 20:15:48 +0100 From: Szabolcs Nagy User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 MIME-Version: 1.0 To: "gcc-patches@gcc.gnu.org" CC: , Matthew Fortune Subject: [PATCH][mips] Add support for mips*r6-*-musl X-ClientProxiedBy: HE1PR06CA0064.eurprd06.prod.outlook.com (10.164.28.160) To VI1PR0802MB2158.eurprd08.prod.outlook.com (10.172.12.15) X-MS-Office365-Filtering-Correlation-Id: 54bf77d8-bd1b-4e4a-b11e-08d3cc531027 X-Microsoft-Exchange-Diagnostics: 1; VI1PR0802MB2158; 2:K8WbNm/rDtAW4TMsXXIx+X2IQO/H69qh3rliMtqYARQljaSEoEEBedPBzrVGQiSpn3zfdMxX7LVtVePNwjxTShvFoY6JRBI8vxVaA5jKVJz4m/IJJ/UXi1sPlG9GU7SHW1Pxn5qKgaZMhmtqweqH7a9uf//JDVikwsR0dBqHFOTkiJiGMadche/RWbVIbqIE; 3:wvi53hZOx7OTW1sVr4q3SA7hyF8r1WGS2/NOk/+ERV3JpdZZ+0TfsjuDMBgGMwYjPetd/Fg8atuI7Chphi1GAF8GezD269xSLTK/i+mrfCB8judpsZi/aCtH7GS+Jwxf X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:VI1PR0802MB2158; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0802MB2158; 25:qxsnhhuLe+jIaY0LNc75GTRSYU/5C8LZP7FzbtKh19et0MABMopBQh2yASzCtMpL+V0GfOVTHh8w1s5W9lSVX6f2v5ToTuDI7zHz442kDTtG9E5YkBsT/W8ukngth+y4kIE3kK3KSDWJfLEqHyFTwMw6WeCKebbE1HMikuTAPwz8+oLTiL62zBDOE4nBBu37n776vFfUs3eXVuIBk/mdaHEt9oFcuMiq2Sk0BEm4Y/4AUE9vN0iWfxvdEqxpDgTpwNr+jcfehjrxLDtLFVLv7Cdr1xpvqQoBnzmllVaMhiplSxK9cj+tg40NIuAT7jW30sUKfEshHQ9h/yxwcQpSj2nMBsSOgyrG/7LSUjECvZdDEhTuQzv1BqixT7rjootSAk4Zz9trGZVCSw6fi/370GVxcQZmWEFb9wcu+io9cNjpOGDZ+JwtWRVocEQ/xw1Kwsy0oBdqdd81CmOSFFbUH2qEhe/3v7UhYYMiPrIpGJDbkub80Q82hF7a7uONFlk0SGW1gL+rqbyXQ/QHCgFgEmLehpLbiBKfiLtnGHMwBdxs0l+JyMQB/DiD7smJSCRAHbsXhuFw3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dCfxYpQXadfOTw8CCQClnDxOTevYYrPfcRlz+/wDKX5BFU6IPyAv2OPiuFCn6OP35Ri1xDog+m+2P4+iX1dS6wnje9pVxOgTRW0+izmq1FIBZIL6Qk5jFuBOGYYLPSD8NC+EX56RZlyaV24ZG++to= NoDisclaimer: True X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(180628864354917); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(102415321)(6040176)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6055026); SRVR:VI1PR0802MB2158; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0802MB2158; X-Forefront-PRVS: 0044C17179 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6049001)(7916002)(377424004)(199003)(189002)(305945005)(229853001)(189998001)(568964002)(110136002)(97736004)(4001350100001)(270700001)(105586002)(2476003)(59896002)(86362001)(512874002)(42186005)(106356001)(101416001)(77096005)(19580395003)(33656002)(65956001)(66066001)(65806001)(2351001)(36756003)(4610100001)(65816999)(50986999)(64126003)(21490400002)(5000100001)(7846002)(87266999)(7736002)(3846002)(54356999)(19580405001)(586003)(4326007)(80316001)(6116002)(2501003)(83506001)(8676002)(84326002)(5890100001)(81156014)(81166006)(92566002)(2906002)(5660300001)(68736007); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0802MB2158; H:[10.2.206.73]; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR0802MB2158; 23:zlXYCBR8Jk0mr0t5StT8Lwg/UHKnn6nRMLAw6CU?= =?us-ascii?Q?CnA7iIj34hsqke1xr1AoJcdeCeZDEW8e3blT2aHLKxa7fiGVYbuM3MsVYyOO?= =?us-ascii?Q?L8rZ2Oy12Rzzng4JmkOwHz8psVOISl3OElm8zrFvg9hPKntGh+OStTTYARRN?= =?us-ascii?Q?BZtSS6ROYR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frMa8sF9k6mR09MtgJYVj8YVxJh2CeouY//FknMfKcm/Sa3W2btjndYEUN981ydIMkSiFm4Kh2gCb4DyCy+GGC1XV1bE=; 7:0RZj3gUDTFpYMhG8EUrtgxe6LM3VlCe3C6a8V4C+QCqkXU7T0LZPGC9wnxiBwia/rNRT3YQcFALmTia/nIW+xkld2735prMHnuMyrvwuI93yd1uE3ev0QJ5SqJXC11PtKkBKBWRVRulYbNfno4ejPIyk4PmAwFn4E0eCSU96XHFWUBFQp5kXVPDeZyhttoexsvABby0hrIRX8efv3kpwReykSun0OZGkBSVFsA+j956B0ZvXocfoUVmEEL2iCLwO SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; VI1PR0802MB2158; 20:Xo6n7FQEdXo1B9SOzvmMK0uNevHs+e81DCdFPUf32DJy6D7NXCxfTH37A3lHIhqEMiXDeXB68RgNk5eGI1iO9PL1Dbt8i67tI4hTxpCoFMVrN8jRtB22jdiNMe3BfhKMscdKGDoQyO0VWiDdnwlAllgJtrrD5W9gf36QuLFyphQ= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Aug 2016 19:15:51.0006 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0802MB2158 X-MC-Unique: h5xS8N6VNTOOKUKxdu_vhA-1 X-IsSubscribed: yes Add the musl dynamic linker names for mips r6. It seems DRIVER_SELF_SPECS sets the default mips isa (MIPS_DEFAULT_ISA_LEVEL_SPEC) on *-mti-linux* or *-mti-elf, but not on gnu linux targets (see config/mips/mti-linux.h vs config/mips/gnu-user.h). Is that ok? It seems broken, but i didn't try to fix that. If the toolchain is configured with mipsisa32r6-linux-musl the dynlinker name is wrong unless one explicitly passes -mips32r6 to gcc (same for the assembler and linker: they don't get -mips32r6 by default). gcc/ 2016-08-24 Szabolcs Nagy * config/mips/linux.h (MUSL_DYNAMIC_LINKER32): Update. (MUSL_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKERN32): Update. diff --git a/gcc/config/mips/linux.h b/gcc/config/mips/linux.h index fa253b6..2d79715 100644 --- a/gcc/config/mips/linux.h +++ b/gcc/config/mips/linux.h @@ -38,10 +38,13 @@ along with GCC; see the file COPYING3. If not see "%{mnan=2008:/lib32/ld-uClibc-mipsn8.so.0;:/lib32/ld-uClibc.so.0}" #undef MUSL_DYNAMIC_LINKER32 -#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-mips%{EL:el}%{msoft-float:-sf}.so.1" +#define MUSL_DYNAMIC_LINKER32 \ + "/lib/ld-musl-mips%{mips32r6:r6}%{EL:el}%{msoft-float:-sf}.so.1" #undef MUSL_DYNAMIC_LINKER64 -#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-mips64%{EL:el}%{msoft-float:-sf}.so.1" -#define MUSL_DYNAMIC_LINKERN32 "/lib/ld-musl-mipsn32%{EL:el}%{msoft-float:-sf}.so.1" +#define MUSL_DYNAMIC_LINKER64 \ + "/lib/ld-musl-mips64%{mips64r6:r6}%{EL:el}%{msoft-float:-sf}.so.1" +#define MUSL_DYNAMIC_LINKERN32 \ + "/lib/ld-musl-mipsn32%{mips64r6:r6}%{EL:el}%{msoft-float:-sf}.so.1" #define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32" #define GNU_USER_DYNAMIC_LINKERN32 \