From: Linus Torvalds <torvalds@linux-foundation.org>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: Emese Revfy <re.emese@gmail.com>,
Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Kees Cook <keescook@chromium.org>
Subject: Re: [GIT PULL 2/2] Kconfig updates for v5.10-rc1
Date: Sat, 28 Nov 2020 10:28:31 -0800 [thread overview]
Message-ID: <CAHk-=whK0aQxs6Q5ijJmYF1n2ch8cVFSUzU5yUM_HOjig=+vnw@mail.gmail.com> (raw)
In-Reply-To: <CAK7LNAQtABssBH2LGThgv-F3_aSrz9Hd-ra9Yyu4-FFzY1nsUw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 855 bytes --]
On Fri, Nov 27, 2020 at 11:05 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> As for the cc1plus cost, I got a similar result.
>
> Running scripts/gcc-plugin.sh directly
> took me 0.5 sec, which is a fourth
> of the allmodconfig run-time.
>
> Actually, I did not know this shell script
> was so expensive to run...
So it turns out that one reason it's so expensive to run is that it
does a *lot* more than it claims to do.
It says "we need a c++ compiler that supports the designated
initializer GNU extension", but then it actually includes a header
file from hell, rather than just test designated initializers.
This patch makes the cc1plus overhead go down a lot. That said, I'm
doubtful we really want gcc plugins at all, considering that the only
real users have all apparently migrated to clang builtin functionality
instead.
Linus
[-- Attachment #2: patch.diff --]
[-- Type: text/x-patch, Size: 634 bytes --]
scripts/gcc-plugin.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/gcc-plugin.sh b/scripts/gcc-plugin.sh
index b79fd0bea838..59db87bff456 100755
--- a/scripts/gcc-plugin.sh
+++ b/scripts/gcc-plugin.sh
@@ -8,8 +8,8 @@ srctree=$(dirname "$0")
gccplugins_dir=$($* -print-file-name=plugin)
# we need a c++ compiler that supports the designated initializer GNU extension
+test -e "$gccplugins_dir/include/plugin-version.h" &&
$HOSTCC -c -x c++ -std=gnu++98 - -fsyntax-only -I $srctree/gcc-plugins -I $gccplugins_dir/include 2>/dev/null <<EOF
-#include "gcc-common.h"
class test {
public:
int test;
next prev parent reply other threads:[~2020-11-28 22:02 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-22 13:49 [GIT PULL 2/2] Kconfig updates for v5.10-rc1 Masahiro Yamada
2020-10-22 20:25 ` pr-tracker-bot
2020-11-27 21:08 ` Linus Torvalds
2020-11-27 21:15 ` Linus Torvalds
2020-11-27 21:53 ` Linus Torvalds
2020-11-27 22:05 ` Linus Torvalds
2020-11-28 7:04 ` Masahiro Yamada
2020-11-28 18:28 ` Linus Torvalds [this message]
2020-12-02 0:55 ` Kees Cook
2020-12-02 12:53 ` Masahiro Yamada
2020-12-02 13:03 ` Masahiro Yamada
2020-12-02 18:58 ` Kees Cook
2020-12-02 20:13 ` Linus Torvalds
-- strict thread matches above, loose matches on Subject: below --
2020-10-22 13:47 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='CAHk-=whK0aQxs6Q5ijJmYF1n2ch8cVFSUzU5yUM_HOjig=+vnw@mail.gmail.com' \
--to=torvalds@linux-foundation.org \
--cc=keescook@chromium.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=re.emese@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;
as well as URLs for NNTP newsgroup(s).