[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PULL v2 05/13] target/rx: CPU definitions

From: Philippe Mathieu-Daudé
Subject: Re: [PULL v2 05/13] target/rx: CPU definitions
Date: Sat, 21 Mar 2020 12:17:02 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0

On 3/21/20 12:05 PM, Philippe Mathieu-Daudé wrote:
On 3/20/20 5:37 PM, Peter Maydell wrote:
On Fri, 20 Mar 2020 at 16:32, Philippe Mathieu-Daudé <address@hidden> wrote:
-fwrapv is here indeed.

I use

There was a bug in older clang versions where the shift-base
sanitizer didn't honour -fwrapv:

says you can work around the clang bug with -fno-sanitize=shift-base.

The bug was fixed upstream back in 2016, though, so the
fix ought to be in clang 4, I think. Are you using an
old clang version, or has it regressed in newer clang?

I am sorry I am very confused here.

$ clang -v
clang version 8.0.0 (Fedora 8.0.0-3.fc30)

I use scan-build which set CC=ccc-analyzer.

$ ccc-analyzer -v
gcc version 9.2.1 20190827 (Red Hat 9.2.1-1) (GCC)

I use the output of 'make V=1' and run directly ccc-analyzer, I get:

gcc: error: unrecognized argument to ‘-fsanitize=’ option: ‘array-bounds’
gcc: error: unrecognized argument to ‘-fsanitize=’ option: ‘function’

So Clang is used.

I notice ccc-analyzer appends -Wno-shift-negative-value, however if I run the 'make V=1' output using clang instead (with all the -fsanitize options, -fwrapv, -Wno-shift-negative-value) then no warning are emitted.

So I think this is simply a problem with scan-build/ccc-analyzer, or I should tune it more for QEMU.

Eh I simply needed to RTFM more attentively:


   Do not override CC and CXX make variables. Useful when
   running make in autoconf-based (and similar) projects
   where configure can add extra flags to those variables.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]