Blame SOURCES/gdb-dts-use-decltype.patch
|
|
a8223e |
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
|
|
a8223e |
From: Keith Seitz <keiths@redhat.com>
|
|
|
a8223e |
Date: Thu, 17 Jun 2021 14:17:23 -0400
|
|
|
a8223e |
Subject: gdb-dts-use-decltype.patch
|
|
|
a8223e |
|
|
|
a8223e |
;; Use decltype instead of typeof in headers
|
|
|
a8223e |
;; (Keith Seitz)
|
|
|
a8223e |
|
|
|
a8223e |
DTS11 defaults to c++17, which causes problems with the system-supplied
|
|
|
a8223e |
python headers, which use the (now forbidden) "register" storage class.
|
|
|
a8223e |
|
|
|
a8223e |
To work around this, we explicitly enable -std=c++11. However, that
|
|
|
a8223e |
now causes problems with the use of "typeof" in header files, since
|
|
|
a8223e |
-std often disables certain keywords.
|
|
|
a8223e |
|
|
|
a8223e |
Fix this by using the standard's decltype specifier instead.
|
|
|
a8223e |
|
|
|
a8223e |
diff --git a/gdbsupport/gdb_proc_service.h b/gdbsupport/gdb_proc_service.h
|
|
|
a8223e |
--- a/gdbsupport/gdb_proc_service.h
|
|
|
a8223e |
+++ b/gdbsupport/gdb_proc_service.h
|
|
|
a8223e |
@@ -174,7 +174,7 @@ extern ps_err_e ps_lsetxregs (struct ps_prochandle *ph, lwpid_t lwpid,
|
|
|
a8223e |
-fvisibility=hidden. */
|
|
|
a8223e |
|
|
|
a8223e |
#define PS_EXPORT(SYM) \
|
|
|
a8223e |
- __attribute__((visibility ("default"))) typeof (SYM) SYM
|
|
|
a8223e |
+ __attribute__((visibility ("default"))) decltype (SYM) SYM
|
|
|
a8223e |
|
|
|
a8223e |
PS_EXPORT (ps_get_thread_area);
|
|
|
a8223e |
PS_EXPORT (ps_getpid);
|