lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK7LNAQff3c9zUMSyj37WT_hgPQ9x7Vf-Hxnm_u0LxNwEMJ+7w@mail.gmail.com>
Date:   Sat, 16 Mar 2019 01:08:49 +0900
From:   Masahiro Yamada <yamada.masahiro@...ionext.com>
To:     Doug Anderson <dianders@...omium.org>
Cc:     Michal Marek <michal.lkml@...kovi.net>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>
Subject: Re: [PATCH] kbuild: Make NOSTDINC_FLAGS a simply expanded variable

Hi,

On Sat, Mar 16, 2019 at 12:41 AM Doug Anderson <dianders@...omium.org> wrote:
>
> Hi,
>
> On Fri, Mar 15, 2019 at 8:37 AM Masahiro Yamada
> <yamada.masahiro@...ionext.com> wrote:
> >
> > On Sat, Mar 16, 2019 at 12:27 AM Masahiro Yamada
> > <yamada.masahiro@...ionext.com> wrote:
> > >
> > > On Fri, Mar 15, 2019 at 8:42 AM Douglas Anderson <dianders@...omium.org> wrote:
> > > >
> > > > During a simple no-op (nothing changed) build I saw 39 invocations of
> > > > the C compiler with the argument "-print-file-name=include".  We don't
> > > > need to call the C compiler 39 times for this--one time will suffice.
> > > >
> > > > Let's change NOSTDINC_FLAGS to a simply expanded variable to avoid
> > > > this since there doesn't appear to be any reason it should be
> > > > recursively expanded.
> > > >
> > > > On my build this shaved ~400 ms off my "no-op" build.
> > > >
> > > > Note that the recursive expansion seems to date back to the (really
> > > > old) commit e8f5bdb02ce0 ("[PATCH] Makefile include path ordering").
> > > > It's a little unclear to me if the point of that patch was to switch
> > > > the variable to be recursively expanded (which it did) or to avoid
> > > > directly assigning to NOSTDINC_FLAGS (AKA to switch to +=) because
> > > > someone else (out of tree?) was setting it.  I presume later since if
> > > > the only goal was to switch to recursive expansion the patch would
> > > > have just removed the ":".
> > > >
> > > > Signed-off-by: Douglas Anderson <dianders@...omium.org>
> > >
> > > Applied to linux-kbuild.
> > > Thanks.
> >
> >
> > BTW, I noticed no one else
> > appends NOSTDINC_FLAGS.
> >
> >
> > So, does it make more sense to do as follows?
> >
> >
> > NOSTDINC_FLAGS := -nostdinc -isystem $(shell $(CC) -print-file-name=include)
>
> It might.  ...but go back to look at commit e8f5bdb02ce0 ("[PATCH]
> Makefile include path ordering").  Why did they do a += there since
> even then nobody was setting it.  Try:
>
> $ git grep NOSTDINC_FLAGS e8f5bdb02ce0~
>
>
> Do you understand what was going on in that commit?


No, I do not understand.

Maybe, it fixed a problem in downstream code
since there was no directory like include/asm-xen.


If you do not want to take risk,
I am fine with this patch, though.



> -Doug



-- 
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ