From patchwork Mon Apr 27 14:35:23 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Szabolcs Nagy X-Patchwork-Id: 465048 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 AE46B14007D for ; Tue, 28 Apr 2015 00:35:36 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass reason="1024-bit key; unprotected key" header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=uK+mUk9L; dkim-adsp=none (unprotected policy); 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=Q4LrfyGBMY9+JD8yD W0YZ6OJAKragHW34B2uc41TZzKofSl1BL7Dl3IN549jj5kEZYijkd2cNp7yx3uoX gcaLXCJNr/gbdJUYnZMFOCqRfIuG4NJ/KKhkQB4QHQH48zjz82CeUUcs/3HJIXLi BCvVtUFi2fTzfP8WDB+hBFZjWo= 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=e7/YU1/pqCxOaJZBTWR6hcq DzMk=; b=uK+mUk9LXtKx6L6CIcgMEwVudCetZlYSrXHhAMHdLUGTWUJJPZLeCQQ JuUWIBEUVY/pmrj4XWQVCnj6uHGXRV4hMRS1pnjBcnzbu4K73JKwOB4ngK2HMBHB ZihfgcG3gkno2PIu6+bRiNYa4cHfUaEY7qsw4AegIx2yobqYm8Hk= Received: (qmail 50760 invoked by alias); 27 Apr 2015 14:35:29 -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 50749 invoked by uid 89); 27 Apr 2015 14:35:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 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, 27 Apr 2015 14:35:28 +0000 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) by uk-mta-3.uk.mimecast.lan; Mon, 27 Apr 2015 15:35:24 +0100 Received: from [10.2.206.56] ([10.1.2.79]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 27 Apr 2015 15:35:23 +0100 Message-ID: <553E492B.1040706@arm.com> Date: Mon, 27 Apr 2015 15:35:23 +0100 From: Szabolcs Nagy User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: "gcc-patches@gcc.gnu.org" CC: Gregor Richards , Rich Felker , Szabolcs Nagy Subject: Re: [PATCH 5/13] microblaze musl support References: <55354A4A.4060702@arm.com> <55354B4E.8050508@arm.com> In-Reply-To: <55354B4E.8050508@arm.com> X-MC-Unique: QzFHBG8DTE-oHMmtOID6DQ-1 X-IsSubscribed: yes On 20/04/15 19:54, Szabolcs Nagy wrote: > Set up dynamic linker name for microblaze. > Patch v2. (undef MUSL_DYNAMIC_LINKER that comes from config/linux.h) gcc/Changelog: 2015-04-24 Gregor Richards * config/microblaze/linux.h (MUSL_DYNAMIC_LINKER): Define. (DYNAMIC_LINKER): Change. diff --git a/gcc/config/microblaze/linux.h b/gcc/config/microblaze/linux.h index a7faa7d..3e08138 100644 --- a/gcc/config/microblaze/linux.h +++ b/gcc/config/microblaze/linux.h @@ -25,7 +25,22 @@ #undef TLS_NEEDS_GOT #define TLS_NEEDS_GOT 1 -#define DYNAMIC_LINKER "/lib/ld.so.1" +#if TARGET_BIG_ENDIAN_DEFAULT == 0 /* LE */ +#define MUSL_DYNAMIC_LINKER_E "%{mbig-endian:;:el}" +#else +#define MUSL_DYNAMIC_LINKER_E "%{mlittle-endian:el}" +#endif + +#undef MUSL_DYNAMIC_LINKER +#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-microblaze" MUSL_DYNAMIC_LINKER_E ".so.1" +#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" + +#if DEFAULT_LIBC == LIBC_MUSL +#define DYNAMIC_LINKER MUSL_DYNAMIC_LINKER +#else +#define DYNAMIC_LINKER GLIBC_DYNAMIC_LINKER +#endif + #undef SUBTARGET_EXTRA_SPECS #define SUBTARGET_EXTRA_SPECS \ { "dynamic_linker", DYNAMIC_LINKER }