From patchwork Mon Jun 12 15:02:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Ellcey X-Patchwork-Id: 774679 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 3wmbjT0z8Pz9s65 for ; Tue, 13 Jun 2017 01:02:36 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="Q09TfTkC"; 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:date :from:message-id:to:subject:reply-to; q=dns; s=default; b=tNbsI3 IlQDO4oM1LTMs8aOm2mSPiiGXDBJyvZ0cYrg5KZm1BM1wfVItZmecFDNra0eAK2J WB98dzKKWb0N1h32J9oaI2SM/HB0S/aF7WoQfQ/p2MHyFMK0gBZZtKPxKwYQsRdA VhksecnO7RM8UXaxDJe/b0/aANR+Afd/UA/6M= 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:date :from:message-id:to:subject:reply-to; s=default; bh=7+WZwd3gqiU2 6Nf1v7dnK/zzDuM=; b=Q09TfTkCdsPWVN8+pOXbfUAoD1OMvUmTMfxfWj7sizqO pbEafWB8XOWt3VVvH4ioUA2s2cPw5gMcxFzOYb4vtHbbiQ93hfZNKIcWxn84KhTP ChCpugKZWIPUX8QJV5Gk5e55PfG70aEnYoi/tL9NetMC7gbQi3JRBRdexcI6JrE= Received: (qmail 126823 invoked by alias); 12 Jun 2017 15:02:22 -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 126782 invoked by uid 89); 12 Jun 2017 15:02:20 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-23.6 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: camailhost.cavium.com Received: from camailhost.cavium.com (HELO camailhost.cavium.com) (12.108.191.230) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 12 Jun 2017 15:02:19 +0000 Received: from sellcey-dt.caveonetworks.com ([10.18.104.136]) by camailhost.cavium.com (8.14.7/8.14.7) with ESMTP id v5CF2MLC024754 for ; Mon, 12 Jun 2017 08:02:22 -0700 Received: from sellcey-dt.caveonetworks.com (localhost [127.0.0.1]) by sellcey-dt.caveonetworks.com (8.15.2/8.15.2/Debian-3) with ESMTP id v5CF2Mc3000568 for ; Mon, 12 Jun 2017 08:02:22 -0700 Received: (from sellcey@localhost) by sellcey-dt.caveonetworks.com (8.15.2/8.15.2/Submit) id v5CF2Lj1000567; Mon, 12 Jun 2017 08:02:21 -0700 Date: Mon, 12 Jun 2017 08:02:21 -0700 From: Steve Ellcey Message-Id: <201706121502.v5CF2Lj1000567@sellcey-dt.caveonetworks.com> To: gcc-patches@gcc.gnu.org Subject: [PATCH][aarch64] Enable ifunc resolver attribute by default Reply-To: sellcey@cavium.com I recently noticed that the GCC 'resolver' attribute used for ifunc's is not on by default for aarch64 even though all the infrastructure to support it is in place. I made memcpy an ifunc on aarch64 in glibc and am looking at possibly using it for libatomic too. For this reason I would like to enable it by default. Note that the memcpy ifunc works even when this is not enabled because glibc enables ifuncs by using the assembly language .type psuedo-op to set the resolver attribute when GCC cannot do it with an attribute. Using an ifunc in libatomic does require this to be enabled and I do not see any reason not to have it enabled by default. Tested with no regressions, OK to check in? Steve Ellcey sellcey@cavium.com 2017-06-12 Steve Ellcey * config.gcc (aarch64*-*-linux*): Enable IFUNC by default. diff --git a/gcc/config.gcc b/gcc/config.gcc index a311cd95..e4caca4 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -974,6 +974,7 @@ aarch64*-*-freebsd*) tmake_file="${tmake_file} aarch64/t-aarch64 aarch64/t-aarch64-freebsd" ;; aarch64*-*-linux*) + default_gnu_indirect_function=yes tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h" tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-linux.h" tmake_file="${tmake_file} aarch64/t-aarch64 aarch64/t-aarch64-linux"