From patchwork Wed May 15 06:38:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Filippov X-Patchwork-Id: 1935276 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=fhSmEKoV; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=uclibc-ng.org (client-ip=2a00:1828:2000:679::23; helo=helium.openadk.org; envelope-from=devel-bounces@uclibc-ng.org; receiver=patchwork.ozlabs.org) Received: from helium.openadk.org (helium.openadk.org [IPv6:2a00:1828:2000:679::23]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VfNpk6Lfhz1ydW for ; Wed, 15 May 2024 16:38:36 +1000 (AEST) Received: from helium.openadk.org (localhost [IPv6:::1]) by helium.openadk.org (Postfix) with ESMTP id 4C34A352830F; Wed, 15 May 2024 08:38:27 +0200 (CEST) Authentication-Results: helium.openadk.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=fhSmEKoV; dkim-atps=neutral Received: from mail-oi1-f179.google.com (mail-oi1-f179.google.com [209.85.167.179]) by helium.openadk.org (Postfix) with ESMTPS id 93C0735282DD for ; Wed, 15 May 2024 08:38:22 +0200 (CEST) Received: by mail-oi1-f179.google.com with SMTP id 5614622812f47-3c9995562a0so2869035b6e.2 for ; Tue, 14 May 2024 23:38:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715755101; x=1716359901; darn=uclibc-ng.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=tj1thO6A5bdOo8f4Gsj6PTGkSv2JsG2TOX2mEh0BmDA=; b=fhSmEKoVNW8XM4+Ye35PVImPr7E0qA+Ypb1QqZN0Tz4FD6+jOBUmipCTEMxAxByieR rkSkzwo1JJeyH3l704e3UZkIWvwv/EaCQFRN9LOICQlTIbhQH6+SPx0EcFRJMu+LQWy+ Mk5XwhApHZ0A06dwzgHLmG460u+RF5ebJigs1QRJNXzbJbHxpjRsCOAhmvLdWvIe0CcI NM58gSf14JDNx8kBfJm+6QsTwf29GNX2nF8BI3BTYyvcRu2RqK8lsR6w2Oeey2Qk8ZE1 GlvmHvWMfSw5teSXnAV6wuUkFsdwrXM4OCyZc2iQx7RVsAjG83JaiAWNc80eZlS/mW9Q zDBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715755101; x=1716359901; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=tj1thO6A5bdOo8f4Gsj6PTGkSv2JsG2TOX2mEh0BmDA=; b=cB5tmmcPZsHpY3tljth1VXclvWyo78cpNsMQu0tsGgIehnt6jq0He5A8oWM2Hvg77u uGAMzTxjVPaWiykdVPFa0XjF/DNtbkipvLgbrJFfIpFswYjn819s8aMcbRdmzkFxo2ku kXe/RqMZfvwgoVkEQzq1R5AeDVBlWOBQe/GkiOpQWk/4E5Z81w6ZKEtRdropmZp7uRbb zGEumu232e/CbIbIpouqPa2cuX+qfbAkYAv7fvW8AyhxLFabhce66Dxjvyt3P7qfyiJw xq+H6Ao9w/+5cBPNnADqY/ywSr25d4J1GKx7xAnPpiUWnexfwFl3cfEtQip6tgtWQkPs yviA== X-Gm-Message-State: AOJu0Ywj7qgZ1yOneSuQLUfQXsD9uyo1n31G8t/PG31nSNY6ipoP5iCL m941/RHzD3X4HRoMJmw2JT9mk7xyPm0s6VDuVTrhVYi5hU5kSjrd X-Google-Smtp-Source: AGHT+IEmMlC+dylvFJmUI5i5cdGurteI9L+BesS0WlVqquxu3Bo/Y3SeBNGorWU8zoK6Gv9R+MxUGg== X-Received: by 2002:a05:6808:3bb:b0:3c9:779f:6c5e with SMTP id 5614622812f47-3c997035241mr17729694b6e.4.1715755100310; Tue, 14 May 2024 23:38:20 -0700 (PDT) Received: from octofox.metropolis ([2601:646:a200:bbd0:dc2f:1950:b960:726e]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-6340a447429sm10610226a12.18.2024.05.14.23.38.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 May 2024 23:38:19 -0700 (PDT) Date: Tue, 14 May 2024 23:38:15 -0700 From: Max Filippov To: Chris Packham Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Message-ID-Hash: YZXWU24LVZMAXHFQCDCFBXOEWSSRWKSZ X-Message-ID-Hash: YZXWU24LVZMAXHFQCDCFBXOEWSSRWKSZ X-MailFrom: jcmvbkbc@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: devel@uclibc-ng.org, wbx@openadk.org X-Mailman-Version: 3.3.3 Precedence: list Subject: [uclibc-ng-devel] Re: uClibc-ng build failure with GCC14 for arc List-Id: uClibc-ng Development Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Hi Chris, On Wed, May 15, 2024 at 09:02:27AM +1200, Chris Packham wrote: > (Max, Waldemar sorry for the duplicate. My subscription to the list > seems to have been stuck in pending for ages so I grabbed your > addresses from the git repo) > > I'm in the process of adding GCC14 to crosstool-ng. I've grabbed the > latest uClibc-ng tarball and the commits from master since the > release. I'm hitting the following build failure with an > arc-multilib-linux-uclibc configuration. > > [ALL ] libc/sysdeps/linux/common/fstat64.c: In function 'fstat64': > [ERROR] libc/sysdeps/linux/common/fstat64.c:33:38: error: passing > argument 2 of '__syscall_fstat64' from incompatible pointer type > [-Wincompatible-pointer-types] > [ALL ] 33 | return __syscall_fstat64(fd, buf); > [ALL ] | ^~~ > [ALL ] | | > [ALL ] | struct stat64 * > [ALL ] In file included from ./include/sys/syscall.h:34, > [ALL ] from libc/sysdeps/linux/common/fstat64.c:10: > [ALL ] libc/sysdeps/linux/common/fstat64.c:18:72: note: expected > 'struct stat *' but argument is of type 'struct stat64 *' > [ALL ] 18 | int, filedes, > struct kernel_stat64 *, buf) > [ALL ] | > ~~~~~~~~~~~~~~~~~~~~~~~~^~~ > [ALL ] ./include/bits/syscalls-common.h:82:43: note: in > definition of macro 'C_DECL_ARGS_1' > [ALL ] 82 | #define C_DECL_ARGS_1(t, v) t v > [ALL ] | ^ > [ALL ] ./include/bits/syscalls-common.h:98:11: note: in > expansion of macro 'C_DECL_ARGS_2' > [ALL ] 98 | type name(C_DECL_ARGS_##nargs(args)) { > | ^~~~~~~~~~~~ > [ALL ] ./include/bits/syscalls-common.h:141:41: note: in > expansion of macro 'SYSCALL_FUNC' > [ALL ] 141 | #define _syscall2(args...) > SYSCALL_FUNC(2, args) > [ALL ] | ^~~~~~~~~~~~ > [ALL ] libc/sysdeps/linux/common/fstat64.c:17:24: note: in > expansion of macro '_syscall2' > [ALL ] 17 | static __always_inline _syscall2(int, __syscall_fstat64, > [ALL ] | ^~~~~~~~~ > [ERROR] make[1]: *** [Makerules:373: > libc/sysdeps/linux/common/fstat64.os] Error 1 > [ALL ] make[1]: Leaving directory > '/home/ctng/crosstool-ng/.build/arc-multilib-linux-uclibc/build/build-libc/multilib' > > It looks like maybe arc should be defining > __ARCH_HAS_DEPRECATED_SYSCALLS__ or perhaps declaring kernel_stat64 > differently. Any advice would be much appreciated. Looking at how the code is written in the failing #if condition block of the fstat64.c I'd think that struct kernel_stat64 should be the same as the struct stat64. The history of libc/sysdeps/linux/common-generic/bits/kernel_stat.h suggests that that was so until the commit 74ca8d6f5d2e ("remove UCLIBC_HAS_LFS") removed that definition. It seems to me that that commit removed the wrong leg of the condition, and that the attached change (completely untested) should fix it. Tested-by: Chris Packham From c73701dae0ca5a679e67945a6da4d1c395c2e2aa Mon Sep 17 00:00:00 2001 From: Max Filippov Date: Tue, 14 May 2024 23:18:56 -0700 Subject: [PATCH] fix kernel_stat64 definition The commit 74ca8d6f5d2e ("remove UCLIBC_HAS_LFS") removed conditional compilation dependent on __UCLIBC_HAS_LFS__, assuming it to be always defined, but removed the wrong branch in the definition of kernel_stat64. Fix kernel_stat64 definition to be stat64. Signed-off-by: Max Filippov --- libc/sysdeps/linux/common-generic/bits/kernel_stat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libc/sysdeps/linux/common-generic/bits/kernel_stat.h b/libc/sysdeps/linux/common-generic/bits/kernel_stat.h index 7a97bb4d7090..e874a4a9f8ed 100644 --- a/libc/sysdeps/linux/common-generic/bits/kernel_stat.h +++ b/libc/sysdeps/linux/common-generic/bits/kernel_stat.h @@ -18,7 +18,7 @@ * However that requires more #ifndef in relevant wrappers, * further uglifying them */ -#define kernel_stat64 stat +#define kernel_stat64 stat64 #endif /* _BITS_STAT_STRUCT_H */ -- 2.39.2