| Message ID | 20260306163309.2015837-4-arnd@kernel.org |
|---|---|
| State | New |
| Headers |
Return-Path: <libabigail-bounces~patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id D834E4B9DB40 for <patchwork@sourceware.org>; Fri, 6 Mar 2026 16:33:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D834E4B9DB40 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=UL2TgpIJ X-Original-To: libabigail@sourceware.org Delivered-To: libabigail@sourceware.org Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) by sourceware.org (Postfix) with ESMTPS id 188D64BA23FC for <libabigail@sourceware.org>; Fri, 6 Mar 2026 16:33:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 188D64BA23FC Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kernel.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 188D64BA23FC Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=172.234.252.31 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1772814808; cv=none; b=bVV3/Mf0OXkuBd0ImHJ/KOZ5ai/I9EePv293oZGkBADtmxzUwi1VRvom98UDcZHUVcZ8TG5iN5sEEip1+b04iUe7IqI2++OPJ3fql3ni5o4Ztz+z0Xqd8BhZCXDgpsHrnJlPDWDpWZLsSZpUnFE6VlCo0rPTaQazWkNYnYRYYr8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1772814808; c=relaxed/simple; bh=OsGIverTqbfLboR3Rb0dxLX69WlmezNlUPs+M/gaqTw=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=CrX6Xtkeiu+CunNkohGggRc2l80TaW53sdOt7nS4cm0iBzJhuX6A0XxTiEvGwqnYPhRn0suU+6Sosa+Y+4bZTzEWugqKxBwZllTnhqRGl1johFvnrOylMOPj1NwEC+9ayvnebUrniXxFNathUn9AF6SKEm6ssVOBzyIUVzSa8DY= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 188D64BA23FC Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 6596D44368; Fri, 6 Mar 2026 16:33:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 761D9C2BC86; Fri, 6 Mar 2026 16:33:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772814807; bh=OsGIverTqbfLboR3Rb0dxLX69WlmezNlUPs+M/gaqTw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UL2TgpIJCnuAHQ2ATmAKjs+sBFvYX+X8n86mKjtYnYnJPFh6OK3vVgeE4ZxwRyKjM hBU0hEd4MW82Rq2W9VhJrRwg82zkBkVwc7dsGL6Alhvd7LDvJ5XX1+T8crZF7s2cF/ SZMdjOOzrb2tI9rTm+uMkh8LgXklFn0YLkYZV0pxH1lwAsm+zq438rUIewc9LtHJe9 ADpaYdrNqr7/Z3iPIct21lJocC2xRJ9dT/T/XSozo6UNxWudL8hDI/jvgVdpIYLQgR jfFK6kmx0krFoXTJjKnz3Y4Tz5DUp81qYcNhkGSg/aGjRsPkBU1h0as58C4jksnwnj nozB/jCav55PA== From: Arnd Bergmann <arnd@kernel.org> To: linux-kbuild@vger.kernel.org Cc: Arnd Bergmann <arnd@arndb.de>, Dodji Seketeli <dodji@seketeli.org>, John Moon <john@jmoon.dev>, Nathan Chancellor <nathan@kernel.org>, Nicolas Schier <nsc@kernel.org>, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= <linux@weissschuh.net>, libabigail@sourceware.org Subject: [PATCH 3/3] check-uapi: use dummy libc includes Date: Fri, 6 Mar 2026 17:33:09 +0100 Message-Id: <20260306163309.2015837-4-arnd@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20260306163309.2015837-1-arnd@kernel.org> References: <20260306163309.2015837-1-arnd@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_NONE, SPF_PASS, TXREP, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on sourceware.org X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Mailing list of the Libabigail project <libabigail.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/libabigail>, <mailto:libabigail-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/libabigail/> List-Post: <mailto:libabigail@sourceware.org> List-Help: <mailto:libabigail-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/libabigail>, <mailto:libabigail-request@sourceware.org?subject=subscribe> Errors-To: libabigail-bounces~patchwork=sourceware.org@sourceware.org |
| Series |
check-uapi: improve portability for testing headers
|
|
Commit Message
Arnd Bergmann
March 6, 2026, 4:33 p.m. UTC
From: Arnd Bergmann <arnd@arndb.de> Based on Thomas Weißschuh's series to kernel headers to no longer require an installed libc when build testing the uapi headers, the same can now be done for the scripts/check-uapi.sh script. The only required change here is to add the usr/dummy-include include path. Link: https://lore.kernel.org/lkml/20260227-kbuild-uapi-libc-v1-0-c17de0d19776@weissschuh.net/ [1] Signed-off-by: Arnd Bergmann <arnd@arndb.de> --- scripts/check-uapi.sh | 1 + 1 file changed, 1 insertion(+)
Comments
On 2026-03-06 17:33:09+0100, Arnd Bergmann wrote: > From: Arnd Bergmann <arnd@arndb.de> > > Based on Thomas Weißschuh's series to kernel headers to no longer require > an installed libc when build testing the uapi headers, the same can now > be done for the scripts/check-uapi.sh script. > > The only required change here is to add the usr/dummy-include include > path. > > Link: https://lore.kernel.org/lkml/20260227-kbuild-uapi-libc-v1-0-c17de0d19776@weissschuh.net/ [1] > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > --- > scripts/check-uapi.sh | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/scripts/check-uapi.sh b/scripts/check-uapi.sh > index e4d120eb09e3..c8beec58871c 100755 > --- a/scripts/check-uapi.sh > +++ b/scripts/check-uapi.sh > @@ -191,6 +191,7 @@ do_compile() { > -fno-eliminate-unused-debug-types \ > -g \ > "-I${inc_dir}" \ > + "-Iusr/dummy-include" \ What about also using -nostdinc? > -include "$header" \ > - > } I have a similar (unfinished) patch flying around which also uses usr/dummy-include from the different kernel versions to avoid mismatches in case something gets removed there. Not sure if it is worth it. diff --git a/scripts/check-uapi.sh b/scripts/check-uapi.sh index 955581735cb3..48d157ee5408 100755 --- a/scripts/check-uapi.sh +++ b/scripts/check-uapi.sh @@ -186,7 +186,9 @@ do_compile() { -std=c90 \ -fno-eliminate-unused-debug-types \ -g \ + -nostdinc \ "-I${inc_dir}" \ + "-I${inc_dir}/../dummy-include" \ -include "$header" \ - } @@ -197,6 +199,7 @@ run_make_headers_install() { local -r install_dir="$(get_header_tree "$ref")" make -j "$MAX_THREADS" ARCH="$ARCH" INSTALL_HDR_PATH="$install_dir" \ headers_install > /dev/null + rsync -a usr/dummy-include/ "$install_dir"/dummy-include/ } # Install headers for both git refs
On Fri, Mar 6, 2026, at 17:39, Thomas Weißschuh wrote: > On 2026-03-06 17:33:09+0100, Arnd Bergmann wrote: >> -g \ >> "-I${inc_dir}" \ >> + "-Iusr/dummy-include" \ > > What about also using -nostdinc? I just removed it from my version after I found it made no difference, and I wanted to keep the changes shorter. I agree it's slightly cleaner. > I have a similar (unfinished) patch flying around which also > uses usr/dummy-include from the different kernel versions > to avoid mismatches in case something gets removed there. > Not sure if it is worth it. Agreed, I certainly don't mind having your version either if anyone cares enough. I suppose it would add a very small build time overhead for the extra copy, but if it does help catch bugs it would be worth the time. Arnd
On 2026-03-06 17:45:36+0100, Arnd Bergmann wrote: > On Fri, Mar 6, 2026, at 17:39, Thomas Weißschuh wrote: > > On 2026-03-06 17:33:09+0100, Arnd Bergmann wrote: > >> -g \ > >> "-I${inc_dir}" \ > >> + "-Iusr/dummy-include" \ > > > > What about also using -nostdinc? > > I just removed it from my version after I found it made no difference, > and I wanted to keep the changes shorter. I agree it's slightly cleaner. Ack, your choice. > > I have a similar (unfinished) patch flying around which also > > uses usr/dummy-include from the different kernel versions > > to avoid mismatches in case something gets removed there. > > Not sure if it is worth it. > > Agreed, I certainly don't mind having your version either if > anyone cares enough. I suppose it would add a very small build time > overhead for the extra copy, but if it does help catch bugs it > would be worth the time. It is less about catching bugs, those will already have been caught by the header tests before. But if something is removed from the dummy headers because it became unused, the old UAPI headers won't build anymore against the new dummy-headers. Thomas
Hi Arnd and Thomas, On Sat, Mar 07, 2026 at 09:51:05AM +0100, Thomas Weißschuh wrote: > On 2026-03-06 17:45:36+0100, Arnd Bergmann wrote: > > On Fri, Mar 6, 2026, at 17:39, Thomas Weißschuh wrote: > > > On 2026-03-06 17:33:09+0100, Arnd Bergmann wrote: > > >> -g \ > > >> "-I${inc_dir}" \ > > >> + "-Iusr/dummy-include" \ > > > > > > What about also using -nostdinc? > > > > I just removed it from my version after I found it made no difference, > > and I wanted to keep the changes shorter. I agree it's slightly cleaner. > > Ack, your choice. > > > > I have a similar (unfinished) patch flying around which also > > > uses usr/dummy-include from the different kernel versions > > > to avoid mismatches in case something gets removed there. > > > Not sure if it is worth it. > > > > Agreed, I certainly don't mind having your version either if > > anyone cares enough. I suppose it would add a very small build time > > overhead for the extra copy, but if it does help catch bugs it > > would be worth the time. > > It is less about catching bugs, those will already have been caught by > the header tests before. But if something is removed from the dummy > headers because it became unused, the old UAPI headers won't build > anymore against the new dummy-headers. > > > Thomas Shall I wait some more days for a possible modified patch 3/3? Otherwise I'd like to apply the series to kbuild-next-unstable. Thanks and kind regards, Nicolas
On 2026-03-20 21:12:53+0100, Nicolas Schier wrote: > On Sat, Mar 07, 2026 at 09:51:05AM +0100, Thomas Weißschuh wrote: > > On 2026-03-06 17:45:36+0100, Arnd Bergmann wrote: > > > On Fri, Mar 6, 2026, at 17:39, Thomas Weißschuh wrote: > > > > On 2026-03-06 17:33:09+0100, Arnd Bergmann wrote: > > > >> -g \ > > > >> "-I${inc_dir}" \ > > > >> + "-Iusr/dummy-include" \ > > > > > > > > What about also using -nostdinc? > > > > > > I just removed it from my version after I found it made no difference, > > > and I wanted to keep the changes shorter. I agree it's slightly cleaner. > > > > Ack, your choice. > > > > > > I have a similar (unfinished) patch flying around which also > > > > uses usr/dummy-include from the different kernel versions > > > > to avoid mismatches in case something gets removed there. > > > > Not sure if it is worth it. > > > > > > Agreed, I certainly don't mind having your version either if > > > anyone cares enough. I suppose it would add a very small build time > > > overhead for the extra copy, but if it does help catch bugs it > > > would be worth the time. > > > > It is less about catching bugs, those will already have been caught by > > the header tests before. But if something is removed from the dummy > > headers because it became unused, the old UAPI headers won't build > > anymore against the new dummy-headers. > Shall I wait some more days for a possible modified patch 3/3? > Otherwise I'd like to apply the series to kbuild-next-unstable. It is a somewhat theoretical issue and if it arises at some point we can still fix it up. So this shouldn't block the patches. For the series: Reviewed-by: Thomas Weißschuh <linux@weissschuh.net> Thomas
On Fri, Mar 20, 2026 at 09:31:07PM +0100, Thomas Weißschuh wrote: > On 2026-03-20 21:12:53+0100, Nicolas Schier wrote: > > On Sat, Mar 07, 2026 at 09:51:05AM +0100, Thomas Weißschuh wrote: > > > On 2026-03-06 17:45:36+0100, Arnd Bergmann wrote: > > > > On Fri, Mar 6, 2026, at 17:39, Thomas Weißschuh wrote: > > > > > On 2026-03-06 17:33:09+0100, Arnd Bergmann wrote: > > > > >> -g \ > > > > >> "-I${inc_dir}" \ > > > > >> + "-Iusr/dummy-include" \ > > > > > > > > > > What about also using -nostdinc? > > > > > > > > I just removed it from my version after I found it made no difference, > > > > and I wanted to keep the changes shorter. I agree it's slightly cleaner. > > > > > > Ack, your choice. > > > > > > > > I have a similar (unfinished) patch flying around which also > > > > > uses usr/dummy-include from the different kernel versions > > > > > to avoid mismatches in case something gets removed there. > > > > > Not sure if it is worth it. > > > > > > > > Agreed, I certainly don't mind having your version either if > > > > anyone cares enough. I suppose it would add a very small build time > > > > overhead for the extra copy, but if it does help catch bugs it > > > > would be worth the time. > > > > > > It is less about catching bugs, those will already have been caught by > > > the header tests before. But if something is removed from the dummy > > > headers because it became unused, the old UAPI headers won't build > > > anymore against the new dummy-headers. > > > Shall I wait some more days for a possible modified patch 3/3? > > Otherwise I'd like to apply the series to kbuild-next-unstable. > > It is a somewhat theoretical issue and if it arises at some point we can > still fix it up. So this shouldn't block the patches. > > For the series: > > Reviewed-by: Thomas Weißschuh <linux@weissschuh.net> > > > Thomas ok, thanks!
diff --git a/scripts/check-uapi.sh b/scripts/check-uapi.sh index e4d120eb09e3..c8beec58871c 100755 --- a/scripts/check-uapi.sh +++ b/scripts/check-uapi.sh @@ -191,6 +191,7 @@ do_compile() { -fno-eliminate-unused-debug-types \ -g \ "-I${inc_dir}" \ + "-Iusr/dummy-include" \ -include "$header" \ - }