From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7D64F385829C; Thu, 14 Mar 2024 20:27:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7D64F385829C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1710448074; bh=U/XP9ilkO/agA/QPTlIka+4Dad8JnAe+KnuaCsiIVX8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=FgISJEplpFGzvOjV6h7df0OOpjHD7g2Nhhe1ED5f4qftsV4P3Bc0vwhilBhk4mEwN egSeIyanWMjNCU+kyozOxJfkWCpX2AEfnshCEtVny2//DK9USSA3vRSGcL5YKy31y0 Nu+jnwUHfCcsVWXABXBuhlzPLXa16zOPDL4LzQzQ= From: "cvs-commit at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug build/31483] [gdb/build, postmarketos] error: 'W_EXITCODE' was not declared in this scope Date: Thu, 14 Mar 2024 20:27: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=3D31483 --- Comment #3 from Sourceware Commits --- The master branch has been updated by Tom de Vries : https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D97e9c24c3851= 3a69db81fe4c8206785c3a7050af commit 97e9c24c38513a69db81fe4c8206785c3a7050af Author: Tom de Vries Date: Thu Mar 14 21:28:44 2024 +0100 [gdb/build] Fix build on postmarketos I tried building gdbserver on postmarketos (which is based on alpine li= nux, which uses musl libc), and ran into: ... gdbserver/linux-low.cc: In lambda function: gdbserver/linux-low.cc:1907:41: error: \ 'W_EXITCODE' was not declared in this scope 1907 | mark_lwp_dead (leader_lp, W_EXITCODE (0, 0), true= ); | ^~~~~~~~~~ ... The macro W_EXITCODE is not defined in gdbsupport/gdb_wait.h. OTOH, WSETEXIT is defined there, but unused: ... /* These are not defined in POSIX, but are used by our programs. */ #ifndef WSETEXIT # ifdef W_EXITCODE #define WSETEXIT(w,status) ((w) =3D W_EXITCODE(status,0)) # else #define WSETEXIT(w,status) ((w) =3D (0 | ((status) << 8))) # endif #endif ... Fix this by dropping the WSETEXIT definition, and instead defining W_EXITCODE. Tested on x86_64-linux, in combination with an "#undef W_EXITCODE" to m= ake sure the definition is exercised. Approved-By: Tom Tromey PR build/31483 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31483 --=20 You are receiving this mail because: You are on the CC list for the bug.=