From patchwork Tue Feb 27 17:57:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 26108 Received: (qmail 118082 invoked by alias); 27 Feb 2018 17:57:10 -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 118070 invoked by uid 89); 27 Feb 2018 17:57:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS, URIBL_RED autolearn=ham version=3.3.2 spammy= X-HELO: relay1.mentorg.com Date: Tue, 27 Feb 2018 17:57:03 +0000 From: Joseph Myers To: Subject: Use libc_hidden_* for strtoumax (bug 15105) Message-ID: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 X-ClientProxiedBy: svr-ies-mbx-02.mgc.mentorg.com (139.181.222.2) To SVR-IES-MBX-03.mgc.mentorg.com (139.181.222.3) On sparc, localplt test failures appear when building with -Os because of a call to strtoumax from sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c, and strtoumax is not inlined when building with -Os. This patch fixes those failures by using libc_hidden_proto and libc_hidden_def for strtoumax. Tested with build-many-glibcs.py for sparc64-linux-gnu-disable-multi-arch, sparc64-linux-gnu, sparcv9-linux-gnu-disable-multi-arch, sparcv9-linux-gnu that this fixes that test failure with -Os. 2018-02-27 Joseph Myers [BZ #15105] * sysdeps/wordsize-32/strtoumax.c (strtoumax): Use libc_hidden_def. * sysdeps/wordsize-64/strtoumax.c (strtoumax): Likewise. * include/inttypes.h: New file. diff --git a/include/inttypes.h b/include/inttypes.h new file mode 100644 index 0000000..33219e2 --- /dev/null +++ b/include/inttypes.h @@ -0,0 +1,6 @@ +#ifndef _INTTYPES_H +#include_next +#ifndef _ISOMAC +libc_hidden_proto (strtoumax) +#endif +#endif diff --git a/sysdeps/wordsize-32/strtoumax.c b/sysdeps/wordsize-32/strtoumax.c index 7f19ff0..cabd4d8 100644 --- a/sysdeps/wordsize-32/strtoumax.c +++ b/sysdeps/wordsize-32/strtoumax.c @@ -25,3 +25,4 @@ strtoumax (const char *__restrict nptr, char **__restrict endptr, int base) { return __strtoull_internal (nptr, endptr, base, 0); } +libc_hidden_def (strtoumax) diff --git a/sysdeps/wordsize-64/strtoumax.c b/sysdeps/wordsize-64/strtoumax.c index bc7dd43..0446845 100644 --- a/sysdeps/wordsize-64/strtoumax.c +++ b/sysdeps/wordsize-64/strtoumax.c @@ -25,3 +25,4 @@ strtoumax (const char *__restrict nptr, char **__restrict endptr, int base) { return __strtoul_internal (nptr, endptr, base, 0); } +libc_hidden_def (strtoumax)