]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix Hurd glibc build with GCC 8.
authorJoseph Myers <joseph@codesourcery.com>
Tue, 24 Apr 2018 16:33:47 +0000 (16:33 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Tue, 24 Apr 2018 16:33:47 +0000 (16:33 +0000)
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.

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

ChangeLog
sysdeps/mach/hurd/dl-sysdep.c

index 67c129b47d9524cde9abae67e8901d47b1bd5f5a..efa8d39391db3fc96ab8bb5bbf97cbd154c2e92c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 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.
+
        * sysdeps/unix/sysv/linux/sys/ptrace.h
        (PTRACE_SECCOMP_GET_METADATA): New enum value and macro.
        * sysdeps/unix/sysv/linux/bits/ptrace-shared.h
index cbf4e058629373d32047d159300ab5935c2060e1..547108805e5213ef734bca549822bce92c97066a 100644 (file)
@@ -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.  */