]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Use libc_hidden_* for strtoumax (bug 15105).
authorJoseph Myers <joseph@codesourcery.com>
Wed, 28 Feb 2018 14:16:21 +0000 (14:16 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Wed, 28 Feb 2018 14:16:21 +0000 (14:16 +0000)
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.

[BZ #15105]
* sysdeps/wordsize-32/strtoumax.c (strtoumax): Use
libc_hidden_def.
* sysdeps/wordsize-64/strtoumax.c (strtoumax): Likewise.
* include/inttypes.h: New file.

ChangeLog
include/inttypes.h [new file with mode: 0644]
sysdeps/wordsize-32/strtoumax.c
sysdeps/wordsize-64/strtoumax.c

index 72f03aa3965140a9779d5a9f88d51c5ec47efb0d..56ef28678a3cc4c0d6388c9880594e2233078563 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2018-02-28  Joseph Myers  <joseph@codesourcery.com>
+
+       [BZ #15105]
+       * sysdeps/wordsize-32/strtoumax.c (strtoumax): Use
+       libc_hidden_def.
+       * sysdeps/wordsize-64/strtoumax.c (strtoumax): Likewise.
+       * include/inttypes.h: New file.
+
 2018-02-27  Joseph Myers  <joseph@codesourcery.com>
 
        * locale/weightwc.h (findidx): Ignore -Wmaybe-uninitialized for
diff --git a/include/inttypes.h b/include/inttypes.h
new file mode 100644 (file)
index 0000000..33219e2
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef _INTTYPES_H
+#include_next <inttypes.h>
+#ifndef _ISOMAC
+libc_hidden_proto (strtoumax)
+#endif
+#endif
index 7f19ff075601c44dc5200b6d6c34c6a3da05281c..cabd4d8c8d0269b725171a5fc9c848adb134d291 100644 (file)
@@ -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)
index bc7dd43cae83f7c47a308c37cecd398e6a50cbe3..04468458dfcc5fcbe3828d5005254ba8096f81e6 100644 (file)
@@ -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)