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-Status: No, score=-3.7 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_PASS, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 8868D1F55B for ; Fri, 22 May 2020 20:56:22 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 60C03386F83E; Fri, 22 May 2020 20:56:21 +0000 (GMT) Received: from esa1.mentor.iphmx.com (esa1.mentor.iphmx.com [68.232.129.153]) by sourceware.org (Postfix) with ESMTPS id 5100E3851C0C for ; Fri, 22 May 2020 20:56:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 5100E3851C0C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=joseph_myers@mentor.com IronPort-SDR: 7T+PDRlRiReNHMlrvLBRob+llVbkVcdHTvLLBpjzGN6RFMNI+G74JFAaCnL3szc7i68WUfL3P1 KHJIBhCN9QlDkKTYyy503CFhtnhUbGV0IXLiuml7oUfE1Hl0ChlaPqxC9UlHdoCb6/3pdo0VNH w9hMd6fk4BQu+6sh+YVrdiPfvEVHhIqnXHFlFwLb0XLX1Ga7vsutkhzRmugX6qpX4u1BZnZAKl wbX830zgZhQfGK3pD7YcasFG9PQ1KrGhaNFkZwzt4xrYGOTWQKkZTcOvOZ3cQhvpV7cOPEy8Fr k8A= X-IronPort-AV: E=Sophos;i="5.73,423,1583222400"; d="scan'208";a="51163101" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa1.mentor.iphmx.com with ESMTP; 22 May 2020 12:56:14 -0800 IronPort-SDR: gGyA29OA3cAMWKlmg1mcG180A1FlARx8+D4q6QbcZRavZ2dhgdWjO6RNAeyFOWY6orphypJahX STnxBnn21BAwp6mf1uK8kB/vkvrTIDhSo8zZ8uNLhRNa2Zsh4hTC+Lqja7YkHd9/lEejknKS8g geEyI2ve94aCjR1L536EUwv3Ap6CcEsgsjAWeZzJSqyIP9BnyWkFvXKarnyRl3cMZyMTQWz6hm V+judA64WH0sktGPj+A2mbXR6Z/0ZEOumYLuMZNgxspYAi6EWcrmN2VehKzYohxYhbR6AErFvO HSk= Date: Fri, 22 May 2020 20:56:08 +0000 From: Joseph Myers X-X-Sender: jsm28@digraph.polyomino.org.uk To: Stafford Horne Subject: Re: [PATCH 1/1] Initial support for OpenRISC In-Reply-To: <20200522113633.209664-2-shorne@gmail.com> Message-ID: References: <20200522113633.209664-1-shorne@gmail.com> <20200522113633.209664-2-shorne@gmail.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-02.mgc.mentorg.com (139.181.222.2) To SVR-IES-MBX-03.mgc.mentorg.com (139.181.222.3) X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Openrisc , GLIBC patches , Christian Svensson Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" On Fri, 22 May 2020, Stafford Horne via Libc-alpha wrote: > This patch includes the OpenRISC glibc support for linux. This is missing a build-many-glibcs.py update. You always need to include such an update with a new port, which must build at least one configuration for each ABI supported by the port (and may build any major non-ABI variants that seem relevant). build-many-glibcs.py results for the port must be clean (i.e. no failures in the compilation part of the testsuite), at least when building with GCC and binutils master (it's OK if you need features or bug fixes not in the most recent release branches, although distributors might prefer such fixes to be backported). Similarly, there should be NEWS and README updates. New 32-bit ports should preferably be set up to support only 64-bit time and 64-bit offsets (see ARC and RV32 patch postings for examples). > diff --git a/sysdeps/or1k/bits/atomic.h b/sysdeps/or1k/bits/atomic.h There should be no such file. bits/ is only for installed headers, not internal ones. See commit de071d199a8578055edf2722114788ae749823aa ("Move bits/atomic.h to atomic-machine.h (bug 14912).", 11 Sep 2015). > diff --git a/sysdeps/or1k/nptl/bits/semaphore.h b/sysdeps/or1k/nptl/bits/semaphore.h Do you really need this file? See commit 1270fbaaeebe642db335fccaaf98c82e6647cc0d ("semaphore: consolidate arch headers into a generic one", 5 May 2020). > + # Needed for relro detection > + libc_commonpagesize=0x2000 > + libc_relro_required=yes See commit cb403c34c6f6e1cce5018864485958cfc2e28906 ("Remove relro configure test.", 27 Jun 2014). When you have an old out-of-tree port, it's a good idea to go through cross-architecture commits from when the port was first created onwards to identify such global changes that need to be applied to that port. > diff --git a/sysdeps/unix/sysv/linux/or1k/bits/mman.h b/sysdeps/unix/sysv/linux/or1k/bits/mman.h You shouldn't have this file. See the comment in sysdeps/unix/sysv/linux/bits/mman.h (and commit d3a43e49f342c4663af0fff9d95000cfe26867c3, "Unify many bits/mman.h headers.", 18 Sep 2018, and commit 61d8b5feeed36e242a043befe9b11f7f8c294f58, "Share MAP_* flags between more architectures.", 26 Sep 2018): /* These definitions are appropriate for architectures that, in the Linux kernel, either have no uapi/asm/mman.h, or have one that includes asm-generic/mman.h without any changes or additions relevant to glibc. If there are additions relevant to glibc, an architecture-specific bits/mman.h is needed. */ > diff --git a/sysdeps/unix/sysv/linux/or1k/configure.ac b/sysdeps/unix/sysv/linux/or1k/configure.ac > new file mode 100644 > index 0000000000..505530d5c3 > --- /dev/null > +++ b/sysdeps/unix/sysv/linux/or1k/configure.ac > @@ -0,0 +1,4 @@ > +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. > +# Local configure fragment for sysdeps/unix/sysv/linux/or1k. > + > +arch_minimum_kernel=3.4.0 You'll probably need a newer minimum kernel when requiring 64-bit time support, until all the fallback for 64-bit time on 32-bit kernels without the 64-bit-time syscalls is implemented. > +#undef __ASSUME_SET_ROBUST_LIST Are you sure this is never supported on this architecture? arch/openrisc/include/asm/futex.h appears to have gained futex_atomic_cmpxchg_inatomic in 4.11, so I'd expect the #undef only to be for kernels older than that. > diff --git a/sysdeps/unix/sysv/linux/or1k/sys/procfs.h b/sysdeps/unix/sysv/linux/or1k/sys/procfs.h See commit d62f9ec0cce26a275ec68f4564814041a33395b1 ("Complete sys/procfs.h unification.", 25 Sep 2018). You shouldn't have an architecture-specific version of this file; add whatever bits/ headers are needed instead. In general, each architecture-specific file needs a justification that either no generic version exists or the generic one is unsuitable or suboptimal for this architecture; the default is that we want to use unified implementations of as many files as possible. -- Joseph S. Myers joseph@codesourcery.com