From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id FUgiCNR7RWOE3QkAWB0awg (envelope-from ) for ; Tue, 11 Oct 2022 10:21:08 -0400 Received: by simark.ca (Postfix, from userid 112) id 11FAA1E112; Tue, 11 Oct 2022 10:21:08 -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=r3KUxEJE; 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=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham 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 A62B91E0D5 for ; Tue, 11 Oct 2022 10:21:07 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 389F53858C2D for ; Tue, 11 Oct 2022 14:21:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 389F53858C2D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1665498067; bh=P9QrOFdnEol7JImYMbdQyJU3d/ErBsj3wZDjGJ1eKWc=; h=To:Subject:In-Reply-To:References:Date:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=r3KUxEJERdDtdvMYdjrJFbnDRSMSFHmV44z0VW+aNSQyPM5D4ngc2FRBwN9wQZk+I z7dJeqyHUJLRLhx1hQSCA43ZeaW5FT3xjUfNmXiMyhMR8aHEwmLr/vsldVENCWRkiG r4Hxm5Xoof3pMSE9UFIIv5wRkV85MeBByso47Qek= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 803353858401 for ; Tue, 11 Oct 2022 14:20:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 803353858401 Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-329-Sj960PFSOpev4GhgP_2qyw-1; Tue, 11 Oct 2022 10:20:33 -0400 X-MC-Unique: Sj960PFSOpev4GhgP_2qyw-1 Received: by mail-wm1-f70.google.com with SMTP id d5-20020a05600c34c500b003b4fb42ccdeso10672282wmq.8 for ; Tue, 11 Oct 2022 07:20:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=P9QrOFdnEol7JImYMbdQyJU3d/ErBsj3wZDjGJ1eKWc=; b=ykuBS1Gpm6Mi3HNWMWHo+E6rcslj7BCVGv1hQtWjLEvXfAn7CF1N5qY9MecrJ6aKSi CeNooAZVKVrRhfZxJ2Xc9YTa1YKbTtsGoyuE2Ic7iRZJICcGudfHDIu3Dw+MqDcpleIZ Mk60XfwaN3k4YPZgda6yjD8NjfuaE9AVvGFsA1uQc/lJ5RnbAC/Ol48iL35Eakh3syeN MJpqygwIsJHnjV5DwoPU574SSh7wTdz8lEifb6lvCR6O+jWsres67TcFDa2ULHVqJ/xu YzGX1Y7kdhoHxz1vr5hF4ttr2ACew5N427jqWeUhLSJIoZWcI/b1bf0voXA0aebzpLYO 3HYg== X-Gm-Message-State: ACrzQf0ZDZWQkktloVxMbZKQ7FzxvvAH0MKWTMutWDzWjLXJAjblFZX1 iQw3HzH2fbyvJaCFHXxlLX51D3EUKq02bSxQQmo83Blfvda0b4PiEBI3tN7oQieGWurRXnFDdyl DpeMR19bB3Cyb4Lxjs/IqMA== X-Received: by 2002:adf:dd04:0:b0:22e:4671:f092 with SMTP id a4-20020adfdd04000000b0022e4671f092mr15128277wrm.604.1665498031711; Tue, 11 Oct 2022 07:20:31 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5pRgN3OZrVH/W3V6e3/3/Q7o/5niQkdn2G30CDX1EN3SCxe5mZ0HPnMqwmGoNCZSrsyNR9Ag== X-Received: by 2002:adf:dd04:0:b0:22e:4671:f092 with SMTP id a4-20020adfdd04000000b0022e4671f092mr15128265wrm.604.1665498031484; Tue, 11 Oct 2022 07:20:31 -0700 (PDT) Received: from localhost (52.72.115.87.dyn.plus.net. [87.115.72.52]) by smtp.gmail.com with ESMTPSA id bh17-20020a05600c3d1100b003c6cc57566fsm731181wmb.14.2022.10.11.07.20.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Oct 2022 07:20:31 -0700 (PDT) To: Tsukasa OI , Tsukasa OI , Mike Frysinger Subject: Re: [PATCH v3 0/5] sim: Suppress warnings if built with Clang In-Reply-To: References: Date: Tue, 11 Oct 2022 15:20:30 +0100 Message-ID: <87k056cuhd.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain 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: Andrew Burgess via Gdb-patches Reply-To: Andrew Burgess Cc: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" Tsukasa OI writes: > Hello, > > This is the version 2 patchset to suppress Clang compiler warnings > (causes a build failure due to default -Werror). > > > [Background] > > When we build Binutils and GDB with Clang, it causes a build failure due to > warnings generated by Clang and the default -Werror configuration. > > I MOSTLY managed to make ALL ARCHITECTURE ENABLED Binutils and GDB > -Werror-free on Clang 15.0.0 (note that this does not necessarily mean > warning-free) and this patchset is a part of it (common simulator parts). > > - It still requires -Wno-implicit-function-declaration on the > LatticeMicro32 and M32R simulators. Except them, most of Binutils / GDB > components can be built with Clang by default with my tree. > - I noticed that the assembler is not tested enough (because just with > --enable-targets=all, it builds only host assembler). > > Full Clang 15.0.0 -Werror-free branch in development is available at: > > > Tested configuration: > - Ubuntu 22.04.1 LTS (x86_64) > - LLVM / Clang 15.0.0 (built from source) > - Configuration examples: > $srcdir/configure \ > --enable-targets=all \ > --enable-multilib --enable-ld --enable-gold --enable-nls \ > CC=clang CXX=clang++ CCLD=clang CXXLD=clang++ \ > CFLAGS=' -O2 -g -Wno-implicit-function-declaration' \ > CXXFLAGS='-O2 -g -Wno-implicit-function-declaration' > $srcdir/configure \ > --target=riscv64-unknown-linux-gnu \ > --enable-multilib --enable-ld --enable-gold --enable-nls \ > CC=clang CXX=clang++ CCLD=clang CXXLD=clang++ \ > CFLAGS='-O2 -g' CXXFLAGS='-O2 -g' > > > [About this Patchset] > > This patchset contains four five fixes to the files under sim{,/common}. > Each contains minor fixes to suppress Clang / GCC warnings. > > Each change is detailed in the each patch. > > > [Changes: v2 -> v3] > > - PATCH 2/5: Rewritten predicate macros from (!!x) to (x != 0). > (This is based on the feedback by Andrew Burgess). > - PATCH 3/5: Replaced with a patch by Andrew Burgess > (slightly modified by me). > - PATCH 4/5: Fix cached variable from ld_cv_* to sim_cv_*. > - Removed ChangeLog from commit messages > (based on the feedback [to another patchset by me] by Bruno Larsen). > > > [Changes: v1 -> v2] > > - Commit messages are improved > - PATCH v1 1/4 is Moved to another patchset > - PATCH v1 2-4/4 -> PATCH v2 1-3/5 > - New: Check known getopt definition on sim (PATCH v2 4/5) > This test is already performed on binutils, gas, gprof and ld and this > commit does the same to sim. > - New: Initialize pbb_br_* by default (PATCH v2 5/5) > It did not generate warnings on Clang but GCC creates some warnings > (although those are not reported as errors). > This is due to uninitialized pbb_br_* variables and this commit fixes > the issue by initializing them by a harmless value. Thanks for the updated patches. I reviewed these and pushed them with a couple of minor updates, I'll follow up to each patch with the changes I made. Thanks, Andrew