From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 457 invoked from network); 27 Apr 2022 02:13:38 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 27 Apr 2022 02:13:38 -0000 Received: (qmail 22256 invoked by uid 550); 27 Apr 2022 02:13:37 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 22224 invoked from network); 27 Apr 2022 02:13:36 -0000 Date: Tue, 26 Apr 2022 22:13:21 -0400 From: Rich Felker To: =?utf-8?B?546L5rSq5Lqu?= Cc: musl@lists.openwall.com Message-ID: <20220427021321.GN7074@brightrain.aerifal.cx> References: <64c0ef49-4618-8eca-c826-bd2a840c284b@loongson.cn> <39446a33-e5df-8912-e39d-308101275e8a@loongson.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <39446a33-e5df-8912-e39d-308101275e8a@loongson.cn> User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [musl] Re: add loongarch64 port On Wed, Apr 27, 2022 at 09:58:44AM +0800, 王洪亮 wrote: > > 在 2022/3/31 下午4:14, Arnd Bergmann 写道: > >The __NR_fstat and __NR_newfstatat symbols are only defined by > >the kernel if __ARCH_WANT_NEW_STAT is set, which should not be > >by the time the kernel port is merged. Instead, user space should > >call statx() here, which continues to be supported as a superset. > > > > > > Arnd > > there is a build error if I remove __NR_fstat and __NR_newfstatat, > the architecture-independent code depends on the __NR_fstat and > __NR_fstatat defined in architecture platform. > How to deal with this issue? > > In file included from src/stat/fstatat.c:8: > src/stat/fstatat.c: In function ‘fstatat_kstat’: > src/stat/fstatat.c:78:19: error: ‘SYS_fstat’ undeclared (first use > in this function); did you mean ‘SYS_statx’? >    ret = __syscall(SYS_fstat, fd, &kst); > > src/stat/fstatat.c:80:20: error: ‘SYS_fstatat’ undeclared (first use > in this function); did you mean ‘SYS_fstatfs’? > >     ret = __syscall(SYS_fstatat, fd, path, &kst, flag); There are pending changes that are needed for riscv32 that address the same issue there. I'll review them again in the next couple days and either merge them or make alternative changes to make the rest of musl not assume the existence of these syscalls. Rich