| Message ID | 20260805063729.3492311-1-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 050E34BA7984 for <patchwork@sourceware.org>; Wed, 5 Aug 2026 06:38:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 050E34BA7984 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=IvskK7SK X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-qk1-x72b.google.com (mail-qk1-x72b.google.com [IPv6:2607:f8b0:4864:20::72b]) by sourceware.org (Postfix) with ESMTPS id 55A8C4BA2E11 for <gcc-patches@gcc.gnu.org>; Wed, 5 Aug 2026 06:37:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 55A8C4BA2E11 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 55A8C4BA2E11 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::72b ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1785911857; cv=none; b=rzssRo6TC5pKKDbhldewGs35KIy/rGSnil5A3mcruKiwwZGmwNyRr7acHR+iDrKO32Ilci/Tz+WpaFoPG9GSYC3WKnaCACr+kgqFdwiUgc/iUhTSGgchS2Jeq0LZ7HLk+lCbNMBQ1oZgBorplaR7a7Iai2gO/SafhCLc0ev6GTc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1785911857; c=relaxed/simple; bh=w0LgEXaIfh68tInqancZo52Zo9kcdkLz+gA6N+tt6F8=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=uRHKW7+4BORbcDlbHSqaE/TAjOoToA/1wf1xCx7ci0GV+6ygioNJdvzXpkNHq4tcPXliW/KCS/CcpdSSVMvVR20/VcXUxELJ3ZSS+U3ti0bC9va9tpp+2rI9U65HAd3uqAAzRiJSDQgfIn5rgWuyy8ryzTGqjgK8nw1STK7MpH4= 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=IvskK7SK DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 55A8C4BA2E11 Received: by mail-qk1-x72b.google.com with SMTP id af79cd13be357-92e6391b114so48976385a.3 for <gcc-patches@gcc.gnu.org>; Tue, 04 Aug 2026 23:37:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785911857; x=1786516657; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=RGliBxy1mNppZcPz/g/AlXFTDZ5cWFLerrZJKZxiWG0=; b=IvskK7SKoUv+lSPqZ30g20QW7eZcS+0xGcHTP8IIAqEn1PoS0rEZomgGZov6BgIjO7 rE2I+woTwt7SLg60AteX89OCNyf2abqUtIsLXiX5oMaHNDyzH4fvfyv86HMX2BXDMDsj 6hlqFV/qMr8oOc3JPFRnyOKGp1qJJeJ/K1hD2OqXbN4Uw40yOBa5pP5xtX4+tFOTqR8m T+A4f0FV54nh7vMaX36Jv7kQjWjyclpbfz/ESEbdp9eH3zA5+x4r66RY/rm31g73aKXK LYqX9wsgT4IQDdjTc/Ph42ujgLkJgRXm3VtchWQMU3LWlVKNbrIGGrvcsQpGXXqQRCRQ DINw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785911857; x=1786516657; h=content-transfer-encoding:mime-version: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=RGliBxy1mNppZcPz/g/AlXFTDZ5cWFLerrZJKZxiWG0=; b=FP0/kJlvHiEaKRtv/ppbTbkWxf9h1Wyz/tb82Kzg+bOVNcPU67wE9XiIYOkVl2PnTY Fz5dDyYzs2mT0GEW4FYTol88q+JNQmSztd54HTkChNkj7UN7uepjOrKdBjCtJIGfxwPe M/WMBaAy2MpDMe6BIm0mhZ6jd3ScNeNN2bMK34KFZyJAZV7FgqJs1rd/K9mAkXiV5XZm b/S9kAmYMYIqEI4yKUPXSNrlg9X35DDKOA2AZAUELLYimeTP+miXdWrr/8RnSDP+Y304 VG+lgQ2HbjgK7LB9HaVJV2Xib8hPc69tIY7IrPfSVfgTLOEPEyU6Yl2UzDNbAnlkFTV5 N3Vw== X-Gm-Message-State: AOJu0YyAmgDQVeSqAGsfmtslPio13vE5ApcKzDa31hdBP6loia9pKNNh 3gkH6T/7UyiH+lexbEJyFWL/u0+U7g7rPB2zz5QhLtYs6c2Cs1wSXqz6wUF9Hw== X-Gm-Gg: AR+sD13L+1lCvo0uYbR+tBXTYfuTYWFrtC4d4QXW4yXdwZLEFR/kCGRPKf2cEOo63rZ jejcXrGka006i/upWVcdNuf/xD9Gze69HoKgjgpE8CvSJ/GtCxitswQf+PGhj7EaLsUImlQCSPX Hkcx3q/eYRUaau5/lDYVVx8KaqYgEPA7RjB2ytkn81Zyktzrsvq/x70mdpM+b4JbWKyBjKqjmcr czP7SxfE4YCtEHKla/2b7KuGOUPtnSm2qNwDMIM459Kb8bqPC7QTEE1DICx2PXPCv/Z4sy/qUDI qqfCNA1KFGotmZxaxjVAjd3jxHfGV9zEJV4S+vh56fOyN/KFKJ+CvJHAB0waTvOMX8VGgPBod8i 4oY6tYf6pRtE6MdHGljbvMVDHiGZX9Mrg+WY+ZCbSjlE+LmRAZgFRN/b8EMVF9ISo3q9FbswXT8 VLeTDGwrZ+nI14CZcbuh9hxxmxGWXCM4py6x3lSwIHX4b9g5iU+Wksf1eqaWE5TzjKCiR+ye75f e1qJGj2rLjbv6yToBiEdPr1SHLVzkZk8QvWCcnVdg== X-Received: by 2002:a05:620a:26d0:b0:932:d9c4:3bec with SMTP id af79cd13be357-936492b387amr292404485a.38.1785911856698; Tue, 04 Aug 2026 23:37:36 -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.34 for <gcc-patches@gcc.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Aug 2026 23:37:36 -0700 (PDT) From: Trevor Woerner <twoerner@gmail.com> To: gcc-patches@gcc.gnu.org Subject: [PATCH 1/3] libga68: honour a preset A68FLAGS Date: Wed, 5 Aug 2026 02:37:27 -0400 Message-ID: <20260805063729.3492311-1-twoerner@gmail.com> X-Mailer: git-send-email 2.51.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-8.1 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
|
|
Commit Message
Trevor Woerner
Aug. 5, 2026, 6:37 a.m. UTC
AC_PROG_A68 declares A68FLAGS as a user variable with AC_ARG_VAR, which
promises that a value from the environment or the configure command line
is used, and then assigns it unconditionally nine lines later. Any value
the user supplied is discarded, so there is no way to control the flags
the Algol 68 compiles in libga68 are built with.
This matters when libga68 is built for a target whose objects have to be
reproducible: the sources compiled by ga68 receive A68FLAGS rather than
CFLAGS, so options such as -ffile-prefix-map never reach them and the
build directory is recorded in the debug information.
Default the variable only when it is unset, which is what libphobos
already does for GDCFLAGS in its own configure.ac:
if test -z "$GDCFLAGS"; then
GDCFLAGS="-g -O2"
fi
Assisted by: Codex (Claude Opus 5)
libga68/ChangeLog:
* m4/autoconf.m4 (AC_PROG_A68): Only default A68FLAGS when it
is unset.
* configure: Regenerate.
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
---
libga68/configure | 4 +++-
libga68/m4/autoconf.m4 | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
Comments
Hello Trevor. Thanks for the patch. I just installed it on your behalf. > AC_PROG_A68 declares A68FLAGS as a user variable with AC_ARG_VAR, which > promises that a value from the environment or the configure command line > is used, and then assigns it unconditionally nine lines later. Any value > the user supplied is discarded, so there is no way to control the flags > the Algol 68 compiles in libga68 are built with. > > This matters when libga68 is built for a target whose objects have to be > reproducible: the sources compiled by ga68 receive A68FLAGS rather than > CFLAGS, so options such as -ffile-prefix-map never reach them and the > build directory is recorded in the debug information. > > Default the variable only when it is unset, which is what libphobos > already does for GDCFLAGS in its own configure.ac: > > if test -z "$GDCFLAGS"; then > GDCFLAGS="-g -O2" > fi > > Assisted by: Codex (Claude Opus 5) > > libga68/ChangeLog: > > * m4/autoconf.m4 (AC_PROG_A68): Only default A68FLAGS when it > is unset. > * configure: Regenerate. > > Signed-off-by: Trevor Woerner <twoerner@gmail.com> > --- > libga68/configure | 4 +++- > libga68/m4/autoconf.m4 | 4 +++- > 2 files changed, 6 insertions(+), 2 deletions(-) > > diff --git a/libga68/configure b/libga68/configure > index 731476fc9095..1208c3fa616d 100755 > --- a/libga68/configure > +++ b/libga68/configure > @@ -5906,7 +5906,9 @@ $as_echo "$ac_try_echo"; } >&5 > rm -f conftest.er1 conftest.err > $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 > test $ac_status = 0; } > -A68FLAGS="-g -O2" > +if test -z "$A68FLAGS"; then > + A68FLAGS="-g -O2" > +fi > ac_ext=c > ac_cpp='$CPP $CPPFLAGS' > ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' > diff --git a/libga68/m4/autoconf.m4 b/libga68/m4/autoconf.m4 > index 7b85996265c0..daf67322f35e 100644 > --- a/libga68/m4/autoconf.m4 > +++ b/libga68/m4/autoconf.m4 > @@ -126,6 +126,8 @@ ac_compiler=$[2] > _AC_DO_LIMIT([$ac_compiler --version >&AS_MESSAGE_LOG_FD]) > m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl > m4_expand_once([_AC_COMPILER_OBJEXT])[]dnl > -A68FLAGS="-g -O2" > +if test -z "$A68FLAGS"; then > + A68FLAGS="-g -O2" > +fi > AC_LANG_POP(Algol 68)dnl > ])# AC_PROG_A68
diff --git a/libga68/configure b/libga68/configure index 731476fc9095..1208c3fa616d 100755 --- a/libga68/configure +++ b/libga68/configure @@ -5906,7 +5906,9 @@ $as_echo "$ac_try_echo"; } >&5 rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } -A68FLAGS="-g -O2" +if test -z "$A68FLAGS"; then + A68FLAGS="-g -O2" +fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' diff --git a/libga68/m4/autoconf.m4 b/libga68/m4/autoconf.m4 index 7b85996265c0..daf67322f35e 100644 --- a/libga68/m4/autoconf.m4 +++ b/libga68/m4/autoconf.m4 @@ -126,6 +126,8 @@ ac_compiler=$[2] _AC_DO_LIMIT([$ac_compiler --version >&AS_MESSAGE_LOG_FD]) m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl m4_expand_once([_AC_COMPILER_OBJEXT])[]dnl -A68FLAGS="-g -O2" +if test -z "$A68FLAGS"; then + A68FLAGS="-g -O2" +fi AC_LANG_POP(Algol 68)dnl ])# AC_PROG_A68