qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] meson: Remove --warn-common ldflag


From: Peter Maydell
Subject: Re: [PATCH] meson: Remove --warn-common ldflag
Date: Mon, 4 Mar 2024 10:41:52 +0000

On Sun, 3 Mar 2024 at 16:26, Akihiko Odaki <akihiko.odaki@daynix.com> wrote:
>
> --warn-common ldflag causes warnings for multiple definitions of
> ___asan_globals_registered when enabling AddressSanitizer with clang.
> The warning is somewhat obsolete so just remove it.
>
> The common block is used to allow duplicate definitions of uninitialized
> global variables. In the past, GCC and clang used to place such
> variables in a common block by default, which prevented programmers for
> noticing accidental duplicate definitions. Commit 49237acdb725 ("Enable
> ld flag --warn-common") added --warn-common ldflag so that ld warns in
> such a case.
>
> Today, both of GCC and clang don't use common blocks by default[1][2] so
> any remaining use of common blocks should be intentional. Remove
> --warn-common ldflag to suppress warnings for intentional use of
> common blocks.

We also explicitly turn off the common block with -fno-common
(since commit 4c288acbd6b9e, 2014).

thanks
-- PMM



reply via email to

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