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: 7906 X-Patchwork-Delegate: tuliom@linux.vnet.ibm.com Received: (qmail 123644 invoked by alias); 29 Jul 2015 00:51:21 -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 123315 invoked by uid 89); 29 Jul 2015 00:51:20 -0000 Authentication-Results: sourceware.org; auth=none 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-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:content-type:content-transfer-encoding; bh=inCtfl/D6CaPrzKPlwp3CbfR3UG8fqaJiaVGdwPm0q4=; b=K9ukmzHw0ctFFLY5JOz1sE7x0mg/dn4XeZe7wda47fwj3adyNN9mA+336g4SYds2CW +HWKi2woDzmRFkHTrkPxGYAUttvNhINcrFW4LsfYqB3R4wRl76mZHYmBgcbRaVW3jePP n3uJ8i1wcGmxIgL2UxhfYAgIZzRtx7/bV8XswbooCrtJwS+An0q9a70zvEA7FGU2cnzx ZjTKnqt6kB8LiAN+6wadOihSdkiYMutPl8dLRBFpUybneW6o2MsUgCqjNRCjL199BHhp wngflBE0zu8/TLhjyhXscDr+0PK0IwfkukH+r8U0xHpWAmpgxDjw5fb1i2vW2hVqC9sD DHLA== X-Gm-Message-State: ALoCoQkbxLt8h9GOgVR3+EFWf8KA/yF3zgi2r+mLngkPYkwQASLx5Zv0Fc/kzONLuCjoK0kJ+EHJ 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 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