From patchwork Wed Sep 30 17:20:32 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 145026 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 33A4E4B9DB75 for ; Wed, 30 Sep 2026 17:23:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 33A4E4B9DB75 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=clc01JH/ X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id DEFB44BA2E06 for ; Wed, 30 Sep 2026 17:22:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DEFB44BA2E06 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org DEFB44BA2E06 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1790788950; cv=none; b=VjDzqr3iFCAJ7ipzH/AMI32sA2VYxm1RP2tFWal34pgsr9SX2tLJQLt6m6fa/3cMBJz3mZ45RNSYMYmBIvCCY169ppGxiEo7KyzXNHigINl3+kK4DTJADs1DACnP0oPYjivgJ9CQBHktcmmCrHuuRzB2onCtFj2twRRuWSudv8k= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1790788950; c=relaxed/simple; bh=i2h5qFOUZ3rUb+kRE5vc136Bp44eq52Yc8zTwpc4UbQ=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=chIqsl8cfyCjIq/w+xSwVoskp70WbT4qZ6B6sFi4nXL9b9r+8BywHg985dh3SaBQi8332rbEUOSugN9gKpodbk1jjjp0eEh22+Ovl3QU6PWYnTHnXNeD0tUNUqZabhPUEPzCq9Ru2H2wyVUOSqiUbtWozV2iQGQqXh6ugR7vplw= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=clc01JH/ DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DEFB44BA2E06 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1790788949; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G5tRMKm/JqnOPd7ds+6xkFOODn4LG9n6Tl8MBNBAQSA=; b=clc01JH/mqSjhOIeSZXWUqWhQjydUrRsC7Blm+Wgi0OEWiLjSbfaDOHhF1ILkuOaQV5rzr xR4ItP904YxFHMM3Cbahin6LrIwxVt+sLG8dyfQwmA3NgxzwmKGu9iuAvpj2FWCYx67SOL U2peYHR6295+jQAYchVaB/kXxkG0cgk= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-148-TbenfR9XNmaRrIgA4Toyyg-1; Wed, 30 Sep 2026 13:22:28 -0400 X-MC-Unique: TbenfR9XNmaRrIgA4Toyyg-1 X-Mimecast-MFC-AGG-ID: TbenfR9XNmaRrIgA4Toyyg_1790788947 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 0974A195C265; Wed, 30 Sep 2026 17:22:27 +0000 (UTC) Received: from zen.kayari.org (headnet04.pony-001.prod.iad2.dc.redhat.com [10.2.32.116]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 1E044195604F; Wed, 30 Sep 2026 17:22:25 +0000 (UTC) From: Jonathan Wakely To: gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org Subject: [PATCH] libstdc++: Remove special-case include path for pb_ds testsuite support files Date: Wed, 30 Sep 2026 18:20:32 +0100 Message-ID: <20260930172224.2325795-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: M-dBGZsVawO-1JA2lG3VRZhk9KhOOMXbzWprmEaHY-g_1790788947 X-Mimecast-Originator: redhat.com 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_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, RCVD_IN_SBL_CSS, SPF_HELO_PASS, SPF_NONE, TXREP shortcircuit=no 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: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org For unknown reasons three of the testsuite support files for pb_ds tests use #include whereas other testsuite support files do not use the 'util/' prefix to find e.g. . Both forms work, because the testsuite_flags script always adds -I$srcdir/testsuite/util to the compilation flags, and proc v3-build-support adds incdir=$srcdir/testsuite when compiling the support files. But there's no reason to be inconsistent here and require the extra incdir option just for those three files. This change makes those three files just use #include "bar.hpp" so that the header is found in the same dir as the source file including it. That means we can drop the incdir option in v3-build-support. libstdc++-v3/ChangeLog: * testsuite/lib/libstdc++.exp (v3-build_support): Remove incdir option to v3_target_compile commands for testsuite support objects. * testsuite/util/io/prog_bar.cc: Use "" form for header include. * testsuite/util/io/verified_cmd_line_input.cc: Likewise. * testsuite/util/performance/time/elapsed_timer.cc: Likewise. --- This isn't important, just a minor simplification. Tested x86_64-linux libstdc++-v3/testsuite/lib/libstdc++.exp | 4 ++-- libstdc++-v3/testsuite/util/io/prog_bar.cc | 2 +- libstdc++-v3/testsuite/util/io/verified_cmd_line_input.cc | 2 +- libstdc++-v3/testsuite/util/performance/time/elapsed_timer.cc | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libstdc++-v3/testsuite/lib/libstdc++.exp b/libstdc++-v3/testsuite/lib/libstdc++.exp index b2b1934a5240..3e8240d73a53 100644 --- a/libstdc++-v3/testsuite/lib/libstdc++.exp +++ b/libstdc++-v3/testsuite/lib/libstdc++.exp @@ -845,7 +845,7 @@ proc v3-build_support { } { # do not prevent compilation. # Disable LTO so that ar/ranlib don't need the LTO plugin. if { [v3_target_compile $srcdir/util/$f $object_file "object" \ - [list "incdir=$srcdir" "additional_flags=-w -fno-lto -fno-freestanding"]] + [list "additional_flags=-w -fno-lto -fno-freestanding"]] != "" } { error "could not compile $f" } @@ -884,7 +884,7 @@ proc v3-build_support { } { # Compile with "-w" so that warnings issued by the compiler # do not prevent compilation. if { [v3_target_compile $srcdir/util/$f $object_file "sharedlib" \ - [list "incdir=$srcdir" "additional_flags=-fno-inline -w -shared -fPIC -DPIC -std=gnu++98 -fno-freestanding"]] + [list "additional_flags=-fno-inline -w -shared -fPIC -DPIC -std=gnu++98 -fno-freestanding"]] != "" } { error "could not compile $f" } diff --git a/libstdc++-v3/testsuite/util/io/prog_bar.cc b/libstdc++-v3/testsuite/util/io/prog_bar.cc index 86f20b3bed54..a2d431cc86dd 100644 --- a/libstdc++-v3/testsuite/util/io/prog_bar.cc +++ b/libstdc++-v3/testsuite/util/io/prog_bar.cc @@ -34,7 +34,7 @@ * Contains a progress bar - idea taken from boost::timer by Beman Dawes. */ -#include +#include "prog_bar.hpp" namespace __gnu_pbds { diff --git a/libstdc++-v3/testsuite/util/io/verified_cmd_line_input.cc b/libstdc++-v3/testsuite/util/io/verified_cmd_line_input.cc index a1d5fc7282e1..efbe622eeb54 100644 --- a/libstdc++-v3/testsuite/util/io/verified_cmd_line_input.cc +++ b/libstdc++-v3/testsuite/util/io/verified_cmd_line_input.cc @@ -34,7 +34,7 @@ * Contains definitions for tests - verified command line input. */ -#include +#include "verified_cmd_line_input.hpp" #include #include #include diff --git a/libstdc++-v3/testsuite/util/performance/time/elapsed_timer.cc b/libstdc++-v3/testsuite/util/performance/time/elapsed_timer.cc index db48362a59e0..ae189df59656 100644 --- a/libstdc++-v3/testsuite/util/performance/time/elapsed_timer.cc +++ b/libstdc++-v3/testsuite/util/performance/time/elapsed_timer.cc @@ -34,7 +34,7 @@ * Contains utilities for tests. */ -#include +#include "elapsed_timer.hpp" namespace __gnu_pbds {