Openembedded Core Discussions
 help / color / mirror / Atom feed
From: "Yu, Mingli" <mingli.yu@windriver.com>
To: Khem Raj <raj.khem@gmail.com>
Cc: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH v3] gcc-sanitizers: fix -Werror=maybe-uninitialized issue
Date: Mon, 15 Apr 2019 17:27:30 +0800	[thread overview]
Message-ID: <5CB44E82.5020907@windriver.com> (raw)
In-Reply-To: <CAMKF1sq0wYPvJg1G5+cnY-6owi1K=Nc4bctXm3pcsbh1R5gpFA@mail.gmail.com>



On 2019年04月09日 11:53, Khem Raj wrote:
> On Mon, Apr 8, 2019 at 7:32 PM <mingli.yu@windriver.com> wrote:
>>
>> From: Mingli Yu <Mingli.Yu@windriver.com>
>>
>> When DEBUG_BUILD = "1" added in local.conf, there
>> comes below build error when "bitbake gcc-sanitizers":
>> | ./../../../../../../../../work-shared/gcc-8.3.0-r0/gcc-8.3.0/libsanitizer/libbacktrace/../../libbacktrace/elf.c: In function 'elf_is_symlink':
>> | ../../../../../../../../../work-shared/gcc-8.3.0-r0/gcc-8.3.0/libsanitizer/libbacktrace/../../libbacktrace/elf.c:772:21: error: 'st.st_mode' may be used uninitialized in this function [-Werror=maybe-uninitialized]
>> |   return S_ISLNK (st.st_mode);
>>
>> Per https://gcc.gnu.org/ml/gcc-patches/2019-04/msg00315.html,
>> the gcc upstream thinks the warning is a false
>> positive and suggests to use -O2 rather than -Og
>> or -O1 when compiling that file, so pass -Wno-error
>> to compiler when -Og is used to silence the error.
>>
>
> Not particular to this change but in general if a package says that it
> does not support -Og
> then we are just going to get into more and more untested grounds
> especially during runtime
> so I wonder how useful it will be to use -Og for such packages or any
> other non supported
> combination for that matter.

Hi Khem,

Any other suggestion to silence the gcc-sanitizers build error when 
DEBUG_BUILD is enabled?

Or just keep the logic DEBUG_OPTIMIZATION_append = " -Wno-error" as my 
patch stated?

Thanks,

>
>> Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
>> ---
>>   meta/recipes-devtools/gcc/gcc-sanitizers.inc | 3 +++
>>   1 file changed, 3 insertions(+)
>>
>> diff --git a/meta/recipes-devtools/gcc/gcc-sanitizers.inc b/meta/recipes-devtools/gcc/gcc-sanitizers.inc
>> index e5e8452..8b1d1c9 100644
>> --- a/meta/recipes-devtools/gcc/gcc-sanitizers.inc
>> +++ b/meta/recipes-devtools/gcc/gcc-sanitizers.inc
>> @@ -45,6 +45,9 @@ INHIBIT_DEFAULT_DEPS = "1"
>>   ALLOW_EMPTY_${PN} = "1"
>>   DEPENDS = "gcc-runtime virtual/${TARGET_PREFIX}gcc"
>>
>> +# used to fix ../../../../../../../../../work-shared/gcc-8.3.0-r0/gcc-8.3.0/libsanitizer/libbacktrace/../../libbacktrace/elf.c:772:21: error: 'st.st_mode' may be used uninitialized in this function [-Werror=maybe-uninitialized]
>> +DEBUG_OPTIMIZATION_append = " -Wno-error"
>> +
>>   BBCLASSEXTEND = "nativesdk"
>>
>>   PACKAGES = "${PN} ${PN}-dbg"
>> --
>> 2.7.4
>>
>


  reply	other threads:[~2019-04-15  9:23 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-19  8:44 [PATCH] gcc-sanitizers: fix -Werror=maybe-uninitialized issue mingli.yu
2019-03-26  1:37 ` Yu, Mingli
2019-04-04  9:36 ` Yu, Mingli
2019-04-05 22:01 ` Khem Raj
2019-04-08  6:40   ` [PATCH v2] " mingli.yu
2019-04-09  2:32   ` [PATCH v3] " mingli.yu
2019-04-09  3:53     ` Khem Raj
2019-04-15  9:27       ` Yu, Mingli [this message]
2019-04-15  9:38       ` Adrian Bunk
2019-04-15 14:19         ` Khem Raj
2019-04-15 16:21           ` Adrian Bunk
2019-04-16  8:45             ` Yu, Mingli
2019-04-16 18:00               ` Khem Raj
2019-04-17  7:49                 ` Yu, Mingli
2019-04-17 17:14                   ` Khem Raj
2019-04-22  5:45                     ` Yu, Mingli
2019-04-22  8:41                     ` [PATCH v4] " mingli.yu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5CB44E82.5020907@windriver.com \
    --to=mingli.yu@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=raj.khem@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox