[PATCH v5 00/14] port C-SKY to glibc

Mao Han han_mao@c-sky.com
Wed Nov 21 08:11:00 GMT 2018


On Mon, Nov 19, 2018 at 04:45:09PM +0000, Joseph Myers wrote:
> The correct thing to do there is to fix the GCC configure test so you 
> don't need --enable-initfini-array in build-many-glibcs.py.
> 
> As far as I can tell, in the current version of the gcc_AC_INITFINI_ARRAY 
> test, the only part that's an execution test is the ia64 case.  That is, 
> for every other target, the 'if test "x${build}" = "x${target}" && test 
> "x${build}" = "x${host}"' condition is bogus as the rest of the tests 
> would work just as well for cross compilation.  (In the ia64 case, the 
> fourth argument to AC_RUN_IFELSE - the action if cross compiling - is 
> already there.  So simply removing the requirement for build = host = 
> target should allow things to work for cross compiling as well as for 
> native except on ia64, and someone using ia64 could always fix that case 
> later to have better cross compilation defaults based on the target OS.)
> 
Thanks for suggestion. We will try if it works for C-SKY cross compilation.

> > Another issue is Linux kernel have remove stat64 family from default 
> > syscall set, and C-SKY dont' define __ARCH_WANT_STAT64. The generic
> > version seems can't work without stat64. So I added fxstat, fxstatat, 
> > lxstat, xstat implemented with statx for C-SKY.
> 
> I am supposing this is the preferred default for all future architectures 
> added to the Linux kernel - they won't have the stat64 syscalls because 
> the relevant functions are supposed to be implemented in userspace using 
> statx instead.
> 
> If so, the implementations in terms of statx do not belong in a csky 
> sysdeps directory.  Rather, all the 
> sysdeps/unix/sysv/linux/generic/wordsize-32/ implementations should gain 
> appropriate conditionals, so that if __NR_<whatever-old-syscall> is 
> defined they follow the existing logic, and if it's not defined they 
> follow the logic to use statx instead.
>

I'v modified patch 14/14 to a generic version with __NR3264_fstatat
conditionals (in the attachment). It is tested in the same environment
as patch V5 and got same result, but have't test fstat64 path yet.

> 
> >   - remove support for big endian
> 
> I'd expect an explicit error somewhere (either header #error of in the 
> preconfigure script) for an attempt to build for big endian.
>
I forget to remove big endian part while making patch v5, there was a #error
in bits/endian.h in patch v4. Thanks for reminding. 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-statx-conditionals-for-wordsize-32-xstat.c.patch
Type: text/x-diff
Size: 16613 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20181121/a5d11a2b/attachment.bin>


More information about the Libc-alpha mailing list