From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id O0jjK6VbzWJsRREAWB0awg (envelope-from ) for ; Tue, 12 Jul 2022 07:31:49 -0400 Received: by simark.ca (Postfix, from userid 112) id A6C281E5EA; Tue, 12 Jul 2022 07:31:49 -0400 (EDT) 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=lay7lsc5; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id A2F941E222 for ; Tue, 12 Jul 2022 07:31:48 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 697583857BBF for ; Tue, 12 Jul 2022 11:31:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 697583857BBF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1657625507; bh=oviuznRNf1xeRd78hE/y3WySu/h0hYlNcqaQMC9ASMU=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=lay7lsc5Kdy5PMV+4h2hAXhQ/MVKpyjEVFWLLlk1Z61tQALc1Z6gHspyb93v5exW+ DPkX0GimsEgMz2mE6KSEx6YaX91LWWCZc5/0wP/p0xxBdJXek7qKf6hel6EpeeSQJu oXBrO4Xgfk6aA36ydXlJaE/Nd4hRpEABCiTt9vHc= Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by sourceware.org (Postfix) with ESMTPS id 1C6BC3858C53 for ; Tue, 12 Jul 2022 11:31:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1C6BC3858C53 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 5D1B422A98; Tue, 12 Jul 2022 11:31:28 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 44DFA13A94; Tue, 12 Jul 2022 11:31:28 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 4IKbD5BbzWLACgAAMHmgww (envelope-from ); Tue, 12 Jul 2022 11:31:28 +0000 Date: Tue, 12 Jul 2022 13:31:26 +0200 To: gdb-patches@sourceware.org Subject: [PATCH][gdb/build] Fix build with gcc 4.8.5 Message-ID: <20220712113125.GA14559@delia.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Tom de Vries via Gdb-patches Reply-To: Tom de Vries Cc: Pedro Alves Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" Hi, When building gdb with gcc 4.8.5, we run into problems due to unconditionally using: ... gdb_static_assert (std::is_trivially_copyable::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. Any comments? Thanks, - Tom [gdb/build] Fix build with gcc 4.8.5 --- 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 @@ struct packed 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::value); +#endif gdb_static_assert (std::is_copy_constructible::value); gdb_static_assert (std::is_move_constructible::value); gdb_static_assert (std::is_copy_assignable::value);