public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* Fix Hurd glibc build with GCC 8 [committed]
@ 2018-04-24 16:34 Joseph Myers
  2018-04-24 16:46 ` Samuel Thibault
  0 siblings, 1 reply; 2+ messages in thread
From: Joseph Myers @ 2018-04-24 16:34 UTC (permalink / raw)
  To: libc-alpha

The build of glibc for Hurd has been failing with GCC mainline because
of the checks that aliases have the same type as the symbol aliased;
the Hurd dl-sysdep.c has a macro that defines aliases without using
the proper type.  When GCC 8 branches (soon), I intend to make it the
default version in build-many-glibcs.py, so these failures would mean
the default build-many-glibcs.py build fails for Hurd again.

This patch fixes the Hurd build with GCC 8 by changing the macro that
defines the problem aliases to use the correct type for them.  An
include of <not-errno.h> is needed to avoid this use of typeof
resulting in an error for __access_noerrno not being declared.

Tested compilation for i686-gnu with build-many-glibcs.py.  Committed.

2018-04-24  Joseph Myers  <joseph@codesourcery.com>

	* sysdeps/mach/hurd/dl-sysdep.c: Include <not-errno.h>.
	(check_no_hidden): Use type of original function when declaring
	alias.

diff --git a/sysdeps/mach/hurd/dl-sysdep.c b/sysdeps/mach/hurd/dl-sysdep.c
index cbf4e05..5471088 100644
--- a/sysdeps/mach/hurd/dl-sysdep.c
+++ b/sysdeps/mach/hurd/dl-sysdep.c
@@ -46,6 +46,7 @@
 #include <dl-procinfo.h>
 
 #include <dl-tunables.h>
+#include <not-errno.h>
 
 extern void __mach_init (void);
 
@@ -278,8 +279,9 @@ _dl_sysdep_start_cleanup (void)
 
 /* This macro checks that the function does not get renamed to be hidden: we do
    need these to be overridable by libc's.  */
-#define check_no_hidden(name) \
-static void __check_##name##_no_hidden(void) __attribute__((alias(#name)));
+#define check_no_hidden(name)				\
+  static __typeof (name) __check_##name##_no_hidden	\
+       __attribute__ ((alias (#name)));
 
 /* Open FILE_NAME and return a Hurd I/O for it in *PORT, or return an
    error.  If STAT is non-zero, stat the file into that stat buffer.  */

-- 
Joseph S. Myers
joseph@codesourcery.com

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

* Re: Fix Hurd glibc build with GCC 8 [committed]
  2018-04-24 16:34 Fix Hurd glibc build with GCC 8 [committed] Joseph Myers
@ 2018-04-24 16:46 ` Samuel Thibault
  0 siblings, 0 replies; 2+ messages in thread
From: Samuel Thibault @ 2018-04-24 16:46 UTC (permalink / raw)
  To: Joseph Myers; +Cc: libc-alpha

Joseph Myers, le mar. 24 avril 2018 16:34:22 +0000, a ecrit:
> Tested compilation for i686-gnu with build-many-glibcs.py.  Committed.

Thanks :)

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

end of thread, other threads:[~2018-04-24 16:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-24 16:34 Fix Hurd glibc build with GCC 8 [committed] Joseph Myers
2018-04-24 16:46 ` Samuel Thibault

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