mbox series

[v6,00/13] port C-SKY to glibc

Message ID cover.1543283180.git.han_mao@c-sky.com
Headers show
Series port C-SKY to glibc | expand

Message

=?UTF-8?B?5q+b5pmX?= Nov. 29, 2018, 3:32 a.m. UTC
It is the sixth patchset for C-SKY port. Base on commit
2bd0bfcc6857f1fde2bd9716dc103333ebaa6807 (27 Nov). Two abi combinations
are supported with this patch: C-SKY ABIV2 with (soft float & little endian,
hard float & little endian). CK807(ef), CK810(ef), CK860 are the
accroding supported processor cores to the C-SKY V2 abi;
f stands for FPU co-processor; e stands for DSP co-processor. Our
gcc ,binutils, linux kernel support are all in the trunck now.
This patchset is tested with gcc(9.0), binutil(2.31), linux(4.20),
from the official respository:
1. GCC commit:
65892c4d0c3e2f03fec2d4c340d72c4aceabb7f1
2. Binutils commit:
9c3adfb9a409a240bb4cf087f0adeb8b1472f67a
3. Linux commit: (4.20-rc4)
2e6e902d185027f8e3cb8b7305238f7e35d6a436

CSKY V2 ABI manual:
https://github.com/c-sky/csky-doc/blob/master/C-SKY_V2_CPU_Applications_Binary_Interface_Standards_Manual.pdf
CSKY architecture user guide:
https://github.com/c-sky/csky-doc/blob/master/CSKY%20Architecture%20user_guide.pdf
IFUNC, ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA, static PIE is not support
with this patchset.

It seems quite hard to valuate the effect of remove restriction on 
init-array check in gcc configure. We don't know much about what it will
affect, and can not help to verify this on other platform.
I want to keep the --enable-initfini-array in build-many-glibcs.py
until someone can help make init-array check work for cross compile.

The *xstat patch use __NR_fstatat64/__NR_fstat64 on conditionals.
Current unistd.h define __NR_fstatat64 to __NR3264_fstatat for 32-bit
platform, C-SKY will get some compile error with current kernel header,
so I added some conditionals in unistd.h for test:
+#if defined(__ARCH_WANT_NEW_STAT) || defined(__ARCH_WANT_STAT64)
#define __NR_fstatat64 __NR3264_fstatat
#define __NR_fstat64 __NR3264_fstat
+#endif

C-SKY ABIV2 soft float little endian:
UNSUPPORTED: crypt/cert
FAIL: malloc/tst-malloc-usable-tunables
UNSUPPORTED: malloc/tst-mallocstate
UNSUPPORTED: math/test-matherr
UNSUPPORTED: math/test-matherr-2
UNSUPPORTED: misc/tst-ofdlocks-compat
UNSUPPORTED: misc/tst-pkey
UNSUPPORTED: misc/tst-ttyname
UNSUPPORTED: nptl/test-cond-printers
UNSUPPORTED: nptl/test-condattr-printers
UNSUPPORTED: nptl/test-mutex-printers
UNSUPPORTED: nptl/test-mutexattr-printers
UNSUPPORTED: nptl/test-rwlock-printers
UNSUPPORTED: nptl/test-rwlockattr-printers
FAIL: nptl/tst-_res1
FAIL: nptl/tst-thread_local1
UNSUPPORTED: nss/tst-nss-test3
UNSUPPORTED: posix/tst-glob_lstat_compat
UNSUPPORTED: posix/tst-spawn4-compat
UNSUPPORTED: posix/tst-sysconf-empty-chroot
UNSUPPORTED: resolv/tst-p_secstodate
UNSUPPORTED: resolv/tst-resolv-ai_idn
UNSUPPORTED: resolv/tst-resolv-ai_idn-latin1
UNSUPPORTED: resolv/tst-resolv-res_init
UNSUPPORTED: resolv/tst-resolv-res_init-thread
UNSUPPORTED: resolv/tst-resolv-threads
UNSUPPORTED: stdlib/test-bz22786
UNSUPPORTED: string/test-bcopy
UNSUPPORTED: string/test-memmove
FAIL: sunrpc/bug20790
UNSUPPORTED: time/tst-y2039
Summary of test results:
      4 FAIL
   5027 PASS
     27 UNSUPPORTED
     19 XFAIL
 
C-SKY ABIV2 hard float little endian:
UNSUPPORTED: crypt/cert
FAIL: malloc/tst-malloc-usable-tunables
UNSUPPORTED: malloc/tst-mallocstate
UNSUPPORTED: math/test-matherr
UNSUPPORTED: math/test-matherr-2
UNSUPPORTED: misc/tst-ofdlocks-compat
UNSUPPORTED: misc/tst-pkey
UNSUPPORTED: misc/tst-ttyname
UNSUPPORTED: nptl/test-cond-printers
UNSUPPORTED: nptl/test-condattr-printers
UNSUPPORTED: nptl/test-mutex-printers
UNSUPPORTED: nptl/test-mutexattr-printers
UNSUPPORTED: nptl/test-rwlock-printers
UNSUPPORTED: nptl/test-rwlockattr-printers
FAIL: nptl/tst-_res1
FAIL: nptl/tst-thread_local1
UNSUPPORTED: nss/tst-nss-test3
FAIL: posix/tst-chmod
UNSUPPORTED: posix/tst-glob_lstat_compat
UNSUPPORTED: posix/tst-spawn4-compat
UNSUPPORTED: posix/tst-sysconf-empty-chroot
UNSUPPORTED: resolv/tst-p_secstodate
UNSUPPORTED: resolv/tst-resolv-ai_idn
UNSUPPORTED: resolv/tst-resolv-ai_idn-latin1
UNSUPPORTED: resolv/tst-resolv-res_init
UNSUPPORTED: resolv/tst-resolv-res_init-thread
UNSUPPORTED: resolv/tst-resolv-threads
UNSUPPORTED: stdlib/test-bz22786
UNSUPPORTED: string/test-bcopy
UNSUPPORTED: string/test-memmove
FAIL: sunrpc/bug20790
UNSUPPORTED: time/tst-y2039
Summary of test results:
      5 FAIL
   5026 PASS
     27 UNSUPPORTED
     19 XFAIL

Detail result:
https://github.com/c-sky/test-result/blob/master/glibc/glibc_2.28.9_patch_v6_810f_test_result.tar.gz
https://github.com/c-sky/test-result/blob/master/glibc/glibc_2.28.9_patch_v6_build_many_log.tar.gz

FAIL cases:
1. nptl/tst-thread_local1
   seems lack c++ support, the gcc frountend can not generate constructor
   and destructor for static, anonymous_namespace and extern variables.
2. sunrpc/bug20790
   It fails because the testing environment lacks native cpp.
3. malloc/tst-malloc-usable-tunables
   It fails because liunx use mmap to alloc space for vdso and cause brk
   fail. Wait for our linux kernel to fix it.
4. nptl/tst-_res1
   It fails because symbol _res is incorrect linked.
 
5. posix/tst-chmod
   tst-chmod may pass after retry.
 
6. The following three cases some time get into deadlock when the child
   return before the parent thread start to wait. I don know what is
   the expect behaviour under this condition.
   misc/tst-clone3
   tst-mallocfork
   tst-mallocfork2

Changes since v5:
  - remove big endian support forgot to remove in patch v5
  - modify new fxstat, fxstatat, lxstat, xstat implementation to generic
    version
  - only define FE_NOMASK_ENV for hard float

Changes since v4:
  - update the abilist
  - update ulps
  - use init-array to replace ctri/crtn
  - remove libnsl.abilist
  - use generic procfs.h shm.h mman.h
  - add conditionals in fpu_control.h and fenv.h to support both hard float
    and soft float
  - fxstat, fxstatat, lxstat, xstat implemented with statx
 
Changes since v3:
  - update the abilist
  - update ulps
  - update version to 2.29
  - coding style and conventions
  - cleanup unnecessary linux syscall
  - remove support for big endian
  - fix hard float exception handle
  - assembly optimize memcopy, memmove, ...  with vdsp and byte extract
    instruction. our hardware can ld/st word form unalign address directly.

Changes since v2:
  - update the abilist
  - update ulps
  - cleanup unnecessary linux syscall
  - remove support for ABIV1
  - add one-line description for many files
  - put ABIV2 code into seperate folder
  - cleanup ucontext.h namespace
  - cleanup linux/csky/Version
  - add with_fp_cond support to distinguish soft float
  - remove PF_X in stackinfo
  - add abi check in preconfigure
  - support build-many-glibcs.py
  - fix pointer guard acquisition
 
Changes since v1:
  - update the changelog format
  - clean up unnecessary legacy code and odd comments
  - add rel description and fix EM_CSKY check
  - remove some arch-specific implementation
  - remove DEPRECATED linux syscall support
  - support pointer mangling

Mao Han (13):
  C-SKY: ABI related code
  C-SKY: TLS support
  C-SKY: Math support
  C-SKY: NPTL support and Atomic
  C-SKY: Linux Syscall Interface
  C-SKY: Linux ABI
  C-SKY: ABI Lists
  C-SKY: Linux Startup and Dynamic Loading Code
  C-SKY: Add dynamic relocations to elf.h
  C-SKY: Build Infastructure
  C-SKY: Add ABI definitions in config.h.in
  C-SKY: Add build-many-glibcs.py support
  C-SKY: Skeleton documentation

 ChangeLog                                          |  154 ++
 NEWS                                               |    6 +
 README                                             |    1 +
 config.h.in                                        |    6 +
 elf/elf.h                                          |   67 +-
 scripts/build-many-glibcs.py                       |   10 +
 sysdeps/csky/Implies                               |    5 +
 sysdeps/csky/Makefile                              |    9 +
 sysdeps/csky/abiv2/__longjmp.S                     |   61 +
 sysdeps/csky/abiv2/csky-mcount.S                   |   67 +
 sysdeps/csky/abiv2/dl-trampoline.S                 |   50 +
 sysdeps/csky/abiv2/memcmp.S                        |  142 ++
 sysdeps/csky/abiv2/memcpy.S                        |  238 +++
 sysdeps/csky/abiv2/memmove.S                       |    1 +
 sysdeps/csky/abiv2/memset.S                        |   98 +
 sysdeps/csky/abiv2/setjmp.S                        |   77 +
 sysdeps/csky/abiv2/start.S                         |  108 +
 sysdeps/csky/abiv2/strcmp.S                        |  156 ++
 sysdeps/csky/abiv2/strcpy.S                        |  127 ++
 sysdeps/csky/abiv2/strlen.S                        |  102 +
 sysdeps/csky/abiv2/tls-macros.h                    |   55 +
 sysdeps/csky/abort-instr.h                         |    2 +
 sysdeps/csky/atomic-machine.h                      |   77 +
 sysdeps/csky/bits/endian.h                         |   10 +
 sysdeps/csky/bits/fenv.h                           |  111 ++
 sysdeps/csky/bits/link.h                           |   55 +
 sysdeps/csky/bits/setjmp.h                         |   34 +
 sysdeps/csky/bsd-_setjmp.S                         |    1 +
 sysdeps/csky/bsd-setjmp.S                          |    1 +
 sysdeps/csky/configure                             |    4 +
 sysdeps/csky/configure.ac                          |    4 +
 sysdeps/csky/dl-machine.h                          |  362 ++++
 sysdeps/csky/dl-procinfo.c                         |   62 +
 sysdeps/csky/dl-procinfo.h                         |   59 +
 sysdeps/csky/dl-sysdep.h                           |   23 +
 sysdeps/csky/dl-tls.h                              |   26 +
 sysdeps/csky/fpu/fclrexcpt.c                       |   42 +
 sysdeps/csky/fpu/fedisblxcpt.c                     |   41 +
 sysdeps/csky/fpu/feenablxcpt.c                     |   40 +
 sysdeps/csky/fpu/fegetenv.c                        |   37 +
 sysdeps/csky/fpu/fegetexcept.c                     |   32 +
 sysdeps/csky/fpu/fegetmode.c                       |   28 +
 sysdeps/csky/fpu/fegetround.c                      |   34 +
 sysdeps/csky/fpu/feholdexcpt.c                     |   34 +
 sysdeps/csky/fpu/fenv_libc.h                       |   30 +
 sysdeps/csky/fpu/fenv_private.h                    |  280 +++
 sysdeps/csky/fpu/fesetenv.c                        |   59 +
 sysdeps/csky/fpu/fesetexcept.c                     |   33 +
 sysdeps/csky/fpu/fesetmode.c                       |   33 +
 sysdeps/csky/fpu/fesetround.c                      |   32 +
 sysdeps/csky/fpu/feupdateenv.c                     |   46 +
 sysdeps/csky/fpu/fgetexcptflg.c                    |   32 +
 sysdeps/csky/fpu/fix-fp-int-convert-overflow.h     |   33 +
 sysdeps/csky/fpu/fraiseexcpt.c                     |  126 ++
 sysdeps/csky/fpu/fsetexcptflg.c                    |   43 +
 sysdeps/csky/fpu/ftestexcept.c                     |   30 +
 sysdeps/csky/fpu/libm-test-ulps                    | 1640 +++++++++++++++
 sysdeps/csky/fpu/libm-test-ulps-name               |    1 +
 sysdeps/csky/fpu_control.h                         |  148 ++
 sysdeps/csky/gccframe.h                            |   21 +
 sysdeps/csky/jmpbuf-unwind.h                       |   48 +
 sysdeps/csky/ldsodefs.h                            |   42 +
 sysdeps/csky/libc-tls.c                            |   32 +
 sysdeps/csky/linkmap.h                             |    4 +
 sysdeps/csky/machine-gmon.h                        |   32 +
 sysdeps/csky/memusage.h                            |   21 +
 sysdeps/csky/nofpu/Implies                         |    1 +
 sysdeps/csky/nofpu/libm-test-ulps                  | 1694 ++++++++++++++++
 sysdeps/csky/nofpu/libm-test-ulps-name             |    1 +
 sysdeps/csky/nptl/Makefile                         |   20 +
 sysdeps/csky/nptl/bits/pthreadtypes-arch.h         |   70 +
 sysdeps/csky/nptl/bits/semaphore.h                 |   35 +
 sysdeps/csky/nptl/pthread-offsets.h                |    5 +
 sysdeps/csky/nptl/pthreaddef.h                     |   32 +
 sysdeps/csky/nptl/tcb-offsets.sym                  |   10 +
 sysdeps/csky/nptl/tls.h                            |  156 ++
 sysdeps/csky/preconfigure                          |   37 +
 sysdeps/csky/sfp-machine.h                         |   50 +
 sysdeps/csky/sotruss-lib.c                         |   49 +
 sysdeps/csky/stackinfo.h                           |   29 +
 sysdeps/csky/sysdep.h                              |   84 +
 sysdeps/csky/tininess.h                            |    1 +
 sysdeps/csky/tst-audit.h                           |   23 +
 sysdeps/unix/sysv/linux/csky/Implies               |    3 +
 sysdeps/unix/sysv/linux/csky/Makefile              |    8 +
 sysdeps/unix/sysv/linux/csky/Versions              |    5 +
 .../unix/sysv/linux/csky/abiv2/____longjmp_chk.S   |   81 +
 sysdeps/unix/sysv/linux/csky/abiv2/clone.S         |   94 +
 sysdeps/unix/sysv/linux/csky/abiv2/getcontext.S    |   73 +
 sysdeps/unix/sysv/linux/csky/abiv2/setcontext.S    |   96 +
 sysdeps/unix/sysv/linux/csky/abiv2/swapcontext.S   |   78 +
 sysdeps/unix/sysv/linux/csky/abiv2/syscall.S       |   67 +
 sysdeps/unix/sysv/linux/csky/abiv2/sysdep.S        |   65 +
 sysdeps/unix/sysv/linux/csky/abiv2/ucontext_i.sym  |   32 +
 sysdeps/unix/sysv/linux/csky/bits/procfs.h         |   34 +
 sysdeps/unix/sysv/linux/csky/bits/shmlba.h         |   29 +
 sysdeps/unix/sysv/linux/csky/c++-types.data        |   67 +
 sysdeps/unix/sysv/linux/csky/configure             |    4 +
 sysdeps/unix/sysv/linux/csky/configure.ac          |    5 +
 sysdeps/unix/sysv/linux/csky/ipc_priv.h            |   21 +
 sysdeps/unix/sysv/linux/csky/jmp_buf-macros.h      |    6 +
 sysdeps/unix/sysv/linux/csky/kernel-features.h     |   29 +
 sysdeps/unix/sysv/linux/csky/ld.abilist            |    9 +
 sysdeps/unix/sysv/linux/csky/ldconfig.h            |   34 +
 .../unix/sysv/linux/csky/libBrokenLocale.abilist   |    1 +
 sysdeps/unix/sysv/linux/csky/libanl.abilist        |    4 +
 sysdeps/unix/sysv/linux/csky/libc.abilist          | 2086 ++++++++++++++++++++
 sysdeps/unix/sysv/linux/csky/libcrypt.abilist      |    2 +
 sysdeps/unix/sysv/linux/csky/libdl.abilist         |    9 +
 sysdeps/unix/sysv/linux/csky/libm.abilist          |  753 +++++++
 sysdeps/unix/sysv/linux/csky/libpthread.abilist    |  235 +++
 sysdeps/unix/sysv/linux/csky/libresolv.abilist     |   79 +
 sysdeps/unix/sysv/linux/csky/librt.abilist         |   35 +
 sysdeps/unix/sysv/linux/csky/libthread_db.abilist  |   40 +
 sysdeps/unix/sysv/linux/csky/libutil.abilist       |    6 +
 sysdeps/unix/sysv/linux/csky/localplt.data         |   19 +
 sysdeps/unix/sysv/linux/csky/makecontext.c         |   74 +
 sysdeps/unix/sysv/linux/csky/profil-counter.h      |   31 +
 sysdeps/unix/sysv/linux/csky/pt-vfork.S            |    1 +
 sysdeps/unix/sysv/linux/csky/register-dump.h       |  193 ++
 sysdeps/unix/sysv/linux/csky/shlib-versions        |    9 +
 sysdeps/unix/sysv/linux/csky/sigcontextinfo.h      |   32 +
 sysdeps/unix/sysv/linux/csky/sys/cachectl.h        |   38 +
 sysdeps/unix/sysv/linux/csky/sys/ucontext.h        |   90 +
 sysdeps/unix/sysv/linux/csky/sys/user.h            |   64 +
 sysdeps/unix/sysv/linux/csky/syscalls.list         |    2 +
 sysdeps/unix/sysv/linux/csky/sysdep.h              |  534 +++++
 127 files changed, 12898 insertions(+), 1 deletion(-)
 create mode 100644 sysdeps/csky/Implies
 create mode 100644 sysdeps/csky/Makefile
 create mode 100644 sysdeps/csky/abiv2/__longjmp.S
 create mode 100644 sysdeps/csky/abiv2/csky-mcount.S
 create mode 100644 sysdeps/csky/abiv2/dl-trampoline.S
 create mode 100644 sysdeps/csky/abiv2/memcmp.S
 create mode 100644 sysdeps/csky/abiv2/memcpy.S
 create mode 100644 sysdeps/csky/abiv2/memmove.S
 create mode 100644 sysdeps/csky/abiv2/memset.S
 create mode 100644 sysdeps/csky/abiv2/setjmp.S
 create mode 100644 sysdeps/csky/abiv2/start.S
 create mode 100644 sysdeps/csky/abiv2/strcmp.S
 create mode 100644 sysdeps/csky/abiv2/strcpy.S
 create mode 100644 sysdeps/csky/abiv2/strlen.S
 create mode 100644 sysdeps/csky/abiv2/tls-macros.h
 create mode 100644 sysdeps/csky/abort-instr.h
 create mode 100644 sysdeps/csky/atomic-machine.h
 create mode 100644 sysdeps/csky/bits/endian.h
 create mode 100644 sysdeps/csky/bits/fenv.h
 create mode 100644 sysdeps/csky/bits/link.h
 create mode 100644 sysdeps/csky/bits/setjmp.h
 create mode 100644 sysdeps/csky/bsd-_setjmp.S
 create mode 100644 sysdeps/csky/bsd-setjmp.S
 create mode 100644 sysdeps/csky/configure
 create mode 100644 sysdeps/csky/configure.ac
 create mode 100644 sysdeps/csky/dl-machine.h
 create mode 100644 sysdeps/csky/dl-procinfo.c
 create mode 100644 sysdeps/csky/dl-procinfo.h
 create mode 100644 sysdeps/csky/dl-sysdep.h
 create mode 100644 sysdeps/csky/dl-tls.h
 create mode 100644 sysdeps/csky/fpu/fclrexcpt.c
 create mode 100644 sysdeps/csky/fpu/fedisblxcpt.c
 create mode 100644 sysdeps/csky/fpu/feenablxcpt.c
 create mode 100644 sysdeps/csky/fpu/fegetenv.c
 create mode 100644 sysdeps/csky/fpu/fegetexcept.c
 create mode 100644 sysdeps/csky/fpu/fegetmode.c
 create mode 100644 sysdeps/csky/fpu/fegetround.c
 create mode 100644 sysdeps/csky/fpu/feholdexcpt.c
 create mode 100644 sysdeps/csky/fpu/fenv_libc.h
 create mode 100644 sysdeps/csky/fpu/fenv_private.h
 create mode 100644 sysdeps/csky/fpu/fesetenv.c
 create mode 100644 sysdeps/csky/fpu/fesetexcept.c
 create mode 100644 sysdeps/csky/fpu/fesetmode.c
 create mode 100644 sysdeps/csky/fpu/fesetround.c
 create mode 100644 sysdeps/csky/fpu/feupdateenv.c
 create mode 100644 sysdeps/csky/fpu/fgetexcptflg.c
 create mode 100644 sysdeps/csky/fpu/fix-fp-int-convert-overflow.h
 create mode 100644 sysdeps/csky/fpu/fraiseexcpt.c
 create mode 100644 sysdeps/csky/fpu/fsetexcptflg.c
 create mode 100644 sysdeps/csky/fpu/ftestexcept.c
 create mode 100644 sysdeps/csky/fpu/libm-test-ulps
 create mode 100644 sysdeps/csky/fpu/libm-test-ulps-name
 create mode 100644 sysdeps/csky/fpu_control.h
 create mode 100644 sysdeps/csky/gccframe.h
 create mode 100644 sysdeps/csky/jmpbuf-unwind.h
 create mode 100644 sysdeps/csky/ldsodefs.h
 create mode 100644 sysdeps/csky/libc-tls.c
 create mode 100644 sysdeps/csky/linkmap.h
 create mode 100644 sysdeps/csky/machine-gmon.h
 create mode 100644 sysdeps/csky/memusage.h
 create mode 100644 sysdeps/csky/nofpu/Implies
 create mode 100644 sysdeps/csky/nofpu/libm-test-ulps
 create mode 100644 sysdeps/csky/nofpu/libm-test-ulps-name
 create mode 100644 sysdeps/csky/nptl/Makefile
 create mode 100644 sysdeps/csky/nptl/bits/pthreadtypes-arch.h
 create mode 100644 sysdeps/csky/nptl/bits/semaphore.h
 create mode 100644 sysdeps/csky/nptl/pthread-offsets.h
 create mode 100644 sysdeps/csky/nptl/pthreaddef.h
 create mode 100644 sysdeps/csky/nptl/tcb-offsets.sym
 create mode 100644 sysdeps/csky/nptl/tls.h
 create mode 100644 sysdeps/csky/preconfigure
 create mode 100644 sysdeps/csky/sfp-machine.h
 create mode 100644 sysdeps/csky/sotruss-lib.c
 create mode 100644 sysdeps/csky/stackinfo.h
 create mode 100644 sysdeps/csky/sysdep.h
 create mode 100644 sysdeps/csky/tininess.h
 create mode 100644 sysdeps/csky/tst-audit.h
 create mode 100644 sysdeps/unix/sysv/linux/csky/Implies
 create mode 100644 sysdeps/unix/sysv/linux/csky/Makefile
 create mode 100644 sysdeps/unix/sysv/linux/csky/Versions
 create mode 100644 sysdeps/unix/sysv/linux/csky/abiv2/____longjmp_chk.S
 create mode 100644 sysdeps/unix/sysv/linux/csky/abiv2/clone.S
 create mode 100644 sysdeps/unix/sysv/linux/csky/abiv2/getcontext.S
 create mode 100644 sysdeps/unix/sysv/linux/csky/abiv2/setcontext.S
 create mode 100644 sysdeps/unix/sysv/linux/csky/abiv2/swapcontext.S
 create mode 100644 sysdeps/unix/sysv/linux/csky/abiv2/syscall.S
 create mode 100644 sysdeps/unix/sysv/linux/csky/abiv2/sysdep.S
 create mode 100644 sysdeps/unix/sysv/linux/csky/abiv2/ucontext_i.sym
 create mode 100644 sysdeps/unix/sysv/linux/csky/bits/procfs.h
 create mode 100644 sysdeps/unix/sysv/linux/csky/bits/shmlba.h
 create mode 100644 sysdeps/unix/sysv/linux/csky/c++-types.data
 create mode 100644 sysdeps/unix/sysv/linux/csky/configure
 create mode 100644 sysdeps/unix/sysv/linux/csky/configure.ac
 create mode 100644 sysdeps/unix/sysv/linux/csky/ipc_priv.h
 create mode 100644 sysdeps/unix/sysv/linux/csky/jmp_buf-macros.h
 create mode 100644 sysdeps/unix/sysv/linux/csky/kernel-features.h
 create mode 100644 sysdeps/unix/sysv/linux/csky/ld.abilist
 create mode 100644 sysdeps/unix/sysv/linux/csky/ldconfig.h
 create mode 100644 sysdeps/unix/sysv/linux/csky/libBrokenLocale.abilist
 create mode 100644 sysdeps/unix/sysv/linux/csky/libanl.abilist
 create mode 100644 sysdeps/unix/sysv/linux/csky/libc.abilist
 create mode 100644 sysdeps/unix/sysv/linux/csky/libcrypt.abilist
 create mode 100644 sysdeps/unix/sysv/linux/csky/libdl.abilist
 create mode 100644 sysdeps/unix/sysv/linux/csky/libm.abilist
 create mode 100644 sysdeps/unix/sysv/linux/csky/libpthread.abilist
 create mode 100644 sysdeps/unix/sysv/linux/csky/libresolv.abilist
 create mode 100644 sysdeps/unix/sysv/linux/csky/librt.abilist
 create mode 100644 sysdeps/unix/sysv/linux/csky/libthread_db.abilist
 create mode 100644 sysdeps/unix/sysv/linux/csky/libutil.abilist
 create mode 100644 sysdeps/unix/sysv/linux/csky/localplt.data
 create mode 100644 sysdeps/unix/sysv/linux/csky/makecontext.c
 create mode 100644 sysdeps/unix/sysv/linux/csky/profil-counter.h
 create mode 100644 sysdeps/unix/sysv/linux/csky/pt-vfork.S
 create mode 100644 sysdeps/unix/sysv/linux/csky/register-dump.h
 create mode 100644 sysdeps/unix/sysv/linux/csky/shlib-versions
 create mode 100644 sysdeps/unix/sysv/linux/csky/sigcontextinfo.h
 create mode 100644 sysdeps/unix/sysv/linux/csky/sys/cachectl.h
 create mode 100644 sysdeps/unix/sysv/linux/csky/sys/ucontext.h
 create mode 100644 sysdeps/unix/sysv/linux/csky/sys/user.h
 create mode 100644 sysdeps/unix/sysv/linux/csky/syscalls.list
 create mode 100644 sysdeps/unix/sysv/linux/csky/sysdep.h

Comments

Joseph Myers Nov. 29, 2018, 5:16 p.m. UTC | #1
On Thu, 29 Nov 2018, Mao Han wrote:

> It seems quite hard to valuate the effect of remove restriction on 
> init-array check in gcc configure. We don't know much about what it will
> affect, and can not help to verify this on other platform.

It's not your responsibility to make sure it works on all other platforms.  
You should propose the patch to enable initfini-array for cross 
compilation (subject to the existing tests that currently run in the 
native case despite being just as valid for cross-compilation), and then 
if someone discovers a platform supported by GCC, where that compilation 
test passes but initfini-array support does not work correctly, at that 
point we can look at the right way to avoid enabling initfini-array 
support for that target.

(There are other ways of ensuring GCC uses initfini-array support 
unconditionally for a target - look at what's done for Arm EABI, which 
also uses initfini-array only.  But in the first instance, fixing the 
configure test is the natural thing to do to make this work better for all 
ELF architectures.  In any case, this should be fixed so that GCC gets it 
right and no special use of --enable-initfini-array is needed in 
build-many-glibcs.py.)
=?UTF-8?B?5q+b5pmX?= Nov. 30, 2018, 3:47 a.m. UTC | #2
On Thu, Nov 29, 2018 at 05:16:58PM +0000, Joseph Myers wrote:
> (There are other ways of ensuring GCC uses initfini-array support 
> unconditionally for a target - look at what's done for Arm EABI, which 
> also uses initfini-array only.  But in the first instance, fixing the 
> configure test is the natural thing to do to make this work better for all 
> ELF architectures.  In any case, this should be fixed so that GCC gets it 
> right and no special use of --enable-initfini-array is needed in 
> build-many-glibcs.py.)
>
We trend to solve this issue like what RISC-V did, force 
gcc_cv_initfini_array=yes in config.gcc when glibc is built.
The first way may take quite a long time to find out what compilation test
is required to get things right. We'v got some question about what compilation
test should be like for C-SKY. We'v got several other C library do not use 
init-array at present. When gcc is built first time we are not able
to find out whether the C library want init-array or not, if gcc is not
rebuilt for C++, init/fini will never be called. Even if gcc is rebuilt,
we can not execute test program if it is cross-compiled. We may try to make 
init-array check in configure work later when we find ways to solve the
issues above.

Best Regards,
Mao Han
Joseph Myers Nov. 30, 2018, 3:18 p.m. UTC | #3
On Fri, 30 Nov 2018, Mao Han wrote:

> test should be like for C-SKY. We'v got several other C library do not use 
> init-array at present. When gcc is built first time we are not able

init-array is a standard ELF feature.  So if an ELF C library does not 
support it, that's a bug in that library.  So defaulting in the compiler 
to using init-array for ELF is appropriate, unless there is actual 
information that a particular target OS lacks support (and in particular, 
defaulting to using init-array is appropriate for the generic bare-metal 
targets such as *-elf and *-eabi).