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  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]
Date:   Fri, 18 Dec 2020 08:57:56 +0100
From:   Marek Szyprowski <>
To:     Masahiro Yamada <>,, Kees Cook <>,
        Emese Revfy <>,
Cc:     Linus Torvalds <>,
        Nathan Chancellor <>,
        Nick Desaulniers <>,,
Subject: Re: [PATCH] gcc-plugins: simplify GCC plugin-dev capability test


On 03.12.2020 13:57, Masahiro Yamada wrote:
> Linus pointed out a third of the time in the Kconfig parse stage comes
> from the single invocation of cc1plus in scripts/ [1],
> and directly testing plugin-version.h for existence cuts down the
> overhead a lot. [2]
> This commit takes one step further to kill the build test entirely.
> The small piece of code was probably intended to test the C++ designated
> initializer, which was not supported until C++20.
> In fact, with -pedantic option given, both GCC and Clang emit a warning.
> $ echo 'class test { public: int test; } test = { .test = 1 };' | g++ -x c++ -pedantic - -fsyntax-only
> <stdin>:1:43: warning: C++ designated initializers only available with '-std=c++2a' or '-std=gnu++2a' [-Wpedantic]
> $ echo 'class test { public: int test; } test = { .test = 1 };' | clang++ -x c++ -pedantic - -fsyntax-only
> <stdin>:1:43: warning: designated initializers are a C++20 extension [-Wc++20-designator]
> class test { public: int test; } test = { .test = 1 };
>                                            ^
> 1 warning generated.
> Otherwise, modern C++ compilers should be able to build the code, and
> hopefully skipping this test should not make any practical problem.
> Checking the existence of plugin-version.h is still needed to ensure
> the plugin-dev package is installed. The test code is now small enough
> to be embedded in scripts/gcc-plugins/Kconfig.
> [1]
> [2]
> Reported-by: Linus Torvalds <>
> Signed-off-by: Masahiro Yamada <>

This patch landed in linux next-20201217 as commit 1e860048c53e 
("gcc-plugins: simplify GCC plugin-dev capability test").

It causes a build break with my tests setup, but I'm not sure weather it 
is really an issue of this commit or a toolchain I use. However I've 
checked various versions of the gcc cross-compilers released by Linaro 
at and all 
fails with the same error:

$ make ARCH=arm 
   HOSTCXX scripts/gcc-plugins/
In file included from 
                  from scripts/gcc-plugins/gcc-common.h:7,
                  from scripts/gcc-plugins/arm_ssp_per_task_plugin.c:3:
fatal error: gmp.h: No such file or directory
  #include <gmp.h>
compilation terminated.
scripts/gcc-plugins/Makefile:47: recipe for target 
'scripts/gcc-plugins/' failed
make[2]: *** [scripts/gcc-plugins/] Error 1
scripts/ recipe for target 'scripts/gcc-plugins' failed
make[1]: *** [scripts/gcc-plugins] Error 2
Makefile:1190: recipe for target 'scripts' failed
make: *** [scripts] Error 2

Compilation works if I use the cross-gcc provided by 
gcc-7-arm-linux-gnueabi/gcc-arm-linux-gnueabi Ubuntu packages, which is:

$ arm-linux-gnueabi-gcc --version
arm-linux-gnueabi-gcc (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04) 7.5.0

Best regards

Marek Szyprowski, PhD
Samsung R&D Institute Poland

Powered by blists - more mailing lists