Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1894334pxu; Fri, 18 Dec 2020 00:00:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJwd7qSpaNPhreYdQFUFnGxRttDm1EusTAdxEUbjwGwM6m8oPIA33ZNcypNMXm2oRr1FcuHF X-Received: by 2002:a17:906:5e0d:: with SMTP id n13mr2759104eju.500.1608278451900; Fri, 18 Dec 2020 00:00:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608278451; cv=none; d=google.com; s=arc-20160816; b=KS9Y/JyvSsWPLo2m2p7g17xLlExG0rTqEGmnn5twgEu7iVLMXmeemtFWpcKo/4wP/z 14Du/NWp295FL4Dgy0xcX/mERFG6CwbeaXZgeSfm+nIdrgi3ghdXCVkNdatDAdYeDTV1 IxVtYAtU5IX70/v68f5vGlgnYbjRQh06ehjpieCCMc3dnrAsSfVMhPdZ7/jasMixiKzC G03odFE0MvjxAPk6ugh3yL4YGNR5WLRyayspcyC/eoFwX6wGXrsf/r07MPrxb+DGg0Km AIofsuDz4VbmnrpGTmv9PfnMfpKHoD0vycNIQE9VR3FCiOmIMK/HEBHV+NRkBonL+TKD 7qSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:cms-type:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:cc:to:subject:dkim-signature:dkim-filter; bh=WVgo2j4yEAz/CQJbmxUOMmEfrN6rEAfENZPr5nFB8f8=; b=TEhD4F8Gm/ErQHGcFgxgnolUzf4KslFse+7YAHlhoNb5aGW5X9EM5uIR39yNnLFeIx 0daZvG2eYPMJQ3q4p9fz1dNf8EvWlKG1Qa0cJJj5m3vPPwpUpWf44p7WG0p95X/aiwAS YCZ+kd0lyUSqb7YLKUYosMWMAp+MKE1nuVhzfsnAVjc/N0smfRhYDul9TwDRoGUOBKBt 050iM59i0wnuyZXaVhvZIoo+785Ki2UHX4O8D1S7cPoI5WLAsRjKLfKDWy68zevU1IgT TMDAh0Thbn4nsjDNUZKB9HMhQuBQxxTT6s0f+ssKKHrQfcrEthB7GZuxj/hT0j3AGQeo bpEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=JQ3leB4p; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j7si3915345ejf.125.2020.12.18.00.00.29; Fri, 18 Dec 2020 00:00:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=JQ3leB4p; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732322AbgLRH64 (ORCPT + 99 others); Fri, 18 Dec 2020 02:58:56 -0500 Received: from mailout1.w1.samsung.com ([210.118.77.11]:60335 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731611AbgLRH64 (ORCPT ); Fri, 18 Dec 2020 02:58:56 -0500 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20201218075804euoutp015ed008313af636e8109a35f7e058f80f~RwJQWYlc_2188021880euoutp015 for ; Fri, 18 Dec 2020 07:58:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20201218075804euoutp015ed008313af636e8109a35f7e058f80f~RwJQWYlc_2188021880euoutp015 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1608278284; bh=WVgo2j4yEAz/CQJbmxUOMmEfrN6rEAfENZPr5nFB8f8=; h=Subject:To:Cc:From:Date:In-Reply-To:References:From; b=JQ3leB4pKyiOtmFo6iR6MXtpC0UNT1X6Iw2h4QjkR9bWuEzvEuKW1I1EzO/9zU3Tj cWX2pCJlAn4L+8DY25OlbMN668PTepN9IAVvBJ/05buQGhUl4e+05I5xy9VLtssyxQ Lc4/0aHptvTOzOnBiuTQM28MxYxwX+SHSIshu7kk= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20201218075759eucas1p13b53bd2334e1df2d8764b58f721fbc02~RwJLlJyBe0410204102eucas1p1J; Fri, 18 Dec 2020 07:57:59 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 5A.C3.44805.6016CDF5; Fri, 18 Dec 2020 07:57:58 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20201218075758eucas1p1605768803a5c9edce4fbe54b3e3b859a~RwJK3PiXF0420804208eucas1p16; Fri, 18 Dec 2020 07:57:58 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20201218075758eusmtrp23d5093d1b90924d296e171355affbd34~RwJK2kyj71476614766eusmtrp29; Fri, 18 Dec 2020 07:57:58 +0000 (GMT) X-AuditID: cbfec7f4-b37ff7000000af05-d5-5fdc6106d1e4 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id C4.3C.21957.6016CDF5; Fri, 18 Dec 2020 07:57:58 +0000 (GMT) Received: from [106.210.134.192] (unknown [106.210.134.192]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20201218075757eusmtip1489b8cf5f0d2309e97745745cc18b3a3~RwJKQg_d81315313153eusmtip1X; Fri, 18 Dec 2020 07:57:57 +0000 (GMT) Subject: Re: [PATCH] gcc-plugins: simplify GCC plugin-dev capability test To: Masahiro Yamada , linux-kbuild@vger.kernel.org, Kees Cook , Emese Revfy , linux-hardening@vger.kernel.org Cc: Linus Torvalds , Nathan Chancellor , Nick Desaulniers , clang-built-linux@googlegroups.com, linux-kernel@vger.kernel.org From: Marek Szyprowski Message-ID: Date: Fri, 18 Dec 2020 08:57:56 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.5.1 MIME-Version: 1.0 In-Reply-To: <20201203125700.161354-1-masahiroy@kernel.org> Content-Transfer-Encoding: 8bit Content-Language: en-US X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrCKsWRmVeSWpSXmKPExsWy7djP87rsiXfiDbrkLR68mc1mcaY712Le +p+MFn927WCyuLxrDpvFwwc3WC0+vC2x+DDhP5PFu9NA8Ud9b9kduDxmN1xk8dg56y67x4JN pR57Jp5k89i0qpPN48SM3ywenzfJBbBHcdmkpOZklqUW6dslcGWc3XmZuaBNtuLg5TamBsYT El2MnBwSAiYSd67vYe1i5OIQEljBKHH16E12COcLo8Se5bsYIZzPjBKNq56yw7Q8uzsTqmo5 o8TsHVtZQRJCAh8ZJR7eiQGxhQU8JU59XglWJCKwiVFi9dOVLCAOs8AlRolHq54wg1SxCRhK dL3tYuti5ODgFbCT2NmtBRJmEVCVeDVtAthQUYEkifVdP9hAbF4BQYmTM5+wgNicAtYSi6+9 AxvDLCAv0bx1NpQtLnHryXwmkF0SAv85JGas72KGONtF4vPU11AvCEu8Or4FypaR+L8TpqEZ 6INza9khnB5GictNMxghqqwl7pz7BXYps4CmxPpd+hBhR4mlO2cygYQlBPgkbrwVhDiCT2LS tunMEGFeiY42IYhqNYlZx9fBrT144RLzB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iFpmYWkZQEjyypGkdTS4tz03GJDveLE3OLSvHS95PzcTYzACN127OfmHYzzXn3U O8TIxMF4iFGCg1lJhDf0we14Id6UxMqq1KL8+KLSnNTiQ4ymQO9MZJYSTc4Hpoi8knhDMwNT QxMzSwNTSzNjJXHerXPXxAsJpCeWpGanphakFsH0MXFwSjUwneA+G7e/qm3ycRXlF8u1fvw9 vKuxYEP0fZPVc1k1RJQX8835L92byLc3eem0Va/6khkL0148Us9o+Z9x5j3H88fJJk9OlErl vfq0T1zpQ/HK4mkbY2dq5jU0sjjm2q2xD1EJPTE17POGewu+JjYfuavpnXFwMiN7tsc3nUep 0xTtpe69YVzB5zV/Y9/lX+7TLDtKL/PPl+XeILmxpGPxs0/xB3rtrafE3vNdfP+JcV75tgsr rqieeJwnxnX5NF+g/4+9rl+meiwRjJutEXhgssGqj1e1Tipvjr8U7qL25GekBGth4wYfdr7l JW3Z+gVNmxbpp5dJT+NODOyTeXv18qv2rltis3R/Fn6ukNj3W4mlOCPRUIu5qDgRADVmgClZ AwAA X-CMS-MailID: 20201218075758eucas1p1605768803a5c9edce4fbe54b3e3b859a X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20201218075758eucas1p1605768803a5c9edce4fbe54b3e3b859a X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20201218075758eucas1p1605768803a5c9edce4fbe54b3e3b859a References: <20201203125700.161354-1-masahiroy@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, 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/gcc-plugin.sh [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 > :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 > :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] https://lore.kernel.org/lkml/CAHk-=wjU4DCuwQ4pXshRbwDCUQB31ScaeuDo1tjoZ0_PjhLHzQ@mail.gmail.com/ > [2] https://lore.kernel.org/lkml/CAHk-=whK0aQxs6Q5ijJmYF1n2ch8cVFSUzU5yUM_HOjig=+vnw@mail.gmail.com/ > > 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 https://releases.linaro.org/components/toolchain/binaries/ and all fails with the same error: $ make ARCH=arm CROSS_COMPILE=../../cross/gcc-arm-10.2-2020.11-x86_64-arm-none-eabi/bin/arm-none-eabi- zImage   HOSTCXX scripts/gcc-plugins/arm_ssp_per_task_plugin.so In file included from /home/mszyprow/dev/cross/gcc-arm-10.2-2020.11-x86_64-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/10.2.1/plugin/include/gcc-plugin.h:28:0,                  from scripts/gcc-plugins/gcc-common.h:7,                  from scripts/gcc-plugins/arm_ssp_per_task_plugin.c:3: /home/mszyprow/dev/cross/gcc-arm-10.2-2020.11-x86_64-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/10.2.1/plugin/include/system.h:687:10: fatal error: gmp.h: No such file or directory  #include           ^~~~~~~ compilation terminated. scripts/gcc-plugins/Makefile:47: recipe for target 'scripts/gcc-plugins/arm_ssp_per_task_plugin.so' failed make[2]: *** [scripts/gcc-plugins/arm_ssp_per_task_plugin.so] Error 1 scripts/Makefile.build:496: 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