From patchwork Wed Jul 29 00:51:11 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 51608 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f197.google.com (mail-wi0-f197.google.com [209.85.212.197]) by patches.linaro.org (Postfix) with ESMTPS id AEB8020323 for ; Wed, 29 Jul 2015 00:51:34 +0000 (UTC) Received: by wilm20 with SMTP id m20sf1226527wil.2 for ; Tue, 28 Jul 2015 17:51:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:mailing-list:precedence:list-id :list-unsubscribe:list-subscribe:list-archive:list-post:list-help :sender:delivered-to:message-id:date:from:user-agent:mime-version:to :cc:subject:content-type:content-transfer-encoding:x-original-sender :x-original-authentication-results; bh=inCtfl/D6CaPrzKPlwp3CbfR3UG8fqaJiaVGdwPm0q4=; b=XpJ348pjn/+jM9K1un8ZPILhQuf9CEr9blOmpiR0Jr47lsETeFk7KKBYPgE3lDl0tN kJzSgdV4QDKItzGj1iDAeCrgR/vl0WZe35nn+ODaGaW0RRv+M+TDJUVtzwwHHJkMiSwn CvfrqrdVvb2FWVGw6i4KFpREeAI5wqV1xmHbnZNpjrO8y/BNn25v/7YqLCbVrtphLdBz QDsOXeFvN157KUiov+UDdwA9fOAF/SQC9QHVSLq2hjEFcoVJUVVW2ogD1aR0Gy8FQmcd DvRHQMPnjsThmojq/+QW4dkCUvYRjFT/7/xfw17OHVseWH655vmaG4TrzXGuwLUOs3Rp RvOA== X-Gm-Message-State: ALoCoQlbr13e5xM3R2wRPZvbSGDRX/IZMkim9BzJikBM4k2QGQqqbrjH4pNTPMYuCwhqX1Png0ub X-Received: by 10.180.7.201 with SMTP id l9mr19717wia.0.1438131093948; Tue, 28 Jul 2015 17:51:33 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.87.100 with SMTP id w4ls20580laz.51.gmail; Tue, 28 Jul 2015 17:51:33 -0700 (PDT) X-Received: by 10.152.10.72 with SMTP id g8mr35451463lab.97.1438131093591; Tue, 28 Jul 2015 17:51:33 -0700 (PDT) Received: from mail-la0-x233.google.com (mail-la0-x233.google.com. [2a00:1450:4010:c03::233]) by mx.google.com with ESMTPS id l7si19973260lbb.19.2015.07.28.17.51.32 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Jul 2015 17:51:32 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c03::233 as permitted sender) client-ip=2a00:1450:4010:c03::233; Received: by lafd3 with SMTP id d3so68280236laf.1 for ; Tue, 28 Jul 2015 17:51:32 -0700 (PDT) X-Received: by 10.152.36.102 with SMTP id p6mr35938620laj.19.1438131092871; Tue, 28 Jul 2015 17:51:32 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.7.198 with SMTP id l6csp2440341lba; Tue, 28 Jul 2015 17:51:31 -0700 (PDT) X-Received: by 10.70.130.34 with SMTP id ob2mr86266831pdb.15.1438131090816; Tue, 28 Jul 2015 17:51:30 -0700 (PDT) Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id ty1si5050686pab.180.2015.07.28.17.51.29 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Jul 2015 17:51:30 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-61478-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Received: (qmail 123644 invoked by alias); 29 Jul 2015 00:51:21 -0000 Mailing-List: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org Precedence: list 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 123315 invoked by uid 89); 29 Jul 2015 00:51:20 -0000 X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-yk0-f175.google.com X-Received: by 10.129.57.193 with SMTP id g184mr39224795ywa.45.1438131075812; Tue, 28 Jul 2015 17:51:15 -0700 (PDT) Message-ID: <55B8237F.8060309@linaro.org> Date: Tue, 28 Jul 2015 21:51:11 -0300 From: Adhemerval Zanella User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 MIME-Version: 1.0 To: GNU C Library CC: Steven Munroe , Tulio Magno Quites Machado Filho Subject: [PATCH 1/3] powerpc: Fix strstr/power7 build X-Original-Sender: adhemerval.zanella@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c03::233 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=pass header.i=@sourceware.org X-Google-Group-Id: 836684582541 This patch fixes the strstr build with --disable-multi-arch option. The optimization calls the __strstr_ppc symbol, which always build for multiarch config but not if it is disable. This patch fixes it by adding the default C implementation object with the expected symbol name. Checked on powerpc64le. --- * sysdeps/powerpc/powerpc64/power7/Makefile [$(subdir) = string] (sysdep_routines): Add strstr-ppc64. * sysdeps/powerpc/powerpc64/power7/strstr-ppc64.c: New file. -- diff --git a/ChangeLog b/ChangeLog index c753d5c..0ad9742 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2015-07-28 Adhemerval Zanella + + * sysdeps/powerpc/powerpc64/power7/Makefile [$(subdir) = string] + (sysdep_routines): Add strstr-ppc64. + * sysdeps/powerpc/powerpc64/power7/strstr-ppc64.c: New file. + 2015-07-27 Mike Frysinger * sysdeps/unix/sysv/linux/ia64/localplt.data: Delete __tls_get_addr. diff --git a/sysdeps/powerpc/powerpc64/power7/Makefile b/sysdeps/powerpc/powerpc64/power7/Makefile index 40aacfa..89a2296 100644 --- a/sysdeps/powerpc/powerpc64/power7/Makefile +++ b/sysdeps/powerpc/powerpc64/power7/Makefile @@ -5,6 +5,7 @@ CFLAGS-rtld.c += -mno-vsx endif ifeq ($(subdir),string) +sysdep_routines += strstr-ppc64 CFLAGS-strncase.c += -funroll-loops CFLAGS-strncase_l.c += -funroll-loops endif diff --git a/sysdeps/powerpc/powerpc64/power7/strstr-ppc64.c b/sysdeps/powerpc/powerpc64/power7/strstr-ppc64.c new file mode 100644 index 0000000..bbab92d --- /dev/null +++ b/sysdeps/powerpc/powerpc64/power7/strstr-ppc64.c @@ -0,0 +1,27 @@ +/* Optimized strstr implementation for PowerPC64/POWER7. + Copyright (C) 2015 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include + +#define STRSTR __strstr_ppc +#undef libc_hidden_builtin_def +#define libc_hidden_builtin_def(__name) + +extern __typeof (strstr) __strstr_ppc attribute_hidden; + +#include