From patchwork Tue Jun 20 13:44:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zack Weinberg X-Patchwork-Id: 21137 Received: (qmail 44331 invoked by alias); 20 Jun 2017 13:45:23 -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 44003 invoked by uid 89); 20 Jun 2017 13:45:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=Hx-languages-length:3110, HContent-Transfer-Encoding:8bit X-HELO: mailbackend.panix.com From: Zack Weinberg To: libc-alpha@sourceware.org Subject: [PATCH COMMITTED] Fix fallout from bits/string.h removal. Date: Tue, 20 Jun 2017 09:44:59 -0400 Message-Id: <20170620134459.20110-1-zackw@panix.com> MIME-Version: 1.0 Remove one more string inline that was defined directly in string.h; in the absence of the rest of the inlines, it broke the build. Like other ifunc shims for these functions, x86_64/multiarch/{mem,st}pcpy.c need to define __NO_STRING_INLINES and NO_MEMPCPY_STPCPY_REDIRECT. It ought to be possible to clean this up so we don't need to do this - it's not necessary for all the other string ifuncs, after all - but I might let someone who understands ifuncs better than me do that. * string/string.h (__mempcpy_inline): Delete. * sysdeps/x86_64/multiarch/mempcpy.c * sysdeps/x86_64/multiarch/stpcpy.c: Define NO_MEMPCPY_STPCPY_REDIRECT and __NO_STRING_INLINES before including string.h. --- ChangeLog | 8 ++++++++ string/string.h | 17 ----------------- sysdeps/x86_64/multiarch/mempcpy.c | 2 ++ sysdeps/x86_64/multiarch/stpcpy.c | 2 ++ 4 files changed, 12 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index d33157eaef..2d81375287 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2017-06-20 Zack Weinberg + + * string/string.h (__mempcpy_inline): Delete. + * sysdeps/x86_64/multiarch/mempcpy.c + * sysdeps/x86_64/multiarch/stpcpy.c: + Define NO_MEMPCPY_STPCPY_REDIRECT and __NO_STRING_INLINES + before including string.h. + 2017-06-20 Paul A. Clarke * benchtests/Makefile (bench-math): Add powf. diff --git a/string/string.h b/string/string.h index 3b68579c2e..5aec0efe7f 100644 --- a/string/string.h +++ b/string/string.h @@ -494,23 +494,6 @@ extern char *basename (const char *__filename) __THROW __nonnull ((1)); # endif #endif -#if defined __USE_GNU && defined __OPTIMIZE__ \ - && defined __extern_always_inline && __GNUC_PREREQ (3,2) -# if !defined _FORCE_INLINES && !defined _HAVE_STRING_ARCH_mempcpy - -#define mempcpy(dest, src, n) __mempcpy_inline (dest, src, n) -#define __mempcpy(dest, src, n) __mempcpy_inline (dest, src, n) - -__extern_always_inline void * -__mempcpy_inline (void *__restrict __dest, - const void *__restrict __src, size_t __n) -{ - return (char *) memcpy (__dest, __src, __n) + __n; -} - -# endif -#endif - __END_DECLS #endif /* string.h */ diff --git a/sysdeps/x86_64/multiarch/mempcpy.c b/sysdeps/x86_64/multiarch/mempcpy.c index f6e9b8acc0..e627b0082c 100644 --- a/sysdeps/x86_64/multiarch/mempcpy.c +++ b/sysdeps/x86_64/multiarch/mempcpy.c @@ -23,6 +23,8 @@ #if defined SHARED && IS_IN (libc) # define mempcpy __redirect_mempcpy # define __mempcpy __redirect___mempcpy +# define NO_MEMPCPY_STPCPY_REDIRECT +# define __NO_STRING_INLINES # include # undef mempcpy # undef __mempcpy diff --git a/sysdeps/x86_64/multiarch/stpcpy.c b/sysdeps/x86_64/multiarch/stpcpy.c index 7043584ba8..b66237e29b 100644 --- a/sysdeps/x86_64/multiarch/stpcpy.c +++ b/sysdeps/x86_64/multiarch/stpcpy.c @@ -22,6 +22,8 @@ # define _HAVE_STRING_ARCH_stpcpy 1 # define stpcpy __redirect_stpcpy # define __stpcpy __redirect___stpcpy +# define NO_MEMPCPY_STPCPY_REDIRECT +# define __NO_STRING_INLINES # include # undef stpcpy # undef __stpcpy