| Message ID | 20260805063729.3492311-2-twoerner@gmail.com |
|---|---|
| State | New |
| Headers |
Return-Path: <gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org> 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 8F8644BA7984 for <patchwork@sourceware.org>; Wed, 5 Aug 2026 06:38:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8F8644BA7984 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=OMjPmTdm X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-qk1-x731.google.com (mail-qk1-x731.google.com [IPv6:2607:f8b0:4864:20::731]) by sourceware.org (Postfix) with ESMTPS id A67754BA23F4 for <gcc-patches@gcc.gnu.org>; Wed, 5 Aug 2026 06:37:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A67754BA23F4 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org A67754BA23F4 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::731 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1785911858; cv=none; b=IB6LkyPpYfODFBW/ovHumK2+8+BFDUZbb3+57vcAaGHTydlmm3b0Abzdnjyay6aeQq4HSEnXiga+lGa7faYnHGjzrAU7ttu1xDhXKCEliiHrUv6dp0tEOu/3mDI2CT0/GVUOdALUMwmggYtRNu3RhC5hGEBHUaEsBFGgrCe8MRw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1785911858; c=relaxed/simple; bh=SDGAFJ9TeLgfIAGqkooNAroo12ddw4htfLbDR8I+qpk=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=o//+VizFycX7T+thaBdX3KH5LMLnOq38Li1K2LV/c5xVqDb8ubqi4CihKFuvaUQ+hJKD+nSxMumDpR/SxSQ2OjaYRqzayrzf9FMRncXxW1mJFY6RnDEaNSnRq1oUGu3zo4/ywax7bJBCB4xQPMNj1osH3njqat0bFgfv9CGwaso= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=OMjPmTdm DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A67754BA23F4 Received: by mail-qk1-x731.google.com with SMTP id af79cd13be357-92e512a9a6bso33084985a.2 for <gcc-patches@gcc.gnu.org>; Tue, 04 Aug 2026 23:37:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785911858; x=1786516658; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=b4ZEBgaYu4NWsal9ngxUhxqIARMe9bWnTN0kY1ehGyE=; b=OMjPmTdmW+0Rtq3g9NFd1RvXPpMZ+xPSQAb8pXUq21M5fN3NhC8ykfhjit7RWDLd3E y3DwM5E5EtDWHXfWX2pAZ4NNPIVT1uMoXOQL9aaiZ/qi4r3O635HkNMjDnqomUHAvwG1 n3W3p29YTqSTPWqrVjWo2BXXX/uF78ngjHhRYCSO+a+lJqT7Y6hw2A7Q9Ph+1U7VCe0E 9SyJ1jY3p6A+2thTqdW+ZK58dhWCOdkLUcyZTP9gCu65LmCbrA7B79ULJoQUjtlbir5p D/SSSKNDbrkiQAcwOdroX7qxOSf14eDwkE9ZKjmQbgtZ5SoKVLiaXQJiYUlVAHV1rX/W EOuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785911858; x=1786516658; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to:content-type; bh=b4ZEBgaYu4NWsal9ngxUhxqIARMe9bWnTN0kY1ehGyE=; b=HJiZeInkUXhOIaHWJqih8PCwps0OdyznjJDf+ew7ms+59xZkTlS+9JKPL7NYTzb8k8 KY4yxteqyiU9Av7dD8/RiBkOhNKtDsVkcdRQlFNiFFb2KffyfKc5wrcZVHcW1mm/hiiM 9i/F3xdjQeRDRxZYzvAAdSi/hdQMfXGg2YR7W4z16Tsu0thbBwCXkbwqa9Q42n02EzIp 640a91ss8wbbPGo4X9Lyz30EtIeyHNpuSSQeCAaPvAZtg8KHjdX72+naSCtEQ7HAnzw5 7KKvRGF9X2uFPuGEofjJctfhBd9vJzHpEjVrDGBcO55RJzf9iNEXsg34v3yiwyOiz6MG 4VeA== X-Gm-Message-State: AOJu0Yw8ZhKzvjdXm+va0RI7fqloJL9Hcu1Z7ZlKrAtBFdruOAbP7AoQ BaTAzgI5OAYD+n6MYpUqYx0KLBfZfZetz0CGXpGtxb2l3n3OCKK8D1Lugga1lA== X-Gm-Gg: AR+sD13B4RtiVKm7ssZB8DR7QRVvsO0xOEJrYcY/8cM0KxD9BXL/RGz8BPfu5otI+Ne aVOH0NofMlRzAvFngaSANBWzVBDyKQd2ifpisi8Ryc73yr7oDLuxfmOvUwWkeP7sEe7QzwCwgEB HBixSDSop9xmmdAGnRFvFp8bmj5w9RFDOzZZjqE56KGkTIUDvVYajiZTipq1zOJ3SXtgZvsrljv PHO6qKy25je1PT2aByRn6tyUyZMABgMR0971LerdphiOueIR5vuAKKcz0wU7wS8A4l0HgO96lYE 8XcHnphclDj6dc/RtLNI0GU6NVYgNVmaqqZnT/1pq2hZiDKxg1/eBtJ8/xUHmHviubxH/hHDijH Q4Y7pq0mL/znRM6pFjaHT4iX4pWw1n/bnZ06JsRxX5CuGjbSGDW8cEND8d9iYlfSLw3uCAHDO4H L0+wa/E+LwQTjw/ANjJyHiJr11x7ualJdFSJe0cKIGaIOXcq8enkxvIhKSr/UW8M8HlY7YzR454 iR4IBOr7Hp+kyfcWnpvT4V8EUTZpVrEet54O+JObkQ= X-Received: by 2002:a05:620a:8089:b0:933:aa0:bb83 with SMTP id af79cd13be357-9364927587dmr393113185a.34.1785911858025; Tue, 04 Aug 2026 23:37:38 -0700 (PDT) Received: from localhost.localdomain (pppoe-209-91-167-254.vianet.ca. [209.91.167.254]) by smtp.gmail.com with ESMTPSA id af79cd13be357-9364a52dbeesm94187285a.30.2026.08.04.23.37.36 for <gcc-patches@gcc.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Aug 2026 23:37:37 -0700 (PDT) From: Trevor Woerner <twoerner@gmail.com> To: gcc-patches@gcc.gnu.org Subject: [PATCH 2/3] libga68: do not record the source directory in generated sources Date: Wed, 5 Aug 2026 02:37:28 -0400 Message-ID: <20260805063729.3492311-2-twoerner@gmail.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260805063729.3492311-1-twoerner@gmail.com> References: <20260805063729.3492311-1-twoerner@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-8.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, 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 <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org |
| Series |
[1/3] libga68: honour a preset A68FLAGS
|
|
Checks
| Context | Check | Description |
|---|---|---|
| linaro-tcwg-bot/tcwg_simplebootstrap_build--master-arm-bootstrap | success | Build passed |
| linaro-tcwg-bot/tcwg_gcc_build--master-arm | fail | Patch failed to apply |
| linaro-tcwg-bot/tcwg_simplebootstrap_build--master-aarch64-bootstrap | fail | Patch failed to apply |
Commit Message
Trevor Woerner
Aug. 5, 2026, 6:37 a.m. UTC
sppp.awk writes a header comment naming the file it was generated from,
using awk's FILENAME. The makefile rule invokes it as
$(AWK) -f $(srcdir)/sppp.awk $< > $@
so FILENAME is $(srcdir)/standard.a68.in, and for an out-of-tree build
with an absolute srcdir the resulting standard.a68 begins with
{ This is auto-generated from /abs/path/to/libga68/standard.a68.in.
Do not edit. }
The content of a generated source therefore depends on where the tree
was unpacked. That is a reproducibility problem in its own right, and it
leaks the build directory into anything that ships the generated source,
such as a distribution's debug-source package.
Print only the file name, which is what the comment is for.
Assisted by: Codex (Claude Opus 5)
libga68/ChangeLog:
* sppp.awk: Strip any directory prefix from FILENAME in the
generated header comment.
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
---
libga68/sppp.awk | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Comments
Hello. > sppp.awk writes a header comment naming the file it was generated from, > using awk's FILENAME. The makefile rule invokes it as > > $(AWK) -f $(srcdir)/sppp.awk $< > $@ > > so FILENAME is $(srcdir)/standard.a68.in, and for an out-of-tree build > with an absolute srcdir the resulting standard.a68 begins with > > { This is auto-generated from /abs/path/to/libga68/standard.a68.in. > Do not edit. } > > The content of a generated source therefore depends on where the tree > was unpacked. That is a reproducibility problem in its own right, and it > leaks the build directory into anything that ships the generated source, > such as a distribution's debug-source package. > > Print only the file name, which is what the comment is for. It is reasonable, thanks. I just installed this patch on your behalf. > > Assisted by: Codex (Claude Opus 5) > > libga68/ChangeLog: > > * sppp.awk: Strip any directory prefix from FILENAME in the > generated header comment. > > Signed-off-by: Trevor Woerner <twoerner@gmail.com> > --- > libga68/sppp.awk | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/libga68/sppp.awk b/libga68/sppp.awk > index 8ab94bac6363..97a2fb825b3e 100644 > --- a/libga68/sppp.awk > +++ b/libga68/sppp.awk > @@ -29,7 +29,9 @@ BEGIN { > } > > /^[ \t]*\{ Process this file/ { > - print "{ This is auto-generated from " FILENAME ". Do not edit. }" > + srcfile = FILENAME > + sub (/^.*\//, "", srcfile) > + print "{ This is auto-generated from " srcfile ". Do not edit. }" > next > }
diff --git a/libga68/sppp.awk b/libga68/sppp.awk index 8ab94bac6363..97a2fb825b3e 100644 --- a/libga68/sppp.awk +++ b/libga68/sppp.awk @@ -29,7 +29,9 @@ BEGIN { } /^[ \t]*\{ Process this file/ { - print "{ This is auto-generated from " FILENAME ". Do not edit. }" + srcfile = FILENAME + sub (/^.*\//, "", srcfile) + print "{ This is auto-generated from " srcfile ". Do not edit. }" next }