From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id kjRpIWQYd2lhrxUAWB0awg (envelope-from ) for ; Mon, 26 Jan 2026 02:31:48 -0500 Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=MOrX5xgt; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 677721E0AD; Mon, 26 Jan 2026 02:31:48 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 9F2B01E089 for ; Mon, 26 Jan 2026 02:31:47 -0500 (EST) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 0491C4BA9025 for ; Mon, 26 Jan 2026 07:31:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0491C4BA9025 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1769412707; bh=kq6EKa2+P9fk/aQ0+EkrOFQ2nEzX4+nnnBVq7lLeHlE=; h=References:In-Reply-To:Date:Subject:To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=MOrX5xgtGj+D4D/a0OQ7FP12Vg+dW003MGxYd7FL/k5dVapQsIsJwTzF1U5Z62GZv /V23rIOG0izY2BcnXn3sbskxW536ZYN95Dzto6WGRaq10n7pRUAQqMZuqVQJ82JmOU h5LNaz4okBawnkpD0zGj9ph2n1ugwKMO0E/XAey4= Received: from mail-yx1-xb12e.google.com (mail-yx1-xb12e.google.com [IPv6:2607:f8b0:4864:20::b12e]) by sourceware.org (Postfix) with ESMTPS id 6D7E84BA2E2D for ; Mon, 26 Jan 2026 07:31:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6D7E84BA2E2D ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 6D7E84BA2E2D ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1769412672; cv=pass; b=RK/rNp1akBblXG8OqWDU/2H5tKAqw+aUZEu/RPOUbu1nDlNi8lL+saqlngdUfq+CBmSmOOwIZ0D+xu3JmPUwK6X6LBl4B3VfwjMJ+iB1kaGJFC7cgpU/R4w6076uVih8mJO5FRLx264cr6Zx8peaZ2gHMTa655k8G/c2BH3A8OM= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1769412672; c=relaxed/simple; bh=XaihoOaodpgJQ2E1GA6gP+lPXTLzneVyh4eKRFsb5+U=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=nyu9a9O/K/neLbOsD21FYy0lt9PkP2U1P8GAZ2Hzum/sumrXr2Rmp3X8qKQLpzmAkdzEdVzW1Ywco2OfIKp2Zd0QyALHthWnt4tKYfohSYLbz40X5vBJrqPtPeE/tOPKUrg52AuE5iUa4bktmtMlBBuF9x4ABGWry3raIDf37rY= ARC-Authentication-Results: i=2; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6D7E84BA2E2D Received: by mail-yx1-xb12e.google.com with SMTP id 956f58d0204a3-64937edbc9eso3656022d50.2 for ; Sun, 25 Jan 2026 23:31:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1769412672; cv=none; d=google.com; s=arc-20240605; b=gwDMbbsS7j8XD2S+Rp00b1q8t6zI/90AzeH2efPsdGBz77cMeVZmkEx3YnSz2EvQLz WbAa2/X9y5S5MzB2GZxz79Aa88kbWgfTl3WW9sLD+bRCJvPxOi6EWxBJDJ28pdDgZdVI GRJPo0/tH4ycMINje24ussM5rv6aRA+uB6RmT8Iq27wXPQpZ9XE+gfds4kzGWc+R1FPy o8oGCbkfLUvULGwQzdJdHqceWjoI3M8n+qXEzOojP4eEYAwACW7zAfwfmr0AYsSZk60r 6YGJ8I86ReVOHXhrYC3aDynfIRk0vyoc/F/au5JX/kAXHk2pv3eRVi/q9tKq/nJORZnN EOqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=kq6EKa2+P9fk/aQ0+EkrOFQ2nEzX4+nnnBVq7lLeHlE=; fh=SyVv6L99oofue1Djac/IjDsdMBNIvlPryJKrhrNnf+g=; b=AWWST9SXfrKS8BI0HtkGCZhtRMl/YaCsb6O/NjX1EGmYl7n04s6ly5ouD4PyY1I0+P 8D/g9udbSrWMHrPKYnEze+jRFz5D5Shqi6ynjtRwnIlYbuCcwfQ9W+OD+jb9yj+P4ogb wXpb64m1hlfeAPhJJLe+hZXzAurpMcViqDT381WRFXp1lXi13hg12We+fdCo9vebhOhT ITF8VkB4z8zmi7SGnPZbCRMO7IvAjUuL9PtYw8Z2bRaYVK0D0Rueqrd/s1ACwQc4h+qU DhEMUNgsLpF7X7sRY7OeY+tq/iUu+JNqnX+6cp47e3wMCQAPB5157fiBhR+lt7YgQneZ 78sA==; darn=sourceware.org ARC-Authentication-Results: i=1; mx.google.com; arc=none X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769412672; x=1770017472; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=kq6EKa2+P9fk/aQ0+EkrOFQ2nEzX4+nnnBVq7lLeHlE=; b=pNqI5YpN/QBYXVb++HgSmWeb6lPoJ9abwYGRie9erRvcjTzvTdloJMxpkkiE5lPZ9/ ODr1AnqBq7U/UuDwfws24W4SmyQ2DtBcM5Tv1/IYE+f0W8g8aC7XoNXYA1rdvWHNzPGg +XlbaSdxDpguBuFpbB9ASfPJAaodYvMFE89jrd2MIWtvIDgYNp+aR9lCkrSb1HQLYkYG 1hHfviwUwicoacnkA0uQ975MQhopHgGZDNCteyVy0mA+gFtYDMjG44vWDwHkNxKHHKXT Le7E3MLgAXF1Oc2u0g/v7jFZCNnKygWBXDA4bbqKLzc2CdS1Ag9fiFDwYKsHcbBQtxjP Nnow== X-Gm-Message-State: AOJu0YyoKcroJk1BJA+5CjIrgAS91P1F1WMg1MrpUyx6xAKA6/BCBIzl C/lqISXSqQsOIjUJoScgFyxXQAvqimznHz2Ck6XWcjHSipmIbL/LBzhK9boVcEtKdBLuHpTmi1t IWyhIoYsR+JWan+nfpP10oaBqiszquZ1Iln2i X-Gm-Gg: AZuq6aJNM+WzwvvjVdWI+6nMijSlAVuPQcIqVVdnKOZLtGX5F3jEx+JkTFBU0waBBXk TpaMbB8cmad+3DGhadkY9Ez2vb0YQIUAjFM+W4sUGWWBsWKtMG4iROpaZ4hmUPE3MLWKiLIyqA3 bcoIfocc0EooBUSj0FBIrK1d2QhYdLLVAzh6tUSsIIFLMpX/3Juww89pdot2fOe5eK2m+y9WRIh pqa7WFb2lbyjXu0iw4oi7qB6eztLeG0jBtWvpDTg5jsLCx9DtuyPAACY+bbU0wMEMGXhcA= X-Received: by 2002:a53:d016:0:b0:644:7919:52d with SMTP id 956f58d0204a3-64970cc8d2amr2297414d50.65.1769412671680; Sun, 25 Jan 2026 23:31:11 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Mon, 26 Jan 2026 20:31:00 +1300 X-Gm-Features: AZwV_QgkiiBeMALUkijFveHP-khcAMHHPYRnGngD_Up3GCAvuowN5wtu1mju5Tw Message-ID: Subject: Re: GDB 17 build failure with musl To: Andrew Pinski Cc: GDB Mailing list Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Chris Packham via Gdb Reply-To: Chris Packham Errors-To: gdb-bounces~public-inbox=simark.ca@sourceware.org Sender: "Gdb" On Mon, Jan 26, 2026 at 7:55=E2=80=AFPM Andrew Pinski w= rote: > > On Sun, Jan 25, 2026 at 10:30=E2=80=AFPM Chris Packham via Gdb > wrote: > > > > Hi GDB, > > > > I've just updated crosstool-ng to include gdb 17.1 and the aarch64 > > musl toolchain fails with > > > > [ERROR] /home/runner/work/crosstool-ng/crosstool-ng/.build/aarch64-u= nknown-linux-musl/src/gdb/gdbserver/../gdb/arch/aarch64-gcs-linux.h:35:8: > > error: redefinition of 'struct user_gcs' > > [ALL ] 35 | struct user_gcs > > [ALL ] | ^~~~~~~~ > > [ALL ] In file included from > > /home/runner/work/crosstool-ng/crosstool-ng/.build/aarch64-unknown-linu= x-musl/src/gdb/gdbserver/linux-aarch64-low.cc:35: > > [ALL ] /home/runner/work/crosstool-ng/crosstool-ng/x-tools/aarch64-= unknown-linux-musl/aarch64-unknown-linux-musl/sysroot/usr/include/asm/ptrac= e.h:329:8: > > note: previous definition of 'struct user_gcs' > > [ALL ] 329 | struct user_gcs { > > [ALL ] | ^~~~~~~~ > > > > Does this ring any bells for anyone? Builds with gdb 16.3 are fine. > > So aarch64-gcs-linux.h checks to see if GCS_MAGIC is defined to see if > user_gcs is needed to be declared. > > GCS_MAGIC is defined in asm/sigcontext.h while gcs_user is defined in > asm/ptrace.h. > > Maybe the issue is asm/sigcontext.h is not being included (indirectly > like it is on glibc). > Try adding > #include > After the include of asm/ptrace.h in gdbserver/linux-aarch64-low.cc . > Unfortunately that has its own issues [ERROR] /home/ctng/x-tools/aarch64-unknown-linux-musl/aarch64-unknown-li= nux-musl/sysroot/usr/include/asm/sigcontext.h:28:8: error: redefinition of 'struct sigcontext' [ERROR] /home/ctng/x-tools/aarch64-unknown-linux-musl/aarch64-unknown-li= nux-musl/sysroot/usr/include/asm/sigcontext.h:70:8: error: redefinition of 'struct _aarch64_ctx' [ERROR] /home/ctng/x-tools/aarch64-unknown-linux-musl/aarch64-unknown-li= nux-musl/sysroot/usr/include/asm/sigcontext.h:77:8: error: redefinition of 'struct fpsimd_context' [ERROR] /home/ctng/x-tools/aarch64-unknown-linux-musl/aarch64-unknown-li= nux-musl/sysroot/usr/include/asm/sigcontext.h:96:8: error: redefinition of 'struct esr_context' [ERROR] /home/ctng/x-tools/aarch64-unknown-linux-musl/aarch64-unknown-li= nux-musl/sysroot/usr/include/asm/sigcontext.h:136:8: error: redefinition of 'struct extra_context' [ERROR] /home/ctng/x-tools/aarch64-unknown-linux-musl/aarch64-unknown-li= nux-musl/sysroot/usr/include/asm/sigcontext.h:145:8: error: redefinition of 'struct sve_context' > Thanks, > Andrew Pinski > > > > > > Thanks, > > Chris