From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 335401F461 for ; Tue, 25 Jun 2019 00:11:29 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; q=dns; s=default; b=WjR 9uN26g4w6E8ZLvOYbcAGxxVNJQX1oWTvxpBFqVqzyGrmUCgYGuY4hhLF0zvKM2XV Amg0miJaZPN1d9O1ZmWFCb8cmpjs8L8XywuJpfurN+dTLAhCBLCiw5foEpCPB2sI S/Ae+ktS6rGWKfK6O4TYrU8BmBPzNmVZq+vPiMHU= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; s=default; bh=KR3hefNBO cam8SQcQT0bwo/aBxE=; b=vcEWmJXTfaRNglMFx/onDqJ3ILgrMy0GyLjAl96eJ vDO9TdFVOH6wqAjTuzvsKePvYJRas8DJSEa+0xkpAcP0DSylGI3JwFpy0F6Ht4kM jlIt2/eSWBz93b7ibqoLy4YJiNESoMkIrs+N7KqSHQZrqRqzDSjGUbwa1fZcxVEz 30= Received: (qmail 16862 invoked by alias); 25 Jun 2019 00:11:18 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 16844 invoked by uid 89); 25 Jun 2019 00:11:18 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: esa5.hgst.iphmx.com DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1561421474; x=1592957474; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=ORiMFgGXEwBhS9WXMih+aYx/KfG1M/qMhF7et+pJbo0=; b=mTUP2mHsAN46ukMXcpYOlWPzUMRt2zASB50b7dLz3OluIwqY/uVqLthe W6RuLtSay1r0xubIUNz3iNIrs0PXU9d6sRNaLzAQBlOd3SXLS4X52lTwJ UhWTBvtnSzj7yDVgLlswMYj+HPhtXaYONOJdVEJ71IG1a56ixUgPTQG/x fN7GKekob3DgD6kL9npwGwJ34iCSBXugeg8ZNmnhQJlFdwj7vHD6a7s0c zBatywcC0o4MglBvYqv7QulEoe23X/NUsCElTvn2xaVBZBenmOgaSPybv KYGGLtxO4GQvQKHCkC2Muh6xFHZlI23coM0mXmjk/QqtY75EVF8D9lP8Y w==; IronPort-SDR: 7jJtLG5lZ7ZLiPQaqHaT7RqROIUeJa18MPP0voU9R/eH8xhvY6HxAewRACLjUh1kbjZ4cn/v0w MbgBv34H4OZ8uasPZFkubSat408zx81EFA3At6M4C9Z8U9dPCh983nJPFyyH+gP8F9E4XjVV0t QmCk2PgtHuK5Fmn7zc9zVsjbt84WoQgPlO20iosEW83x9Dtv2k+kb9IAVO1VqC57UV3zOt/T45 h0KamCOxEMhgqRA40b+SaMXuON8uENxfyXoNAPhZ6mGUL1waUcWvmnZwAONrWOmDDygzvkN/Em k3agEnwBZ3mSZ96CAWtulmMr IronPort-SDR: Mz1s5VbfKVlzW/Hi7ybOxjT6H6o64MLQlthEYWPXVKrugGCRe+noLFAbJlAwImm1MuUIOUOFtn n/ZNFb/v5661jQsGDm+78JfYZMdYHQ1h2G+bYB0xwRplWVYFBTg0tCp1QXfZ1uMh4ocwXt1WSF yRbLzaVP55ORQ39ajOysIRpID2QXoY1k0UomnHIUlGEl04kcKl/FuLZb2ckuYnJ0UlPTLcAjOZ Z4KUpH/0IY1XsBulilqc25OGPglR3AUBQhkAO2FmQy4DhAQ2rm2khVY5Sr1WsPDB7NPEIHMWYv QSY= From: Alistair Francis To: libc-alpha@sourceware.org Cc: arnd@arndb.de, adhemerval.zanella@linaro.org, fweimer@redhat.com, palmer@sifive.com, macro@wdc.com, zongbox@gmail.com, zong@andestech.com, alistair.francis@wdc.com, alistair23@gmail.com Subject: [RFC v2 00/20] RISC-V glibc port for the 32-bit Date: Mon, 24 Jun 2019 17:08:43 -0700 Message-Id: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This patch set contains the glibc port for the 32-bit RISC-V. This is based on all of the work that Zong Li has done [1]. Unfortunately the Linux ABI has changed since Zong Li's latest submission. The RISC-V 32-bit (RV32) ABI no longer defines __ARCH_WANT_TIME32_SYSCALLS which means there are no 32-bit versions of time_t, off_t or any struct resource or system calls that use them. To mitigate this I have set the RV32 port to use 64-bit time_t and off_t (as is done in x86-32) and also changed the syscall imvocation to handle the missing syscalls. The first 3 patches are from Lukasz and have been sent upstream before [2]. The 4th patch is a fixup required ontop of Lukasz's patches. Patches 5 to 9 are generic ways of handling the missing syscall functions. Patch 11 changes all RISC-V implementations to use 64-bit time_t and off_t. I have tested this series by building a buildroot kernel and rootFS using these glibc patches and an upstream 5.1.12 kernel for RV32. I see hangs because of patch 8. Patch 8 (waitid) seems to cause hangs that I haven't debugged yet, it seems like we aren't handing the wait() functions correctly. Any help with this would be great. The last patch is a hack to forcefully rename the remaining system calls that are causing compiller failures to the 64-bit versions. This is obviously not the correct way to do this. I would like some feedback on this series to find the upstream approved way to use the 64-bit versions then I will extend that to these remaining functions. The ChangeLog will need to be updated as well, so don't worry too much about that. Feedback on this series is very welcome! 1: https://sourceware.org/ml/libc-alpha/2018-07/msg00892.html 2: https://sourceware.org/ml/libc-alpha/2019-05/msg00661.html RFC v2: - Add Lukasz's patches - Update the non HACK syscalls after feedback - define __ASSUME_TIME64_SYSCALLS and __ASSUME_RLIM64_SYSCALLS - Remove lockf64.c - Other smaller changes from RFC v1 --END--- Signed-off-by: Alistair Francis --- __COVER__ | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 __COVER__ diff --git a/__COVER__ b/__COVER__ new file mode 100644 index 0000000000..e69de29bb2 -- 2.22.0 Alistair Francis (7): include/time.h: Fix conflicting timespec types on 32-bit sysdeps/nanosleep: Use clock_nanosleep_time64 if avaliable sysdeps/futex: Use futex_time64 if avaliable sysdeps/gettimeofday: Use clock_gettime64 if avaliable sysdeps/wait: Use waitid if avaliable sysdeps/getrlimit: Use prlimit64 if avaliable RISC-V: Use 64-bit time_t and off_t for RV32 and RV64 Lukasz Majewski (3): y2038: Introduce internal for glibc struct __timespec64 y2038: Provide conversion helpers for struct __timespec64 y2038: linux: Provide __clock_settime64 implementation Zong Li (10): Documentation for the RISC-V 32-bit port RISC-V: Support dynamic loader for the 32-bit RISC-V: Add path of library directories for the 32-bit RISC-V: The ABI implementation for the 32-bit RISC-V: Hard float support for the 32 bit RISC-V: Regenerate ULPs of RISC-V RISC-V: Add ABI lists RISC-V: Build Infastructure for the 32-bit RISC-V: Fix llrint and llround missing exceptions on RV32 Add RISC-V 32-bit target to build-many-glibcs.py ChangeLog | 115 + NEWS | 6 + README | 1 + include/time.h | 119 + nptl/thrd_sleep.c | 19 +- scripts/build-many-glibcs.py | 15 + sysdeps/riscv/bits/wordsize.h | 4 +- sysdeps/riscv/nofpu/libm-test-ulps | 16 +- sysdeps/riscv/nptl/bits/pthreadtypes-arch.h | 25 +- sysdeps/riscv/preconfigure | 6 +- sysdeps/riscv/rv32/Implies-after | 1 + .../riscv/rv32/fix-fp-int-convert-overflow.h | 38 + sysdeps/riscv/rv32/rvd/Implies | 3 + sysdeps/riscv/rv32/rvd/s_lrint.c | 31 + sysdeps/riscv/rv32/rvd/s_lround.c | 31 + sysdeps/riscv/rv32/rvf/Implies | 1 + sysdeps/riscv/rv32/rvf/s_lrintf.c | 31 + sysdeps/riscv/rv32/rvf/s_lroundf.c | 31 + sysdeps/riscv/{rv64 => }/rvd/libm-test-ulps | 56 +- .../riscv/{rv64 => }/rvd/libm-test-ulps-name | 0 sysdeps/riscv/sfp-machine.h | 27 +- sysdeps/riscv/sys/asm.h | 5 +- sysdeps/unix/sysv/linux/clock_settime.c | 37 +- sysdeps/unix/sysv/linux/getrlimit.c | 9 + sysdeps/unix/sysv/linux/gettimeofday.c | 28 + sysdeps/unix/sysv/linux/lowlevellock-futex.h | 28 +- sysdeps/unix/sysv/linux/nanosleep.c | 12 + sysdeps/unix/sysv/linux/nanosleep_nocancel.c | 11 + sysdeps/unix/sysv/linux/riscv/Makefile | 4 +- .../unix/sysv/linux/riscv/bits/environments.h | 85 + sysdeps/unix/sysv/linux/riscv/bits/time64.h | 36 + sysdeps/unix/sysv/linux/riscv/bits/timesize.h | 22 + .../unix/sysv/linux/riscv/bits/typesizes.h | 89 + sysdeps/unix/sysv/linux/riscv/configure | 39 + sysdeps/unix/sysv/linux/riscv/configure.ac | 8 + sysdeps/unix/sysv/linux/riscv/dl-cache.h | 17 +- sysdeps/unix/sysv/linux/riscv/ldconfig.h | 2 +- sysdeps/unix/sysv/linux/riscv/rv32/Implies | 3 + .../unix/sysv/linux/riscv/rv32/c++-types.data | 67 + .../sysv/linux/riscv/rv32/jmp_buf-macros.h | 53 + sysdeps/unix/sysv/linux/riscv/rv32/ld.abilist | 9 + .../linux/riscv/rv32/libBrokenLocale.abilist | 1 + .../unix/sysv/linux/riscv/rv32/libanl.abilist | 4 + .../unix/sysv/linux/riscv/rv32/libc.abilist | 2101 +++++++++++++++++ .../sysv/linux/riscv/rv32/libcrypt.abilist | 2 + .../unix/sysv/linux/riscv/rv32/libdl.abilist | 9 + .../unix/sysv/linux/riscv/rv32/libm.abilist | 1021 ++++++++ .../sysv/linux/riscv/rv32/libpthread.abilist | 235 ++ .../sysv/linux/riscv/rv32/libresolv.abilist | 79 + .../unix/sysv/linux/riscv/rv32/librt.abilist | 35 + .../linux/riscv/rv32/libthread_db.abilist | 40 + .../sysv/linux/riscv/rv32/libutil.abilist | 6 + sysdeps/unix/sysv/linux/riscv/shlib-versions | 10 +- sysdeps/unix/sysv/linux/wait.c | 21 +- sysdeps/unix/sysv/linux/waitpid.c | 54 + sysdeps/unix/sysv/linux/waitpid_nocancel.c | 53 + 56 files changed, 4745 insertions(+), 66 deletions(-) create mode 100644 sysdeps/riscv/rv32/Implies-after create mode 100644 sysdeps/riscv/rv32/fix-fp-int-convert-overflow.h create mode 100644 sysdeps/riscv/rv32/rvd/Implies create mode 100644 sysdeps/riscv/rv32/rvd/s_lrint.c create mode 100644 sysdeps/riscv/rv32/rvd/s_lround.c create mode 100644 sysdeps/riscv/rv32/rvf/Implies create mode 100644 sysdeps/riscv/rv32/rvf/s_lrintf.c create mode 100644 sysdeps/riscv/rv32/rvf/s_lroundf.c rename sysdeps/riscv/{rv64 => }/rvd/libm-test-ulps (98%) rename sysdeps/riscv/{rv64 => }/rvd/libm-test-ulps-name (100%) create mode 100644 sysdeps/unix/sysv/linux/riscv/bits/environments.h create mode 100644 sysdeps/unix/sysv/linux/riscv/bits/time64.h create mode 100644 sysdeps/unix/sysv/linux/riscv/bits/timesize.h create mode 100644 sysdeps/unix/sysv/linux/riscv/bits/typesizes.h create mode 100644 sysdeps/unix/sysv/linux/riscv/rv32/Implies create mode 100644 sysdeps/unix/sysv/linux/riscv/rv32/c++-types.data create mode 100644 sysdeps/unix/sysv/linux/riscv/rv32/jmp_buf-macros.h create mode 100644 sysdeps/unix/sysv/linux/riscv/rv32/ld.abilist create mode 100644 sysdeps/unix/sysv/linux/riscv/rv32/libBrokenLocale.abilist create mode 100644 sysdeps/unix/sysv/linux/riscv/rv32/libanl.abilist create mode 100644 sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist create mode 100644 sysdeps/unix/sysv/linux/riscv/rv32/libcrypt.abilist create mode 100644 sysdeps/unix/sysv/linux/riscv/rv32/libdl.abilist create mode 100644 sysdeps/unix/sysv/linux/riscv/rv32/libm.abilist create mode 100644 sysdeps/unix/sysv/linux/riscv/rv32/libpthread.abilist create mode 100644 sysdeps/unix/sysv/linux/riscv/rv32/libresolv.abilist create mode 100644 sysdeps/unix/sysv/linux/riscv/rv32/librt.abilist create mode 100644 sysdeps/unix/sysv/linux/riscv/rv32/libthread_db.abilist create mode 100644 sysdeps/unix/sysv/linux/riscv/rv32/libutil.abilist -- 2.22.0