From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 0Np+NaF8RWPT3QkAWB0awg (envelope-from ) for ; Tue, 11 Oct 2022 10:24:33 -0400 Received: by simark.ca (Postfix, from userid 112) id D87861E112; Tue, 11 Oct 2022 10:24:33 -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=CL/7gDZj; 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 840E51E0D5 for ; Tue, 11 Oct 2022 10:24:33 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 644A5385383F for ; Tue, 11 Oct 2022 14:24:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 644A5385383F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1665498270; bh=LiY0rpG3/N75DM/g7Q4EiuRzsg5bp5C6LXTwtRuK4Vc=; 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=CL/7gDZjThlLXDqkt6X9F4nUwOwmCbp5tJyUQkFUYXS1Z08Uurg0tghJmrxh9aNoe QxytoVzyyFqN1czv1ybHyYkAsu3ZKX3vyIMiyWFvppxJlFIIaBSRqzLtWAuo+VjHP+ XDWQS0t1hogDaRA8RabaoDNViE+G8Nt7jrbzadsA= 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 AEDDF385842B for ; Tue, 11 Oct 2022 14:23:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org AEDDF385842B Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-3--tShuJcAMOaQwcPMPiQTrQ-1; Tue, 11 Oct 2022 10:23:43 -0400 X-MC-Unique: -tShuJcAMOaQwcPMPiQTrQ-1 Received: by mail-wm1-f71.google.com with SMTP id v23-20020a1cf717000000b003bff630f31aso3782151wmh.5 for ; Tue, 11 Oct 2022 07:23:43 -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=LiY0rpG3/N75DM/g7Q4EiuRzsg5bp5C6LXTwtRuK4Vc=; b=PDSfczXfiokZDZdBkOBtfvLFXIhQqGYwtLPzCGh+5tRbaPwKfd+phw7b2Sk9zrFexe kP2WGgk5gdKgVfDBydHm24jepmgrNsCaFAfvIugQZO/HQBE5/o2XI1AZMGCOez8EIV8H YYZfpM3LxLgeME4ek3VpweaBzQsq1Ntn1vCqLVUay0Yd+Gf+F1vzP2/xXelUlNZ4k+Yf ipLmdgCTD6rEEIXpcnGXQN3QCV+m3PTp2pVa68SJfYQv9AHscyJ4Cn7wMX/AoS2777K7 XSHiL6Cg8q1wSuPhz6rxVmfF5gN/SOk+zx91s+bpXw1tfkNYnJi+dNRAb1LspJuaJl0K Fi0Q== X-Gm-Message-State: ACrzQf0TZQt2wQ6bLWUMwnsbFq1WV2mTZCVQuTjbtAJf8NGXSZWnazeq 2Wftv3oTvRz7buO33ennOyLOxmB35DYMDvUfVhupcQ9kt01tcoLdPciQgB2PdUkq63jXxD4OrJU qjBvcMwQ5DJ+4KHkD+L5xIQ== X-Received: by 2002:a05:600c:654f:b0:3c3:b5b7:43a9 with SMTP id dn15-20020a05600c654f00b003c3b5b743a9mr14691284wmb.201.1665498222309; Tue, 11 Oct 2022 07:23:42 -0700 (PDT) X-Google-Smtp-Source: AMsMyM67wj1zfEe94lIdxMgFVWZBjreGQ1mEbNq0VlSw4k0GUn1VsfEhyUvXHRekTDh2TkBtxvy6tg== X-Received: by 2002:a05:600c:654f:b0:3c3:b5b7:43a9 with SMTP id dn15-20020a05600c654f00b003c3b5b743a9mr14691267wmb.201.1665498222068; Tue, 11 Oct 2022 07:23:42 -0700 (PDT) Received: from localhost (52.72.115.87.dyn.plus.net. [87.115.72.52]) by smtp.gmail.com with ESMTPSA id r3-20020a5d4e43000000b0022a2bacabbasm11343893wrt.31.2022.10.11.07.23.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Oct 2022 07:23:41 -0700 (PDT) To: Tsukasa OI , Tsukasa OI , Mike Frysinger , Stephane Carrez , "Frank Ch . Eigler" Subject: Re: [PATCH v2 0/7] sim, sim/ARCH: Add ATTRIBUTE_PRINTF In-Reply-To: References: Date: Tue, 11 Oct 2022 15:23:41 +0100 Message-ID: <87bkqicuc2.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, > > [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 (simulator: > printf-like functions). > > - 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] > > Clang generates a warning if the format string of a printf-like function is > not a literal ("-Wformat-nonliteral"). On the default configuration, it > causes a build failure (unless "--disable-werror" is specified). > > To avoid warnings on the printf-like wrapper, it requires proper > __attribute__((format)) and we have ATTRIBUTE_PRINTF macro for this reason. > > This patchset adds ATTRIBUTE_PRINTF to all functions that require > ATTRIBUTE_PRINTF macro. > > > [Changes: v1 -> v2] > > - We only append ATTRIBUTE_PRINTF at function declarations, > not definitions (based on the feedback by Andrew Burgess). > - Fixed indents > - Removed ChangeLog from commit messages > (based on the feedback [to another patchset by me] by Bruno Larsen). Thanks for the updated series. I've now pushed these patches with a few minor adjustments. I'll comment on each patch where I made changes. Thanks, Andrew