This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RFC: Fix powerpc64 build with GCC 5.0


Hi,

Testing GLIBC build with GCC 5.0 I am now seeing this failure:

In file included from ../sysdeps/powerpc/nptl/tls.h:48:0,
                 from ../include/errno.h:27,
                 from ../sysdeps/unix/sysv/linux/utimensat.c:19:
../sysdeps/unix/sysv/linux/utimensat.c: In function ‘utimensat’:
../sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h:250:54: error: ‘sizeof’ on array function parameter ‘tsp’ will return size of ‘const struct timespec *’ [-Werror=sizeof-array-argument]
  if (__builtin_classify_type (__arg3) != 5 && sizeof (__arg3) > 8) \
                                                      ^
../sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h:255:2: note: in expansion of macro ‘LOADARGS_3’
  LOADARGS_3(name, __arg1, __arg2, __arg3); \
  ^
../sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h:203:5: note: in expansion of macro ‘LOADARGS_4’
     LOADARGS_##nr (name, ##args);     \
     ^
../sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h:218:3: note: in expansion of macro ‘INTERNAL_SYSCALL_NCS’
   INTERNAL_SYSCALL_NCS (__NR_##name, err, nr, args)
   ^
../sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h:178:23: note: in expansion of macro ‘INTERNAL_SYSCALL’
     long int sc_ret = INTERNAL_SYSCALL (name, sc_err, nr, args); \
                       ^
../sysdeps/unix/sysv/linux/utimensat.c:38:10: note: in expansion of macro ‘INLINE_SYSCALL’
   return INLINE_SYSCALL (utimensat, 4, fd, file, tsp, flags);
          ^
../sysdeps/unix/sysv/linux/utimensat.c:29:60: note: declared here
 utimensat (int fd, const char *file, const struct timespec tsp[2],

And this comes from sysdep.h:

        if (__builtin_classify_type (__arg3) != 5 && sizeof (__arg3) > 8) \
          __illegally_sized_syscall_arg3 (); \

My understanding is since we already testing if argument is a 'pointer_type_class'
(__builtin_classify_type equal to 5), thus the sizeof test is superfluous.  Would be
a correct fix to just remove these tests? Thoughts?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]