From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id eMotHMD8CGTuRQkAWB0awg (envelope-from ) for ; Wed, 08 Mar 2023 16:23:12 -0500 Received: by simark.ca (Postfix, from userid 112) id 7001C1E223; Wed, 8 Mar 2023 16:23:12 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, NICE_REPLY_A,RCVD_IN_DNSWL_HI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from sourceware.org (ip-8-43-85-97.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 24E1A1E110 for ; Wed, 8 Mar 2023 16:23:12 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5A9EF3850200 for ; Wed, 8 Mar 2023 21:23:11 +0000 (GMT) Received: from mail.contemporary.net.au (msc1401703.lnk.telstra.net [139.130.245.200]) by sourceware.org (Postfix) with ESMTPS id E21E93858C78 for ; Wed, 8 Mar 2023 21:22:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E21E93858C78 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rtems.org Authentication-Results: sourceware.org; spf=none smtp.mailfrom=rtems.org Received: from [10.10.11.8] ([10.10.11.8]) (authenticated bits=0) by mail.contemporary.net.au (8.15.2/8.15.2) with ESMTPSA id 328LMhB0030980 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Thu, 9 Mar 2023 08:22:45 +1100 (EST) (envelope-from chrisj@rtems.org) Message-ID: Date: Thu, 9 Mar 2023 08:22:43 +1100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: GDB 13.1 and clang Content-Language: en-AU To: Simon Marchi , gdb@sourceware.org References: From: Chris Johns Organization: https://www.rtems.org/ In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb" On 9/3/2023 5:22 am, Simon Marchi wrote: > On 3/8/23 15:07, Chris Johns wrote: >> Hi, >> >> I have just tried to build the latest RTEMS tools and we now use gdb 13.1. I am >> seeing a build failure on FreeBSD 13.1 of: >> >> In file included from ../../gdb-13.1/gdb/xml-tdesc.c:23: >> In file included from ../../gdb-13.1/gdb/target.h:42: >> In file included from ../../gdb-13.1/gdb/infrun.h:21: >> In file included from ../../gdb-13.1/gdb/gdbthread.h:26: >> In file included from ../../gdb-13.1/gdb/breakpoint.h:38: >> ../../gdb-13.1/gdb/target/waitstatus.h:113:1: error: use of undeclared >> identifier 'DIAGNOSTIC_ERROR_SWITCH' >> DIAGNOSTIC_ERROR_SWITCH >> ^ >> >> I only have clang installed on the FreeBSD machine. >> >> A quick review of include/diagnostics.h seems to show support for >> DIAGNOSTIC_ERROR_SWITCH only in the gcc area? > > Hmm, I see it in the clang section: > > # define DIAGNOSTIC_ERROR_SWITCH \ > DIAGNOSTIC_ERROR ("-Wswitch") > It seems I need to do a better review before posting :) > https://sourceware.org/cgit/binutils-gdb/tree/include/diagnostics.h?h=gdb-13.1-release&id=4f3e26ac6ee31f7bc4b04abd8bdb944e7f1fc5d2#n76 > > Unless there's a typo I don't see. > > diagnostics.h is included at the top of waitstatus.h. Is it possible > that another unrelated diagnostics.h gets included on FreeBSD? You > could inspect the preprocessed file to see what the preprocessor > included for diagnostics.h. There is another version installed here: $ pkg which /usr/local/include/diagnostics.h /usr/local/include/diagnostics.h was installed by package binutils-2.37_2,1 We have /usr/local/include early in the include list on FreeBSD to pick up some of the required libraries installed as packages. I will check for a package update or I revisit the build flags to see how it can be handled. Thank you for the prompt and helpful responses. Chris