public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* Use libc_hidden_* for strtoumax (bug 15105)
@ 2018-02-27 18:19 Joseph Myers
  2018-02-28 12:56 ` Andreas Schwab
  0 siblings, 1 reply; 2+ messages in thread
From: Joseph Myers @ 2018-02-27 18:19 UTC (permalink / raw)
  To: libc-alpha

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  <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.

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 <inttypes.h>
+#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)

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Use libc_hidden_* for strtoumax (bug 15105)
  2018-02-27 18:19 Use libc_hidden_* for strtoumax (bug 15105) Joseph Myers
@ 2018-02-28 12:56 ` Andreas Schwab
  0 siblings, 0 replies; 2+ messages in thread
From: Andreas Schwab @ 2018-02-28 12:56 UTC (permalink / raw)
  To: Joseph Myers; +Cc: libc-alpha

On Feb 27 2018, Joseph Myers <joseph@codesourcery.com> wrote:

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

Ok.

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-02-28 10:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-27 18:19 Use libc_hidden_* for strtoumax (bug 15105) Joseph Myers
2018-02-28 12:56 ` Andreas Schwab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).