linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arvind Sankar <nivedita@alum.mit.edu>
To: Nick Desaulniers <ndesaulniers@google.com>
Cc: Arvind Sankar <nivedita@alum.mit.edu>,
	Masahiro Yamada <masahiroy@kernel.org>,
	Fangrui Song <maskray@google.com>,
	Rong Chen <rong.a.chen@intel.com>,
	kernel test robot <lkp@intel.com>,
	kbuild-all@lists.01.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Makefile: Improve compressed debug info support detection
Date: Thu, 11 Jun 2020 17:52:27 -0400	[thread overview]
Message-ID: <20200611215227.GB3924125@rani.riverdale.lan> (raw)
In-Reply-To: <CAKwvOdnddAjiXDKA8fp3n2NN+R=Syp2N5DHbp1j=VRzM1dNnRw@mail.gmail.com>

On Thu, Jun 11, 2020 at 02:09:21PM -0700, Nick Desaulniers wrote:
> On Wed, Jun 10, 2020 at 4:30 PM Arvind Sankar <nivedita@alum.mit.edu> wrote:
> >
> > Yes, the gcc driver reports an error when deciding what to pass to the
> > assembler for -gz=zlib, if it was configured with a linker that does not
> > support the flag. It's even more weird actually -- if it was configured
> > with a linker that supports the flag but an assembler that doesn't, it
> > will silently eat the flag when calling the assembler. At least that
> > won't break anything, though none of the .o files will be compressed.
> 
> Not sure whether we'd like to prevent the option from being selectable
> in that case, or just to silently not compress the debug info.  Given
> that the compression is an optimization, it doesn't hurt to silently
> not do it, but it would be nice to notify the user their toolchain may
> have been misconfigured.  Though another part of me feels "garbage in,
> garbage out."
> 

I don't think it's worth trying to detect it -- I can see it in the
source code, but it should be highly unlikely for a gcc to be configured
this way. Btw, it looks like if you configure gcc with LLD, it will
enable this option only because it thinks that "LLD 11.0.0 (compatible
with GNU linkers)" is GNU LD version 11, which is bigger than 2. Is that
intentional :)

> > No, as-option does invoke the assembler. The problem here is that with
> > -Wa, the option is only seen by the assembler, not the gcc driver. So it
> > will succeed because the assembler supports it, but it will not test
> > whether the gcc driver also supports it.
> 
> ^ Those 2 last sentences should go in the commit message, as the
> current form doesn't allude to that.

Ok.

> 
> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
> 

  reply	other threads:[~2020-06-11 21:52 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-09 13:11 gcc-5: error: -gz is not supported in this configuration kernel test robot
2020-06-09 17:28 ` Nick Desaulniers
2020-06-09 17:49   ` Fangrui Song
2020-06-10  0:30     ` [kbuild-all] " Rong Chen
2020-06-10  0:58       ` Fangrui Song
2020-06-10  1:49         ` Rong Chen
2020-06-10  3:12           ` Arvind Sankar
2020-06-10  3:23             ` Arvind Sankar
2020-06-10  4:26               ` Arvind Sankar
2020-06-10  6:37                 ` Fangrui Song
2020-06-10 19:11                   ` [PATCH] Makefile: Improve compressed debug info support detection Arvind Sankar
2020-06-10 21:27                     ` Nick Desaulniers
2020-06-10 23:30                       ` Arvind Sankar
2020-06-10 23:39                         ` Arvind Sankar
2020-06-11 20:44                           ` Nick Desaulniers
2020-06-11 21:44                             ` Arvind Sankar
2020-06-11 21:09                         ` Nick Desaulniers
2020-06-11 21:52                           ` Arvind Sankar [this message]
2020-06-11 22:03                           ` [PATCH v2] " Arvind Sankar
2020-06-11 23:38                             ` Nick Desaulniers
2020-06-14  2:21                               ` Masahiro Yamada

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=20200611215227.GB3924125@rani.riverdale.lan \
    --to=nivedita@alum.mit.edu \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=masahiroy@kernel.org \
    --cc=maskray@google.com \
    --cc=ndesaulniers@google.com \
    --cc=rong.a.chen@intel.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;
as well as URLs for NNTP newsgroup(s).