From patchwork Wed Jul 22 17:13:03 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Szabolcs Nagy X-Patchwork-Id: 498745 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 5691D1402B8 for ; Thu, 23 Jul 2015 03:13: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=TpyxvDrs; 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=XPz8MGJ/0ebBF9uPYozDcvIsCJhH+xk4JfZYj617LyE g6DYT7tNUqXaflUrp4ydFk8zlVOOfh8ejCATqouOPjTdJ8J66/BNecmPR3BbmmBV pIdM2HrpEqg5knezumJuMhbETqc0VsCmXvj9KvMLIv9tEiR8J4SU85hlOCJe7k6c = 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=gn0aSrND0FPt21P4pMUNvyGT/J0=; b=TpyxvDrsqz+fc51F4 GCLWn+589+IpYC6/XYPAs42lnXW7pmIX9PVlfNTjF1JibONAUqeP12T3OObtgc2/ MQDnRRzRNRojPHjohO3RjHt6LIPpQjS5hfA9MzOBc6gQM770ESX4a6qyQ50kWxiM HOsjzWOXfNUJ72ReyiSCDOC8F4= Received: (qmail 95077 invoked by alias); 22 Jul 2015 17:13: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 95059 invoked by uid 89); 22 Jul 2015 17:13: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; Wed, 22 Jul 2015 17:13:08 +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-15-brvuIFHKTJGS4oDB1gqLlw-1; Wed, 22 Jul 2015 18:13:04 +0100 Received: from [10.2.207.49] ([10.1.2.79]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 22 Jul 2015 18:13:03 +0100 Message-ID: <55AFCF1F.20000@arm.com> Date: Wed, 22 Jul 2015 18:13:03 +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: Marcus Shawcroft Subject: [PATCH][AArch64] Fix LINUX_TARGET_LINK_SPEC to be consistent with ARM X-MC-Unique: brvuIFHKTJGS4oDB1gqLlw-1 X-IsSubscribed: yes Same as https://gcc.gnu.org/ml/gcc-patches/2015-04/msg01387.html but for AArch64. -dynamic-linker is only passed to the linker if !static && !shared. -rdynamic handling is changed too to be consistent with arm: only pass -export-dynamic if !static. 2015-07-22 Szabolcs Nagy PR target/65711 * config/aarch64/aarch64-linux.h (LINUX_TARGET_LINK_SPEC): Move -dynamic-linker within %{!static %{!shared, and -rdynamic within %{!static. diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h index 1600a32..c51c8b2 100644 --- a/gcc/config/aarch64/aarch64-linux.h +++ b/gcc/config/aarch64/aarch64-linux.h @@ -38,8 +38,9 @@ %{static:-Bstatic} \ %{shared:-shared} \ %{symbolic:-Bsymbolic} \ - %{rdynamic:-export-dynamic} \ - -dynamic-linker " GNU_USER_DYNAMIC_LINKER " \ + %{!static: \ + %{rdynamic:-export-dynamic} \ + %{!shared:-dynamic-linker " GNU_USER_DYNAMIC_LINKER "}} \ -X \ %{mbig-endian:-EB} %{mlittle-endian:-EL} \ -maarch64linux%{mabi=ilp32:32}%{mbig-endian:b}"