From patchwork Mon Oct 19 19:01:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Szabolcs Nagy X-Patchwork-Id: 532518 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 22354140082 for ; Tue, 20 Oct 2015 06:02:16 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=kjKXnEtj; 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:references :in-reply-to:content-type; q=dns; s=default; b=t5/vCVF2f6ZoR9Mf9 61Gu5NOkdiCivpF81CpbZchZa2QXY5c1xunV2hPqUiZsEpvO3Fy0y/bmtr/4bUbZ oPIo47P5sAOB+Zf46nRdddE2bY1JqBzvV5hEXNrmnS2em86l3Ni4+e7jSRc+/OsD 0cj8ot6PEz/BTLF2dcmxJ7ukvc= 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:references :in-reply-to:content-type; s=default; bh=HSxIHYsd81Exnio4YPVmXml YXv0=; b=kjKXnEtjD3FDGxlP/8NE2QsbANMfyPJvjgL2s9wzv9PXeAiIjSFXb54 4faEUdYEtqFdVxu/30H8RAPOiH9Py5zhwlnMdIy6IynH2fr+whoDGiwM/XFlP0gU fgvpJjbaJgluC3eS020Fr0WN9SlFVsyyGpI94rv+LEARvWdlmTv4= Received: (qmail 58391 invoked by alias); 19 Oct 2015 19:02:10 -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 58372 invoked by uid 89); 19 Oct 2015 19:02:09 -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 X-HELO: eu-smtp-delivery-143.mimecast.com Received: from eu-smtp-delivery-143.mimecast.com (HELO eu-smtp-delivery-143.mimecast.com) (146.101.78.143) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 19 Oct 2015 19:02:06 +0000 Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) by eu-smtp-1.mimecast.com with ESMTP id uk-mta-19-__Eo8fk4QfStJ89lGarAmw-1; Mon, 19 Oct 2015 20:01:59 +0100 Received: from [10.2.206.40] ([10.1.2.79]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 19 Oct 2015 20:01:58 +0100 Message-ID: <56253E17.6070701@arm.com> Date: Mon, 19 Oct 2015 20:01:43 +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: Oleg Endo CC: "gcc-patches@gcc.gnu.org" , Gregor Richards , Rich Felker Subject: Re: [PATCH, sh][v3] musl support for sh References: <56212089.5080306@arm.com> <1445044476.2624.272.camel@t-online.de> In-Reply-To: <1445044476.2624.272.camel@t-online.de> X-MC-Unique: __Eo8fk4QfStJ89lGarAmw-1 X-IsSubscribed: yes On 17/10/15 02:14, Oleg Endo wrote: > On Fri, 2015-10-16 at 17:06 +0100, Szabolcs Nagy wrote: >> Revision of >> https://gcc.gnu.org/ml/gcc-patches/2015-04/msg01636.html >> >> The musl dynamic linker name is /lib/ld-musl-sh{-nofpu}{-fdpic}.so.1 >> >> New in this revision: >> >> Add -fdpic to the name, will be useful with the pending sh2 FDPIC support. >> >> 2015-10-16 Gregor Richards >> Szabolcs Nagy >> >> * config/sh/linux.h (MUSL_DYNAMIC_LINKER): Define. >> (MUSL_DYNAMIC_LINKER_E, MUSL_DYNAMIC_LINKER_FP): Define. > > >> +#if TARGET_CPU_DEFAULT & (MASK_HARD_SH2A_DOUBLE | MASK_SH4) >> +/* "-nofpu" if any nofpu option is specified. */ >> +#define MUSL_DYNAMIC_LINKER_FP \ >> + "%{m1|m2|m2a-nofpu|m3|m4-nofpu|m4-100-nofpu|m4-200-nofpu|m4-300-nofpu|" \ >> + "m4-340|m4-400|m4-500|m4al|m5-32media-nofpu|m5-64media-nofpu|" \ >> + "m5-compact-nofpu:-nofpu}" >> +#else >> +/* "-nofpu" if none of the hard fpu options are specified. */ >> +#define MUSL_DYNAMIC_LINKER_FP \ >> + "%{m2a|m4|m4-100|m4-200|m4-300|m4a|m5-32media|m5-64media|m5-compact:;:-nofpu}" >> +#endif > > SH5 has been declared obsolete. Please do not add any new SH5 related > things. In this case, drop the m5-* thingies. > removed m5*. OK to commit with this? diff --git a/gcc/config/sh/linux.h b/gcc/config/sh/linux.h index 0f5d614..61cf777 100644 --- a/gcc/config/sh/linux.h +++ b/gcc/config/sh/linux.h @@ -43,6 +43,27 @@ along with GCC; see the file COPYING3. If not see #define TARGET_ASM_FILE_END file_end_indicate_exec_stack +#if TARGET_ENDIAN_DEFAULT == MASK_LITTLE_ENDIAN +#define MUSL_DYNAMIC_LINKER_E "%{mb:eb}" +#else +#define MUSL_DYNAMIC_LINKER_E "%{!ml:eb}" +#endif + +#if TARGET_CPU_DEFAULT & (MASK_HARD_SH2A_DOUBLE | MASK_SH4) +/* "-nofpu" if any nofpu option is specified. */ +#define MUSL_DYNAMIC_LINKER_FP \ + "%{m1|m2|m2a-nofpu|m3|m4-nofpu|m4-100-nofpu|m4-200-nofpu|m4-300-nofpu|" \ + "m4-340|m4-400|m4-500|m4al:-nofpu}" +#else +/* "-nofpu" if none of the hard fpu options are specified. */ +#define MUSL_DYNAMIC_LINKER_FP "%{m2a|m4|m4-100|m4-200|m4-300|m4a:;:-nofpu}" +#endif + +#undef MUSL_DYNAMIC_LINKER +#define MUSL_DYNAMIC_LINKER \ + "/lib/ld-musl-sh" MUSL_DYNAMIC_LINKER_E MUSL_DYNAMIC_LINKER_FP \ + "%{mfdpic:-fdpic}.so.1" + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" #undef SUBTARGET_LINK_EMUL_SUFFIX