From patchwork Tue Dec 15 18:51:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: cseo X-Patchwork-Id: 557054 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 174FA140297 for ; Wed, 16 Dec 2015 05:51:53 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b=VxCZStt7; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:to:cc:from:subject:message-id:date :mime-version:content-type; q=dns; s=default; b=v0GHQobTafTi00I2 IL5YykDH0AIK1DEUqE+gKEcI1syeFrl6Ss1vdujo7IEpovnJliGfnOp4tc71h705 BL8QPfJjTgV2TR5nuTvTdu18yq50QVmxISDohK4lHVf7ONp52W3OtTGpqes+LagD f152ysoNpfCKuHoQZItijkvlqE8= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:to:cc:from:subject:message-id:date :mime-version:content-type; s=default; bh=NAMS/l6jo2N0cwCfBGmp+O J+QVk=; b=VxCZStt7MDl+SbfHqcOV2L6QFDd2Wf0sYq3gqRChIU/EQ2Go4q29lg GEEnv0Y1MGu4gtCSYRv30ou1CKBwJZ1uPNK2QdWTQfAS4XmAmrgsQ0hoOBFajMJ6 R0aPHpPUCfzTrtOGwFYTs1FIiSByN9zU3zRvpLJ2MkGondaXm5o0o= Received: (qmail 70431 invoked by alias); 15 Dec 2015 18:51:47 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 70417 invoked by uid 89); 15 Dec 2015 18:51:47 -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, KAM_LAZY_DOMAIN_SECURITY, LIKELY_SPAM_BODY, T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: e24smtp02.br.ibm.com X-IBM-Helo: d24dlp02.br.ibm.com X-IBM-MailFrom: cseo@linux.vnet.ibm.com X-IBM-RcptTo: libc-alpha@sourceware.org To: GLIBC Cc: Tulio Magno Quites Machado Filho , "Steven J. Munroe" From: Carlos Eduardo Seo Subject: [PATCH] powerpc: Export __parse_hwcap_and_convert_at_platform to, libc.a Message-ID: <56706135.1000901@linux.vnet.ibm.com> Date: Tue, 15 Dec 2015 16:51:33 -0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15121518-0021-0000-0000-0000047BEFCC Hi Commit 67385a01d229751569b6aac067ffdcd813a15d7a added a new feature for powerpc, where we store HWCAP/Platform bits in the TCB. In the dynamic linking case, we use the versioned symbol '__parse_hwcap_and_convert_at_platform' to verify if this feature is available. However, the same symbol was not exported to libc.a, making it not possible for GCC to check for it prior to link time. This patch fixes that. Regards, diff --git a/sysdeps/powerpc/hwcapinfo.c b/sysdeps/powerpc/hwcapinfo.c index a115ffc..b885f1c 100644 --- a/sysdeps/powerpc/hwcapinfo.c +++ b/sysdeps/powerpc/hwcapinfo.c @@ -74,3 +74,11 @@ __tcb_parse_hwcap_and_convert_at_platform (void) versioned_symbol (ld, __tcb_parse_hwcap_and_convert_at_platform, \ __parse_hwcap_and_convert_at_platform, GLIBC_2_23); #endif + +/* Export __parse_hwcap_and_convert_at_platform in libc.a. This is used by + GCC to make sure that the HWCAP/Platform bits are stored in the TCB when + using __builtin_cpu_is()/__builtin_cpu_supports() in the static case. */ +#ifndef SHARED +weak_alias (__tcb_parse_hwcap_and_convert_at_platform, \ + __parse_hwcap_and_convert_at_platform); +#endif