devicetree-compiler.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>
To: Adrian Fiergolski
	<adrian.fiergolski-/A8SZzjb9pj2eFz/2MeuCQ@public.gmane.org>,
	Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	wenzong.fan-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org,
	ross.burton-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org
Cc: David Gibson
	<david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>,
	Devicetree Compiler
	<devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: error when compiling dts preprocessed with -g3
Date: Thu, 14 Oct 2021 23:00:54 +0100	[thread overview]
Message-ID: <e1b3411698cd27341a477150bbef2185ec00bdf9.camel@linuxfoundation.org> (raw)
In-Reply-To: <84be5fc0-0199-aec5-e739-610ba6cf0409-/A8SZzjb9pj2eFz/2MeuCQ@public.gmane.org>

On Thu, 2021-10-14 at 11:39 +0200, Adrian Fiergolski wrote:
> 
> On 12.10.2021 18:50, Rob Herring wrote:
> > On Tue, Oct 12, 2021 at 9:47 AM Adrian Fiergolski
> > <adrian.fiergolski-/A8SZzjb9pj2eFz/2MeuCQ@public.gmane.org> wrote:
> > > On 12.10.2021 15:38, Rob Herring wrote:
> > > > On Tue, Oct 12, 2021 at 8:16 AM Adrian Fiergolski
> > > > <adrian.fiergolski-/A8SZzjb9pj2eFz/2MeuCQ@public.gmane.org> wrote:
> > > > > Hi David,
> > > > > 
> > > > > I am being hit by this problem again. This time on Ubuntu 20.04 LTS with
> > > > > gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04), yocto (hardknott) and
> > > > > kernel v5.10.
> > > > > 
> > > > > As it's standard kernel built, I am using scripts/Makefile.lib from
> > > > > kernel sources. This line [1] causes the problem. As you indicated, it
> > > > > calls the preprocessor and afterwards dtc.
> > > > How is '-g3' getting introduced here? You are externally overriding
> > > > HOSTCC with 'gcc -g3' or something like that?
> > > Yes, that's the way yocto introduces kernel build flags [1].
> > HOSTCC is supposed to be set to just the compiler. HOSTCFLAGS and
> > others should be used to set the flags.
> > 
> > Rob
> > 
> > > [1]
> > > https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/classes/kernel.bbclass#n229
> > > 
> > > Adrian
> > > 
> 
> I let myself add to this thread Wenzong, author of the change in the
> yocto class using HOSTCC, and Ross and Richard who signed off the change.
> 
> Wenzong, Ross and Richard, there is a problem in the way you use HOSTCC,
> once one adds '-g3' debug flag and DTS compiler. All the details
> regarding the problem can be found in the archives [1].
> 
> 
> [1] https://www.spinics.net/lists/devicetree-compiler/index.html#03281

This isn't my area of expertise but I took a look and discussed it with our
kernel people and we agree this doesn't look right. I've queued a change for
testing which makes this look like:

EXTRA_OEMAKE = " HOSTCC="${BUILD_CC}" HOSTCFLAGS="${BUILD_CFLAGS}" HOST_LDFLAGS="${BUILD_LDFLAGS}" HOSTCPP="${BUILD_CPP}""
EXTRA_OEMAKE += " HOSTCXX="${BUILD_CXX}" HOSTCXXFLAGS="${BUILD_CXXFLAGS}""
 
which I think is what you're asking for. Whether this breaks things, we'll see.

Cheers,

Richard



      parent reply	other threads:[~2021-10-14 22:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-14 18:13 error when compiling dts preprocessed with -g3 Adrian Fiergolski
     [not found] ` <f03fc1a5-14c9-5f87-84ee-0936f7e13ad2-/A8SZzjb9pj2eFz/2MeuCQ@public.gmane.org>
2020-08-20 10:27   ` David Gibson
     [not found]     ` <20200820102734.GR271315-l+x2Y8Cxqc4e6aEkudXLsA@public.gmane.org>
2020-08-20 11:32       ` Adrian Fiergolski
     [not found]         ` <594ead88-fd44-76ac-8c63-6337ac77a032-/A8SZzjb9pj2eFz/2MeuCQ@public.gmane.org>
2021-06-08  4:18           ` David Gibson
2021-06-08 10:47             ` Adrian Fiergolski
     [not found]               ` <3f28c86d-064d-ec68-e8de-f1dcd38c08ca-/A8SZzjb9pj2eFz/2MeuCQ@public.gmane.org>
2021-10-12 13:16                 ` Adrian Fiergolski
     [not found]                   ` <f6ac309b-c3af-583e-1bce-e869fa129b3f-/A8SZzjb9pj2eFz/2MeuCQ@public.gmane.org>
2021-10-12 13:38                     ` Rob Herring
     [not found]                       ` <CAL_JsqK52nM1LwjBYJ+iEWYEipimaJ=8vA-Nw5SSJ7x+OAxGXg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2021-10-12 14:47                         ` Adrian Fiergolski
     [not found]                           ` <c28927c6-4fd1-f047-7c04-d54af609e699-/A8SZzjb9pj2eFz/2MeuCQ@public.gmane.org>
2021-10-12 16:50                             ` Rob Herring
     [not found]                               ` <CAL_Jsq+q-vNyUok3O7To0KCSG=hcGzHnf4k7tTr=0J3VFUSVjg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2021-10-14  9:39                                 ` Adrian Fiergolski
     [not found]                                   ` <84be5fc0-0199-aec5-e739-610ba6cf0409-/A8SZzjb9pj2eFz/2MeuCQ@public.gmane.org>
2021-10-14 22:00                                     ` Richard Purdie [this message]

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=e1b3411698cd27341a477150bbef2185ec00bdf9.camel@linuxfoundation.org \
    --to=richard.purdie-hqyy1w1ycw8ekmwlsbkhg0b+6bgklq7r@public.gmane.org \
    --cc=adrian.fiergolski-/A8SZzjb9pj2eFz/2MeuCQ@public.gmane.org \
    --cc=david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org \
    --cc=devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=ross.burton-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=wenzong.fan-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).