public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/gdb] gdb-17.2-rebase-f44: Add gdb-aarch64-guard-sve-macros.patch and unbreak Aarch64 build
@ 2026-06-27 23:58 Sergio Durigan Junior
0 siblings, 0 replies; only message in thread
From: Sergio Durigan Junior @ 2026-06-27 23:58 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/gdb
Branch : gdb-17.2-rebase-f44
Commit : 732f37d3a415e5f747d70b261bda8daa39ae9744
Author : Sergio Durigan Junior <sergiodj@redhat.com>
Date : 2018-06-07T14:14:40-04:00
Stats : +80/-0 in 4 file(s)
URL : https://src.fedoraproject.org/rpms/gdb/c/732f37d3a415e5f747d70b261bda8daa39ae9744?branch=gdb-17.2-rebase-f44
Log:
Add gdb-aarch64-guard-sve-macros.patch and unbreak Aarch64 build
---
diff --git a/_gdb.spec.Patch.include b/_gdb.spec.Patch.include
index 3ee5fa4..fa0ec1e 100644
--- a/_gdb.spec.Patch.include
+++ b/_gdb.spec.Patch.include
@@ -508,3 +508,7 @@ Patch121: gdb-vla-intel-fix-print-char-array.patch
# =fedoratest
Patch122: gdb-rhbz1553104-s390x-arch12-test.patch
+# Guard declarations of 'sve_{vq,vl}_from_{vl,vq}' macros on Aarch64
+# This patch should be removed on the next rebase.
+Patch123: gdb-aarch64-guard-sve-macros.patch
+
diff --git a/_gdb.spec.patch.include b/_gdb.spec.patch.include
index 131cf93..27a39b7 100644
--- a/_gdb.spec.patch.include
+++ b/_gdb.spec.patch.include
@@ -120,3 +120,4 @@
%patch120 -p1
%patch121 -p1
%patch122 -p1
+%patch123 -p1
diff --git a/_patch_order b/_patch_order
index aaec704..0b3b3e8 100644
--- a/_patch_order
+++ b/_patch_order
@@ -120,3 +120,4 @@ gdb-testsuite-readline63-sigint.patch
gdb-archer.patch
gdb-vla-intel-fix-print-char-array.patch
gdb-rhbz1553104-s390x-arch12-test.patch
+gdb-aarch64-guard-sve-macros.patch
diff --git a/gdb-aarch64-guard-sve-macros.patch b/gdb-aarch64-guard-sve-macros.patch
new file mode 100644
index 0000000..6a7b3e7
--- /dev/null
+++ b/gdb-aarch64-guard-sve-macros.patch
@@ -0,0 +1,74 @@
+From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
+From: Sergio Durigan Junior <sergiodj@redhat.com>
+Date: Tue, 5 Jun 2018 17:55:39 -0400
+Subject: gdb-aarch64-guard-sve-macros.patch
+
+FileName: gdb-aarch64-guard-sve-macros.patch
+
+;; Guard declarations of 'sve_{vq,vl}_from_{vl,vq}' macros on Aarch64
+;; This patch should be removed on the next rebase.
+
+Guard declarations of 'sve_{vq,vl}_from_{vl,vq}' macros on Aarch64 (and unbreak build)
+
+Commit 122394f1476b1c925a281b15399119500c8231c1 ("Function for reading
+the Aarch64 SVE vector length") has added macros to manipulate SVE
+vector sizes based on Linux kernel sources, but did not guard them
+with #ifndef's, which breaks the build when the system headers already
+have these macros:
+
+ CXX aarch64-linux-nat.o
+ In file included from ../../gdb/aarch64-tdep.h:25,
+ from ../../gdb/aarch64-linux-nat.c:30:
+ ../../gdb/arch/aarch64.h:79: error: "sve_vq_from_vl" redefined [-Werror]
+ #define sve_vq_from_vl(vl) ((vl) / 0x10)
+
+ In file included from /usr/include/bits/sigcontext.h:30,
+ from /usr/include/signal.h:291,
+ from build-gnulib/import/signal.h:52,
+ from ../../gdb/linux-nat.h:23,
+ from ../../gdb/aarch64-linux-nat.c:26:
+ /usr/include/asm/sigcontext.h:154: note: this is the location of the previous definition
+ #define sve_vq_from_vl(vl) ((vl) / SVE_VQ_BYTES)
+
+ In file included from ../../gdb/aarch64-tdep.h:25,
+ from ../../gdb/aarch64-linux-nat.c:30:
+ ../../gdb/arch/aarch64.h:80: error: "sve_vl_from_vq" redefined [-Werror]
+ #define sve_vl_from_vq(vq) ((vq) * 0x10)
+
+ In file included from /usr/include/bits/sigcontext.h:30,
+ from /usr/include/signal.h:291,
+ from build-gnulib/import/signal.h:52,
+ from ../../gdb/linux-nat.h:23,
+ from ../../gdb/aarch64-linux-nat.c:26:
+ /usr/include/asm/sigcontext.h:155: note: this is the location of the previous definition
+ #define sve_vl_from_vq(vq) ((vq) * SVE_VQ_BYTES)
+
+In order to fix this breakage, this commit guards the declaration of
+the macros using #ifndef's.
+
+gdb/ChangeLog:
+2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
+
+ * arch/aarch64.h (sve_vg_from_vl): Guard with #ifndef.
+ (sve_vl_from_vg): Likewise.
+ (sve_vq_from_vl): Likewise.
+ (sve_vl_from_vq): Likewise.
+ (sve_vq_from_vg): Likewise.
+ (sve_vg_from_vq): Likewise.
+
+diff --git a/gdb/arch/aarch64.h b/gdb/arch/aarch64.h
+--- a/gdb/arch/aarch64.h
++++ b/gdb/arch/aarch64.h
+@@ -76,8 +76,12 @@ enum aarch64_regnum
+
+ #define sve_vg_from_vl(vl) ((vl) / 8)
+ #define sve_vl_from_vg(vg) ((vg) * 8)
++#ifndef sve_vq_from_vl
+ #define sve_vq_from_vl(vl) ((vl) / 0x10)
++#endif
++#ifndef sve_vl_from_vq
+ #define sve_vl_from_vq(vq) ((vq) * 0x10)
++#endif
+ #define sve_vq_from_vg(vg) (sve_vq_from_vl (sve_vl_from_vg (vg)))
+ #define sve_vg_from_vq(vq) (sve_vg_from_vl (sve_vl_from_vq (vq)))
+
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-06-27 23:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-27 23:58 [rpms/gdb] gdb-17.2-rebase-f44: Add gdb-aarch64-guard-sve-macros.patch and unbreak Aarch64 build Sergio Durigan Junior
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox