public inbox for gdb-cvs@sourceware.org help / color / mirror / Atom feed
From: Tom de Vries <vries@sourceware.org> To: gdb-cvs@sourceware.org Subject: [binutils-gdb] [gdb/build] Fix build with gcc 4.8.5 Date: Tue, 12 Jul 2022 11:37:00 +0000 (GMT) [thread overview] Message-ID: <20220712113700.359BF385842B@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=02f0597c46892c4b69e0af45a95509bf310c759e commit 02f0597c46892c4b69e0af45a95509bf310c759e Author: Tom de Vries <tdevries@suse.de> Date: Tue Jul 12 13:36:57 2022 +0200 [gdb/build] Fix build with gcc 4.8.5 When building gdb with gcc 4.8.5, we run into problems due to unconditionally using: ... gdb_static_assert (std::is_trivially_copyable<packed>::value); ... in gdbsupport/packed.h. Fix this by guarding the usage with HAVE_IS_TRIVIALLY_COPYABLE. Tested by doing a full gdb build with gcc 4.8.5. Diff: --- gdbsupport/packed.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gdbsupport/packed.h b/gdbsupport/packed.h index ebc66c0cb1a..cd331b5477d 100644 --- a/gdbsupport/packed.h +++ b/gdbsupport/packed.h @@ -18,6 +18,8 @@ #ifndef PACKED_H #define PACKED_H +#include "traits.h" + /* Each instantiation and full specialization of the packed template defines a type that behaves like a given scalar type, but that has byte alignment, and, may optionally have a smaller size than the @@ -38,7 +40,9 @@ public: gdb_static_assert (alignof (packed) == 1); /* Make sure packed can be wrapped with std::atomic. */ +#if HAVE_IS_TRIVIALLY_COPYABLE gdb_static_assert (std::is_trivially_copyable<packed>::value); +#endif gdb_static_assert (std::is_copy_constructible<packed>::value); gdb_static_assert (std::is_move_constructible<packed>::value); gdb_static_assert (std::is_copy_assignable<packed>::value);
next reply other threads:[~2022-07-12 11:37 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-07-12 11:37 Tom de Vries [this message] 2022-08-07 14:03 Tom de Vries
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220712113700.359BF385842B@sourceware.org \ --to=vries@sourceware.org \ --cc=gdb-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).