public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 00/11] nds32 glibc Port v1
@ 2018-05-06 14:41 vincentc
  2018-05-06 14:42 ` [PATCH 05/11] nds32: Generic <math.h> and soft-fp Routines vincentc
                   ` (11 more replies)
  0 siblings, 12 replies; 31+ messages in thread
From: vincentc @ 2018-05-06 14:41 UTC (permalink / raw)
  To: libc-alpha; +Cc: deanbo422, cnoize, vincentc

   Hi, this serious of patch contains glibc port for Andes nds32 ISA. This is a
32 bit target using Linux-generic. The nds32 port for Linux had been included in
4.17-rc1. For testing convenience, the minimum kernel version is temporarily set
as 4.16. The nds32 ports for GCC and Binutils in upstream are too old to compile
this patchset. My colleagues are trying to upload the latest patch to upstream.
Before they finish, we put workable GCC and Binutils in the private git
repository and people can use them to build nds32 glibc toolchain. By the way,
the patch of build-many-glibcs.py for Andes nds32 port does not be included in
this patchest because we need to replace all download path with our private git
repository in build-many-glibcs.py. Therefore, we provide another
build-many-glibcs.py whose name is nds32-build-many-glibcs.py for nds32 in
the nds32 glibc git repository. The git repository path of each component for
nds32 is listed as below.

1. GCC git repo path:
  path: https://github.com/andestech/gcc.git
  branch: nds32-6.3.0-open
2. Binutils git repo path:
  path: https://github.com/andestech/binutils.git 
  branch: nds32-binutils-2.30-branch-open
3. Glibc git repo
  path: https://github.com/andestech/glibc.git 
  branch: nds32-glibc-2.27-v0
  i. nds32's build-many-glibcs.py
     https://github.com/andestech/glibc/blob/nds32-glibc-2.27-v0/sysdeps/nds32/misc/nds32-build-many-glibcs.py
4. Linux git repo
  path: https://github.com/andestech/linux/commits/master 
  branch: master

  In this patchset, the port for nds32 FPU extension is not included. We plan to
add it after the FPU ports for nds32 is accepted by Linux. Therefore, we keep
some flexibility in code for the ports of nds32 FPU extension.
  The port has been cross-tested on the FPGA board running Linux 4.17-rc2. In
order to avoid false timeout, we set a large number to TIMEOUTFACTOR. In
addition, we found many testcases in conform fails because some nds32 predefined
macro lack double underscore prefix in this version nds32 gcc. This bug will be
fixed in newer nds32 gcc version which is based on gcc 8.1.0 and we will upload
it after few weeks. For testing convenience, we create a temporary patch which
add these illegal macros to ISO C90 keywords in conform/conformtest.pl to skip
these failures. This temporary patch will be removed after we upload newer nds32
gcc version to our private github. 
(Temporary patch: https://github.com/andestech/glibc/commit/8b76851ba91eed053 )

The summary of glibc testsuite is listed as follows which includs the above 
temporary patch:

Summary of test results that the extra tests are included:
    14 FAIL
  4886 PASS
    10 UNSUPPORTED

Detail result:
https://github.com/andestech/glibc/blob/nds32-glibc-2.27-v0/sysdeps/nds32/misc/glibc_final_testing_result

The reasons for the 14 FAIL cases are listed as bellow.
1. nptl (8 FAIL cases)
   i. The following 6 testcase fail because the testing environment lacks native
      python: 
      ./nptl/test-condattr-printers.test-result
      ./nptl/test-cond-printers.test-result
      ./nptl/test-mutexattr-printers.test-result
      ./nptl/test-mutex-printers.test-result
      ./nptl/test-rwlockattr-printers.test-result
      ./nptl/test-rwlock-printers.test-result

   ii.The tst-cancel7 and tst-cancel7x fails because the 1 second timeout, at
      108-th line in tst-cancel7.c, is not enough for child thread to finish all
      work before system(). In other words, parent thread executes
      xpthread_cancel () before child thread executes system(). Therefore, child
      thread cannot write self-pid on pidfile and error message 'could not read
      pid' is got. The nds32 port can pass this testing after we extend the
      timeout to 5 seconds.
2. misc (3 FAIL cases)
   i. A new flag, RWF_APPEND, for preadv2/pwritev2 is added in Linux 4.16. This
      change causes expected ENOTSUP does not be caught in misc/tst-preadvwritev2
      and misc/tst-preadvwritev64v2. The nds32 ports can pass these two cases
      after adding the new flag RWF_APPEND to sysdeps/unix/sysv/linux/bits/uio-ext.h
      and misc/ tst-preadvwritev2-common.c.
   ii.The misc/test-errno-linux occasionally fails in sendfile function because
      EINVAL is caught rather than EBADF. The reason is due to uninitialized
      local variable 'off'. When 'off' is a negative number, the errno is set as
      EINVAL in glibc sendfile function before issuing sendfile syscall. The
      nds32 port can always pass the testing after initializing variable 'off'
      to zero.
3. stdio-common (1 FAIL case)
   i. The required memory size for stdio-common/bug22 testcase is more than 2 GB
      but the DRAM size on our FPGA is just 2GB. Therefore, the errno is set as
      ENOMEM instead of EOVERFLOW.
4. sunrpc (1 FAIL case)
   i. sunrpc/bug20790 fails because the testing environment lacks native cpp
5. malloc(1 FAIL case)
   i. malloc/tst-malloc-usable-tunables randomly fails. We hadn't found the root
      causes but we found some people encountered the same failure on the
      Internet. They think this failure is due to kernel bug. Therefore, we
      temporarily treat it as a false positive case for glibc.
      (https://www.mail-archive.com/debian-glibc@lists.debian.org/msg57118.html)

We imitate the RISC-V patchset to create our patches. Che-Wei and I volunteer to
be port maintainer. Thanks to everyone who helped us and contributed to it. :)
Any feedback is welcome.

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

end of thread, other threads:[~2018-05-15 11:50 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-06 14:41 [PATCH 00/11] nds32 glibc Port v1 vincentc
2018-05-06 14:42 ` [PATCH 05/11] nds32: Generic <math.h> and soft-fp Routines vincentc
2018-05-06 14:42 ` [PATCH 08/11] nds32: Linux ABI vincentc
2018-05-08 21:18   ` Adhemerval Zanella
2018-05-09 13:34     ` Vincent Chen
2018-05-09 13:42       ` Adhemerval Zanella
2018-05-06 14:42 ` [PATCH 02/11] nds32: ABI Implementation vincentc
2018-05-12  7:15   ` Florian Weimer
2018-05-14 20:56     ` Vincent Chen
2018-05-15 11:32       ` Florian Weimer
2018-05-15 11:50         ` Vincent Chen
2018-05-06 14:42 ` [PATCH 09/11] nds32: Add ABI list vincentc
2018-05-06 14:42 ` [PATCH 11/11] Add nds32 entries to config.h.in vincentc
2018-05-06 14:42 ` [PATCH 01/11] nds32: Build Infastructure vincentc
2018-05-08 14:49   ` Joseph Myers
2018-05-09  8:32     ` Vincent Chen
2018-05-06 14:42 ` [PATCH 04/11] nds32: Startup and Dynamic Loader vincentc
2018-05-06 14:42 ` [PATCH 07/11] nds32: Linux Syscall Interface vincentc
2018-05-08 21:27   ` Adhemerval Zanella
2018-05-09 13:46     ` Vincent Chen
2018-05-09 13:57       ` Adhemerval Zanella
2018-05-10  2:58         ` Vincent Chen
2018-05-12  7:21           ` Florian Weimer
2018-05-14 21:11             ` Vincent Chen
2018-05-06 14:42 ` [PATCH 10/11] Add Andes nds32 dynamic relocation type to elf/elf.h vincentc
2018-05-06 14:42 ` [PATCH 06/11] nds32: Atomic and Locking Routines vincentc
2018-05-06 14:42 ` [PATCH 03/11] nds32: Thread-Local Storage Support vincentc
2018-05-08 14:46 ` [PATCH 00/11] nds32 glibc Port v1 Joseph Myers
2018-05-09  5:22   ` Vincent Chen
2018-05-09 12:10     ` Joseph Myers
2018-05-09 13:49       ` Vincent Chen

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