From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9377C385803E; Thu, 30 Nov 2023 20:31:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9377C385803E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1701376313; bh=zvM7DBvktyVyStlsvNJn5JV/iOstlm2a+0wX+zjrLTI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Uo1LH1R9fij3KS1mgzLUN3T7q6Qzz5zD6Z/qN0oURXYfBmsUxXPdK5L7ILHSoyYt0 OQeJt+SrrphfWDI29OtYcknjYQurqMI72jMXnFFq8tsVgOZojbvIqhq9DK1AqSzlLJ yVyX1Ao3YQ12AOkIJ3BKpZR0gK/jmofOgP8fAzuo= From: "cvs-commit at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug build/31099] [gdb/build] -DNDEBUG missing in python flags of release build Date: Thu, 30 Nov 2023 20:31:53 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: build X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31099 --- Comment #2 from Sourceware Commits --- The master branch has been updated by Tom de Vries : https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Dd5835df2eebf= 8e9cd3ae35b683c831c2a16a5269 commit d5835df2eebf8e9cd3ae35b683c831c2a16a5269 Author: Tom de Vries Date: Thu Nov 30 21:31:46 2023 +0100 [gdb/build] Fix adding -DNDEBUG to python flags of release build In gdb/configure the line: ... $development || tentative_python_cflags=3D"$tentative_python_cflags -DNDEBUG" ... intends to ensure that -DNDEBUG is added to the python flags of a relea= se build. However, when building gdb-14-branch we have: ... configure:22024: checking compiler flags for python code ... configure:22047: result: -fno-strict-aliasing -fwrapv ... This is a regression since commit db6878ac553 ("Move sourcing of development.sh to GDB_AC_COMMON"), which introduced a reference before assignment: ... $development || tentative_python_cflags=3D"$tentative_python_cflags -DNDEBUG" ... . $srcdir/../bfd/development.sh ... and consequently -DNDEBUG is never added. [ This was not obvious to me, but apparently evaluating an empty or undefined variable in this context is similar to using ':' or 'true', so the line= is evaluated as: ... true || tentative_python_cflags=3D"$tentative_python_cflags -DNDEBU= G" ... ] Fix this by moving GDB_AC_COMMON up in gdb/configure.ac, similar to how that was done for gdbserver/configure.ac in commit db6878ac553. [ Unfortunately, the move might introduce issues similar to the one we'= re fixing, and I'm not sure how to check for this. Shellcheck doesn't det= ect this type of problem. FWIW, I did run shellcheck (using arguments -xa,= in the src/gdb directory to make sure ../bfd/development.sh is taken into acco= unt) before and after and observed that the number of lines/words/chars in t= he shellcheck output is identical. ] Build & tested on top of trunk. Also build on top of gdb-14-branch, and observed this in gdb/config.log: ... configure:25214: checking compiler flags for python code ... configure:25237: result: -fno-strict-aliasing -fwrapv -DNDEBUG ... Approved-By: Tom Tromey PR build/31099 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31099 --=20 You are receiving this mail because: You are on the CC list for the bug.=